Skip to content

Commit 9f8d79b

Browse files
authored
chore: use pnpm shell-emulator instead of cross-env (#10023)
1 parent 1b822d0 commit 9f8d79b

File tree

13 files changed

+32
-72
lines changed

13 files changed

+32
-72
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ hoist-pattern[]=pug
66
hoist-pattern[]=source-map-support
77
hoist-pattern[]=ts-node
88
strict-peer-dependencies=false
9+
shell-emulator=true

package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
2121
"test": "run-s test-unit test-serve test-build",
2222
"test-serve": "vitest run -c vitest.config.e2e.ts",
23-
"test-build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
24-
"test-build-without-plugin-commonjs": "cross-env VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
23+
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
24+
"test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
2525
"test-unit": "vitest run",
2626
"test-docs": "pnpm run docs-build",
27-
"debug-serve": "cross-env VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
28-
"debug-build": "cross-env VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
27+
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
28+
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
2929
"docs": "vitepress dev docs",
3030
"docs-build": "vitepress build docs",
3131
"docs-serve": "vitepress serve docs",
32-
"build": "pnpm -r --filter=./packages/* run build",
33-
"dev": "pnpm -r --parallel --filter=./packages/* run dev",
32+
"build": "pnpm -r --filter='./packages/*' run build",
33+
"dev": "pnpm -r --parallel --filter='./packages/*' run dev",
3434
"release": "tsx scripts/release.ts",
3535
"ci-publish": "tsx scripts/publishCI.ts",
3636
"ci-docs": "run-s build docs-build"
@@ -60,7 +60,6 @@
6060
"@typescript-eslint/eslint-plugin": "^5.36.1",
6161
"@typescript-eslint/parser": "^5.36.1",
6262
"conventional-changelog-cli": "^2.2.2",
63-
"cross-env": "^7.0.3",
6463
"esbuild": "^0.14.47",
6564
"eslint": "^8.23.0",
6665
"eslint-define-config": "^1.7.0",

playground/env/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
"private": true,
44
"version": "0.0.0",
55
"scripts": {
6-
"dev": "cross-env VITE_INLINE=inline-serve vite",
7-
"build": "cross-env VITE_INLINE=inline-build vite build",
6+
"dev": "VITE_INLINE=inline-serve vite",
7+
"build": "VITE_INLINE=inline-build vite build",
88
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
99
"preview": "vite preview"
10-
},
11-
"devDependencies": {
12-
"cross-env": "^7.0.3"
1310
}
1411
}

playground/json/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
99
"preview": "vite preview",
1010
"dev:ssr": "node server",
11-
"serve:ssr": "cross-env NODE_ENV=production node server",
11+
"serve:ssr": "NODE_ENV=production node server",
1212
"debug:ssr": "node --inspect-brk server"
1313
},
1414
"devDependencies": {
15-
"cross-env": "^7.0.3",
1615
"express": "^4.18.1",
1716
"json-module": "file:./json-module",
1817
"vue": "^3.2.38"

playground/react-sourcemap/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "0.0.0",
55
"scripts": {
66
"dev": "vite",
7-
"dev:classic": "cross-env USE_CLASSIC=1 vite",
7+
"dev:classic": "USE_CLASSIC=1 vite",
88
"build": "vite build",
9-
"build:classic": "cross-env USE_CLASSIC=1 vite build",
9+
"build:classic": "USE_CLASSIC=1 vite build",
1010
"debug": "node --inspect-brk ../../packages/vite/bin/vite",
1111
"preview": "vite preview"
1212
},
@@ -15,7 +15,6 @@
1515
"react-dom": "^18.2.0"
1616
},
1717
"devDependencies": {
18-
"@vitejs/plugin-react": "workspace:*",
19-
"cross-env": "^7.0.3"
18+
"@vitejs/plugin-react": "workspace:*"
2019
}
2120
}

playground/ssr-deps/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"dev": "node server",
8-
"serve": "cross-env NODE_ENV=production node server",
8+
"serve": "NODE_ENV=production node server",
99
"debug": "node --inspect-brk server"
1010
},
1111
"dependencies": {
@@ -32,7 +32,6 @@
3232
"pkg-exports": "file:./pkg-exports"
3333
},
3434
"devDependencies": {
35-
"cross-env": "^7.0.3",
3635
"express": "^4.18.1"
3736
}
3837
}

playground/ssr-html/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"type": "module",
66
"scripts": {
77
"dev": "node server",
8-
"serve": "cross-env NODE_ENV=production node server",
8+
"serve": "NODE_ENV=production node server",
99
"debug": "node --inspect-brk server"
1010
},
1111
"dependencies": {},
1212
"devDependencies": {
13-
"cross-env": "^7.0.3",
1413
"express": "^4.18.1"
1514
}
1615
}

playground/ssr-pug/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
"type": "module",
66
"scripts": {
77
"dev": "node server",
8-
"serve": "cross-env NODE_ENV=production node server",
8+
"serve": "NODE_ENV=production node server",
99
"debug": "node --inspect-brk server"
1010
},
1111
"devDependencies": {
12-
"cross-env": "^7.0.3",
1312
"express": "^4.18.1",
1413
"pug": "^3.0.2"
1514
}

playground/ssr-react/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:client": "vite build --outDir dist/client",
1010
"build:server": "vite build --ssr src/entry-server.jsx --outDir dist/server",
1111
"generate": "vite build --outDir dist/static && npm run build:server && node prerender",
12-
"serve": "cross-env NODE_ENV=production node server",
12+
"serve": "NODE_ENV=production node server",
1313
"debug": "node --inspect-brk server"
1414
},
1515
"dependencies": {
@@ -20,7 +20,6 @@
2020
"devDependencies": {
2121
"@vitejs/plugin-react": "workspace:*",
2222
"compression": "^1.7.4",
23-
"cross-env": "^7.0.3",
2423
"express": "^4.18.1",
2524
"serve-static": "^1.15.0"
2625
}

playground/ssr-vue/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build:server": "vite build --ssr src/entry-server.js --outDir dist/server",
1212
"build:server:noExternal": "vite build --config vite.config.noexternal.js --ssr src/entry-server.js --outDir dist/server",
1313
"generate": "vite build --ssrManifest --outDir dist/static && npm run build:server && node prerender",
14-
"serve": "cross-env NODE_ENV=production node server",
14+
"serve": "NODE_ENV=production node server",
1515
"debug": "node --inspect-brk server"
1616
},
1717
"dependencies": {
@@ -24,7 +24,6 @@
2424
"@vitejs/plugin-vue": "workspace:*",
2525
"@vitejs/plugin-vue-jsx": "workspace:*",
2626
"compression": "^1.7.4",
27-
"cross-env": "^7.0.3",
2827
"dep-import-type": "link:./dep-import-type",
2928
"express": "^4.18.1",
3029
"serve-static": "^1.15.0"

playground/ssr-webworker/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "cross-env DEV=1 node worker",
7+
"dev": "DEV=1 node worker",
88
"build:worker": "vite build --ssr src/entry-worker.jsx --outDir dist/worker"
99
},
1010
"dependencies": {
1111
"react": "^18.2.0"
1212
},
1313
"devDependencies": {
14-
"cross-env": "^7.0.3",
1514
"miniflare": "^1.4.1",
1615
"resolve-linked": "workspace:*"
1716
}

playground/worker/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
"dev:es": "vite --config ./vite.config-es.js dev",
1010
"build:es": "vite --config ./vite.config-es.js build",
1111
"preview:es": "vite --config ./vite.config-es.js preview",
12-
"dev:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev",
13-
"build:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build",
14-
"preview:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview",
15-
"dev:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev",
16-
"build:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build",
17-
"preview:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview",
18-
"dev:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev",
19-
"build:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build",
20-
"preview:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview",
21-
"dev:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev",
22-
"build:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js build",
23-
"preview:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview",
12+
"dev:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev",
13+
"build:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build",
14+
"preview:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview",
15+
"dev:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev",
16+
"build:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build",
17+
"preview:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview",
18+
"dev:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev",
19+
"build:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build",
20+
"preview:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview",
21+
"dev:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev",
22+
"build:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js build",
23+
"preview:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview",
2424
"debug": "node --inspect-brk ../../packages/vite/bin/vite"
2525
},
2626
"dependencies": {

pnpm-lock.yaml

+1-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)