Skip to content

Commit 3d5a745

Browse files
committed
support for highlight yarn workspaces monorepo
1 parent bcf8312 commit 3d5a745

File tree

19 files changed

+101
-11860
lines changed

19 files changed

+101
-11860
lines changed

.github/workflows/eslint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: Setup Node
13-
uses: actions/setup-node@v3
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v1
1414
with:
15-
node-version: 16
16-
cache: 'yarn'
17-
- name: Install Dependencies
15+
node-version: 16.15.0
16+
registry-url: https://registry.npmjs.org
17+
- name: Install
1818
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
1919
- name: Build Packages
2020
run: yarn build:all

.github/workflows/release.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ jobs:
44
release:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Checkout
8-
uses: actions/checkout@v2
7+
- uses: actions/checkout@v3
98
- name: Setup Node.js
109
uses: actions/setup-node@v1
1110
with:
@@ -15,16 +14,5 @@ jobs:
1514
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
1615
- name: Build all
1716
run: yarn build:all
18-
# - name: Test all
19-
# run: yarn test
20-
- name: Setup Publish Env
21-
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > ~/.npmrc
22-
env:
23-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24-
- name: Publish
25-
if: github.ref == 'refs/heads/master'
26-
run: |
27-
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml;
28-
yarn workspace @highlight-run/rrweb npm publish --access public;
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
# - name: Test all
18+
# run: yarn test

.github/workflows/style-check.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v1
1214
with:
13-
repository: ${{ github.event.pull_request.head.repo.full_name }}
14-
ref: ${{ github.head_ref }}
15-
- name: Setup Node
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: 16
19-
cache: 'yarn'
20-
- name: Install Dependencies
15+
node-version: 16.15.0
16+
registry-url: https://registry.npmjs.org
17+
- name: Install
2118
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
2219
- name: Build Packages
2320
run: yarn build:all

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ node_modules
55
package-lock.json
66
tsconfig.tsbuildinfo
77

8+
# since this repo is referenced from the highlight monorepo which has its own yarn.lock file,
9+
# don't include yarn.lock files from rrweb to avoid interfering with the monorepo
10+
yarn.lock
11+
812
temp
913

1014
*.log
@@ -30,4 +34,5 @@ dist
3034
!.yarn/sdks
3135
!.yarn/versions
3236

37+
tsconfig.tsbuildinfo
3338

packages/rrdom-nodejs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
"@typescript-eslint/parser": "^5.23.0",
3838
"compare-versions": "^4.1.3",
3939
"eslint": "^8.15.0",
40-
"jest": "^27.5.1",
40+
"jest": "27.1.1",
4141
"puppeteer": "^9.1.1",
4242
"rollup": "^2.56.3",
4343
"rollup-plugin-terser": "^7.0.2",
4444
"rollup-plugin-typescript2": "^0.31.2",
4545
"rollup-plugin-web-worker-loader": "^1.6.1",
46-
"ts-jest": "^27.1.3",
46+
"ts-jest": "27.1.5",
4747
"typescript": "^4.7.3"
4848
},
4949
"dependencies": {

packages/rrdom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
"@typescript-eslint/eslint-plugin": "^5.23.0",
3838
"@typescript-eslint/parser": "^5.23.0",
3939
"eslint": "^8.15.0",
40-
"jest": "^27.5.1",
40+
"jest": "27.1.1",
4141
"puppeteer": "^9.1.1",
4242
"rollup": "^2.56.3",
4343
"rollup-plugin-terser": "^7.0.2",
4444
"rollup-plugin-typescript2": "^0.31.2",
4545
"rollup-plugin-web-worker-loader": "^1.6.1",
46-
"ts-jest": "^27.1.3",
46+
"ts-jest": "27.1.5",
4747
"typescript": "^4.7.3"
4848
},
4949
"dependencies": {

packages/rrdom/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"lib": ["es6", "dom"],
1414
"skipLibCheck": true,
1515
"declaration": true,
16-
"importsNotUsedAsValues": "error"
16+
"importsNotUsedAsValues": "error",
17+
"composite": true
1718
},
1819
"references": [
1920
{

packages/rrweb-player/rollup.config.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ import css from 'rollup-plugin-css-only';
1212
// eslint-disable-next-line no-undef
1313
const production = !process.env.ROLLUP_WATCH;
1414

15-
const entries = (production
16-
? [
17-
{ file: pkg.module, format: 'es', css: false },
18-
{ file: pkg.main, format: 'cjs', css: false },
19-
{
20-
file: pkg.unpkg,
21-
format: 'iife',
22-
name: 'rrwebPlayer',
23-
css: 'style.css',
24-
},
25-
]
26-
: []
15+
const entries = (
16+
production
17+
? [
18+
{ file: pkg.module, format: 'es', css: false },
19+
{ file: pkg.main, format: 'cjs', css: false },
20+
{
21+
file: pkg.unpkg,
22+
format: 'iife',
23+
name: 'rrwebPlayer',
24+
css: 'style.css',
25+
},
26+
]
27+
: []
2728
).concat([
2829
{
2930
file: 'public/bundle.js',
@@ -72,7 +73,7 @@ export default entries.map((output) => ({
7273
// supports bundling `web-worker:..filename` from rrweb
7374
webWorkerLoader(),
7475

75-
typescript(),
76+
typescript({ clean: true }),
7677

7778
css({
7879
// we'll extract any component CSS out into

packages/rrweb-player/typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { eventWithTime, playerConfig } from '@highlight-run/rrweb/typings/types';
2-
import { Replayer, mirror } from '@highlight-run/rrweb';
2+
import { Replayer, mirror } from '@highlight-run/rrweb/typings';
33
import { SvelteComponent } from 'svelte';
44

55
export type RRwebPlayerOptions = {

packages/rrweb-snapshot/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@
4848
"@types/puppeteer": "^1.12.4",
4949
"cross-env": "^5.2.0",
5050
"eslint": "^8.23.1",
51-
"jest": "^27.2.4",
51+
"jest": "27.1.1",
5252
"jest-snapshot": "^23.6.0",
5353
"jsdom": "^16.4.0",
5454
"puppeteer": "^1.15.0",
5555
"rollup": "^2.45.2",
5656
"rollup-plugin-terser": "^7.0.2",
5757
"rollup-plugin-typescript2": "^0.31.2",
58-
"ts-jest": "^27.0.5",
58+
"ts-jest": "27.1.5",
5959
"ts-node": "^7.0.1",
6060
"tslib": "^1.9.3",
6161
"typescript": "^4.7.3"

0 commit comments

Comments
 (0)