Skip to content

Commit f1fab01

Browse files
Juice10billyvg
authored andcommitted
Chore: Fix yarn dev (rrweb-io#1501)
* Chore: upgrade turbo & fix yarn dev
1 parent e26d50d commit f1fab01

File tree

5 files changed

+87
-66
lines changed

5 files changed

+87
-66
lines changed

.changeset/eleven-toys-vanish.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "@rrweb/_monorepo",
23
"description": "record and replay the web",
34
"repository": {
45
"type": "git",
@@ -24,6 +25,7 @@
2425
"@monorepo-utils/workspaces-to-typescript-project-references": "^2.10.2",
2526
"@size-limit/preset-small-lib": "~8.2.6",
2627
"@size-limit/webpack": "~8.2.6",
28+
"@types/prettier": "2.7.3",
2729
"@typescript-eslint/eslint-plugin": "^5.62.0",
2830
"@typescript-eslint/parser": "^5.62.0",
2931
"browserslist": "^4.22.1",
@@ -38,7 +40,7 @@
3840
"markdownlint-cli": "^0.31.1",
3941
"prettier": "2.8.4",
4042
"size-limit": "~8.2.6",
41-
"turbo": "^1.2.4",
43+
"turbo": "^2.0.3",
4244
"typescript": "^4.9.5"
4345
},
4446
"scripts": {
@@ -50,7 +52,7 @@
5052
"check-types": "yarn turbo run check-types --continue",
5153
"format": "yarn prettier --write '**/*.{ts,md}'",
5254
"format:head": "git diff --name-only HEAD^ |grep '\\.ts$\\|\\.md$' |xargs yarn prettier --write",
53-
"dev": "yarn turbo run dev",
55+
"dev": "CLEAR_DIST_DIR=false yarn turbo run dev --concurrency=17",
5456
"repl": "cd packages/rrweb && npm run repl",
5557
"typings": "yarn turbo run typings",
5658
"live-stream": "cd packages/rrweb && yarn live-stream",
@@ -66,5 +68,6 @@
6668
"browserslist": [
6769
"defaults",
6870
"not op_mini all"
69-
]
71+
],
72+
"packageManager": "[email protected]"
7073
}

turbo.json

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
{
22
"$schema": "https://turborepo.org/schema.json",
3-
"baseBranch": "origin/master",
4-
"pipeline": {
5-
"prepare": {
6-
"dependsOn": ["^prepare"],
7-
"outputs": ["lib/**", "es/**", "dist/**", "typings/**"]
3+
// These root workspace files are reused in workspaces and may affect their build output
4+
"globalDependencies": [
5+
".eslintrc.js",
6+
".prettierrc",
7+
"lerna.json",
8+
"vite.config.defaults.ts",
9+
"tsconfig.json"
10+
],
11+
"tasks": {
12+
"prepublish": {
13+
"dependsOn": ["^prepublish"],
14+
"outputs": [
15+
"lib/**",
16+
"es/**",
17+
"dist/**",
18+
"typings/**",
19+
".svelte-kit/**",
20+
"types/**"
21+
]
822
},
923
"test": {
10-
"dependsOn": ["^prepublish"]
24+
"dependsOn": ["^prepublish"],
25+
"passThroughEnv": ["PUPPETEER_HEADLESS"]
1126
},
1227
"test:watch": {
13-
"persistent": true
28+
"persistent": true,
29+
"passThroughEnv": ["PUPPETEER_HEADLESS"]
30+
},
31+
"test:update": {
32+
"dependsOn": ["^prepublish"],
33+
"passThroughEnv": ["PUPPETEER_HEADLESS"]
1434
},
15-
"test:update": {},
1635
"dev": {
17-
"dependsOn": ["^prepare"],
18-
"persistent": true
36+
// "dependsOn": ["^prepublish"],
37+
"persistent": true,
38+
"cache": false,
39+
"passThroughEnv": ["CLEAR_DIST_DIR"]
1940
},
2041
"lint": {},
2142
"typings": {},

vite.config.default.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import glob from 'fast-glob';
66
import { build, Format } from 'esbuild';
77
import { resolve } from 'path';
88
import { umdWrapper } from 'esbuild-plugin-umd-wrapper';
9+
10+
const emptyOutDir = process.env.CLEAR_DIST_DIR !== 'false';
11+
912
function minifyAndUMDPlugin({
1013
name,
1114
outDir,
@@ -107,7 +110,7 @@ export default function (
107110

108111
let formats: LibraryFormats[] = ['es', 'cjs'];
109112

110-
return defineConfig({
113+
return defineConfig(() => ({
111114
build: {
112115
// See https://vitejs.dev/guide/build.html#library-mode
113116
lib: {
@@ -122,7 +125,7 @@ export default function (
122125

123126
outDir,
124127

125-
emptyOutDir: true,
128+
emptyOutDir,
126129

127130
// Leaving this unminified so you can see what exactly gets included in
128131
// the bundles
@@ -155,5 +158,5 @@ export default function (
155158
minifyAndUMDPlugin({ name, outDir }),
156159
...plugins,
157160
],
158-
});
161+
}));
159162
}

yarn.lock

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,15 +1974,7 @@
19741974
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz#4dff5c4259ebe6c5b4a8f2c5bc3829b7a8447ff0"
19751975
integrity sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==
19761976

1977-
"@rrweb/packer@^2.0.0-alpha.14":
1978-
version "2.0.0-alpha.18"
1979-
resolved "https://registry.yarnpkg.com/@rrweb/packer/-/packer-2.0.0-alpha.18.tgz#a529be0cf802b2a2c81db595f6933c389d91b0a2"
1980-
integrity sha512-rEXltE/gnflEv/NatVNPIp4/6EtVlPLSwzIbd4WPSMtQGvwZe5OfAAk/Y88HkbAwb1nHfdA3PtFGn2Epik4inQ==
1981-
dependencies:
1982-
"@rrweb/types" "^2.0.0-alpha.18"
1983-
fflate "^0.4.4"
1984-
1985-
"@rrweb/types@^2.0.0-alpha.14", "@rrweb/types@^2.0.0-alpha.18":
1977+
"@rrweb/types@^2.0.0-alpha.18":
19861978
version "2.0.0-alpha.18"
19871979
resolved "https://registry.yarnpkg.com/@rrweb/types/-/types-2.0.0-alpha.18.tgz#e1d9af844cebbf30a2be8808f6cf64f5df3e7f50"
19881980
integrity sha512-iMH3amHthJZ9x3gGmBPmdfim7wLGygC2GciIkw2A6SO8giSn8PHYtRT8OKNH4V+k3SZ6RSnYHcTQxBA7pSWZ3Q==
@@ -2495,7 +2487,7 @@
24952487
dependencies:
24962488
"@types/node" "*"
24972489

2498-
"@types/prettier@^2.1.5":
2490+
"@types/prettier@2.7.3", "@types/prettier@^2.1.5":
24992491
version "2.7.3"
25002492
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
25012493
integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
@@ -11164,47 +11156,47 @@ tuf-js@^1.1.7:
1116411156
debug "^4.3.4"
1116511157
make-fetch-happen "^11.1.1"
1116611158

11167-
turbo-darwin-64@1.13.4:
11168-
version "1.13.4"
11169-
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.13.4.tgz#1dcea4ea0351fa38246ec26a101c862e02c27c17"
11170-
integrity sha512-A0eKd73R7CGnRinTiS7txkMElg+R5rKFp9HV7baDiEL4xTG1FIg/56Vm7A5RVgg8UNgG2qNnrfatJtb+dRmNdw==
11171-
11172-
turbo-darwin-arm64@1.13.4:
11173-
version "1.13.4"
11174-
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.13.4.tgz#ed95dc05cb04f58fec8053034647140eed58bff5"
11175-
integrity sha512-eG769Q0NF6/Vyjsr3mKCnkG/eW6dKMBZk6dxWOdrHfrg6QgfkBUk0WUUujzdtVPiUIvsh4l46vQrNVd9EOtbyA==
11176-
11177-
turbo-linux-64@1.13.4:
11178-
version "1.13.4"
11179-
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.13.4.tgz#6856fc0543894aac547021b5a2bad8f7c936d7e7"
11180-
integrity sha512-Bq0JphDeNw3XEi+Xb/e4xoKhs1DHN7OoLVUbTIQz+gazYjigVZvtwCvgrZI7eW9Xo1eOXM2zw2u1DGLLUfmGkQ==
11181-
11182-
turbo-linux-arm64@1.13.4:
11183-
version "1.13.4"
11184-
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.13.4.tgz#2370b20311d2c86df64a3811a9309ab33c722a8d"
11185-
integrity sha512-BJcXw1DDiHO/okYbaNdcWN6szjXyHWx9d460v6fCHY65G8CyqGU3y2uUTPK89o8lq/b2C8NK0yZD+Vp0f9VoIg==
11186-
11187-
turbo-windows-64@1.13.4:
11188-
version "1.13.4"
11189-
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.13.4.tgz#e9f54d3837e9bd23d4b805c583f2473bcba5be68"
11190-
integrity sha512-OFFhXHOFLN7A78vD/dlVuuSSVEB3s9ZBj18Tm1hk3aW1HTWTuAw0ReN6ZNlVObZUHvGy8d57OAGGxf2bT3etQw==
11191-
11192-
turbo-windows-arm64@1.13.4:
11193-
version "1.13.4"
11194-
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.13.4.tgz#0adfddb0d6c167a46ecff646666e347a7d372d76"
11195-
integrity sha512-u5A+VOKHswJJmJ8o8rcilBfU5U3Y1TTAfP9wX8bFh8teYF1ghP0EhtMRLjhtp6RPa+XCxHHVA2CiC3gbh5eg5g==
11196-
11197-
turbo@^1.2.4:
11198-
version "1.13.4"
11199-
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.13.4.tgz#06767fff53f0aae43f78e12e5ac7d5e7652d40d0"
11200-
integrity sha512-1q7+9UJABuBAHrcC4Sxp5lOqYS5mvxRrwa33wpIyM18hlOCpRD/fTJNxZ0vhbMcJmz15o9kkVm743mPn7p6jpQ==
11159+
turbo-darwin-64@2.0.3:
11160+
version "2.0.3"
11161+
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-2.0.3.tgz#52c5f79b4027dfd0184fb963da41bf989be4a00d"
11162+
integrity sha512-v7ztJ8sxdHw3SLfO2MhGFeeU4LQhFii1hIGs9uBiXns/0YTGOvxLeifnfGqhfSrAIIhrCoByXO7nR9wlm10n3Q==
11163+
11164+
turbo-darwin-arm64@2.0.3:
11165+
version "2.0.3"
11166+
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-2.0.3.tgz#46fa54d0cd95782ac38015e3396d59cdbdeb1eb8"
11167+
integrity sha512-LUcqvkV9Bxtng6QHbevp8IK8zzwbIxM6HMjCE7FEW6yJBN1KwvTtRtsGBwwmTxaaLO0wD1Jgl3vgkXAmQ4fqUw==
11168+
11169+
turbo-linux-64@2.0.3:
11170+
version "2.0.3"
11171+
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-2.0.3.tgz#17d6714b32381d474ef2ee5613343165f9bd75bc"
11172+
integrity sha512-xpdY1suXoEbsQsu0kPep2zrB8ijv/S5aKKrntGuQ62hCiwDFoDcA/Z7FZ8IHQ2u+dpJARa7yfiByHmizFE0r5Q==
11173+
11174+
turbo-linux-arm64@2.0.3:
11175+
version "2.0.3"
11176+
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-2.0.3.tgz#4f1bfe421dcecf2fb1164a1e223ba310d6e28b6f"
11177+
integrity sha512-MBACTcSR874L1FtLL7gkgbI4yYJWBUCqeBN/iE29D+8EFe0d3fAyviFlbQP4K/HaDYet1i26xkkOiWr0z7/V9A==
11178+
11179+
turbo-windows-64@2.0.3:
11180+
version "2.0.3"
11181+
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-2.0.3.tgz#9d1b99aff361bcbf4e065029e9dfa6682a0c0b2d"
11182+
integrity sha512-zi3YuKPkM9JxMTshZo3excPk37hUrj5WfnCqh4FjI26ux6j/LJK+Dh3SebMHd9mR7wP9CMam4GhmLCT+gDfM+w==
11183+
11184+
turbo-windows-arm64@2.0.3:
11185+
version "2.0.3"
11186+
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-2.0.3.tgz#0e0641acda3325a4a3d28123ef21017a7aae8f38"
11187+
integrity sha512-wmed4kkenLvRbidi7gISB4PU77ujBuZfgVGDZ4DXTFslE/kYpINulwzkVwJIvNXsJtHqyOq0n6jL8Zwl3BrwDg==
11188+
11189+
turbo@^2.0.3:
11190+
version "2.0.3"
11191+
resolved "https://registry.yarnpkg.com/turbo/-/turbo-2.0.3.tgz#789f64666d15dbc6fc85ce507a6c6888d70df88f"
11192+
integrity sha512-jF1K0tTUyryEWmgqk1V0ALbSz3VdeZ8FXUo6B64WsPksCMCE48N5jUezGOH2MN0+epdaRMH8/WcPU0QQaVfeLA==
1120111193
optionalDependencies:
11202-
turbo-darwin-64 "1.13.4"
11203-
turbo-darwin-arm64 "1.13.4"
11204-
turbo-linux-64 "1.13.4"
11205-
turbo-linux-arm64 "1.13.4"
11206-
turbo-windows-64 "1.13.4"
11207-
turbo-windows-arm64 "1.13.4"
11194+
turbo-darwin-64 "2.0.3"
11195+
turbo-darwin-arm64 "2.0.3"
11196+
turbo-linux-64 "2.0.3"
11197+
turbo-linux-arm64 "2.0.3"
11198+
turbo-windows-64 "2.0.3"
11199+
turbo-windows-arm64 "2.0.3"
1120811200

1120911201
type-check@^0.4.0, type-check@~0.4.0:
1121011202
version "0.4.0"

0 commit comments

Comments
 (0)