From b58bb43bcfccdaa1c8cf55ac90c2aa0d8d074a1b Mon Sep 17 00:00:00 2001 From: kirin Date: Wed, 2 Apr 2025 11:11:41 +0800 Subject: [PATCH] chore: fix scripts with windows (#103) --- apps/demo-fixed-layout-simple/package.json | 9 ++--- apps/demo-fixed-layout/package.json | 9 ++--- apps/demo-free-layout-simple/package.json | 5 +-- apps/demo-free-layout/package.json | 7 ++-- apps/demo-node-form/package.json | 7 ++-- common/config/rush/pnpm-lock.yaml | 41 ++++++++++++++++++++++ 6 files changed, 62 insertions(+), 16 deletions(-) diff --git a/apps/demo-fixed-layout-simple/package.json b/apps/demo-fixed-layout-simple/package.json index 77426cab..c1e77050 100644 --- a/apps/demo-fixed-layout-simple/package.json +++ b/apps/demo-fixed-layout-simple/package.json @@ -19,10 +19,10 @@ "build:fast": "exit 0", "build:watch": "exit 0", "clean": "rimraf dist", - "dev": "MODE=app NODE_ENV=development rsbuild dev --open", + "dev": "cross-env MODE=app NODE_ENV=development rsbuild dev --open", "lint": "eslint ./src --cache", "lint:fix": "eslint ./src --fix", - "start": "NODE_ENV=development rsbuild dev --open", + "start": "cross-env NODE_ENV=development rsbuild dev --open", "test": "exit", "test:cov": "exit", "watch": "exit 0" @@ -45,10 +45,11 @@ "@types/node": "^18", "@types/react": "^18", "@types/react-dom": "^18", - "eslint": "^8.54.0" + "eslint": "^8.54.0", + "cross-env": "~7.0.3" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" } -} \ No newline at end of file +} diff --git a/apps/demo-fixed-layout/package.json b/apps/demo-fixed-layout/package.json index a79334cf..abaab429 100644 --- a/apps/demo-fixed-layout/package.json +++ b/apps/demo-fixed-layout/package.json @@ -19,10 +19,10 @@ "build:fast": "exit 0", "build:watch": "exit 0", "clean": "rimraf dist", - "dev": "MODE=app NODE_ENV=development rsbuild dev --open", + "dev": "cross-env MODE=app NODE_ENV=development rsbuild dev --open", "lint": "eslint ./src --cache", "lint:fix": "eslint ./src --fix", - "start": "NODE_ENV=development rsbuild dev --open", + "start": "cross-env NODE_ENV=development rsbuild dev --open", "test": "exit", "test:cov": "exit", "watch": "exit 0" @@ -53,10 +53,11 @@ "@typescript-eslint/parser": "^6.10.0", "eslint": "^8.54.0", "less": "^4.1.2", - "less-loader": "^6" + "less-loader": "^6", + "cross-env": "~7.0.3" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" } -} \ No newline at end of file +} diff --git a/apps/demo-free-layout-simple/package.json b/apps/demo-free-layout-simple/package.json index 925d80a3..cac882ef 100644 --- a/apps/demo-free-layout-simple/package.json +++ b/apps/demo-free-layout-simple/package.json @@ -44,10 +44,11 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/styled-components": "^5", - "eslint": "^8.54.0" + "eslint": "^8.54.0", + "cross-env": "~7.0.3" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" } -} \ No newline at end of file +} diff --git a/apps/demo-free-layout/package.json b/apps/demo-free-layout/package.json index fcaeec99..e7462259 100644 --- a/apps/demo-free-layout/package.json +++ b/apps/demo-free-layout/package.json @@ -19,10 +19,10 @@ "build:fast": "exit 0", "build:watch": "exit 0", "clean": "rimraf dist", - "dev": "MODE=app NODE_ENV=development rsbuild dev --open", + "dev": "cross-env MODE=app NODE_ENV=development rsbuild dev --open", "lint": "eslint ./src --cache", "lint:fix": "eslint ./src --fix", - "start": "NODE_ENV=development rsbuild dev --open", + "start": "cross-env NODE_ENV=development rsbuild dev --open", "test": "exit", "test:cov": "exit", "watch": "exit 0" @@ -53,7 +53,8 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/styled-components": "^5", - "eslint": "^8.54.0" + "eslint": "^8.54.0", + "cross-env": "~7.0.3" }, "publishConfig": { "access": "public", diff --git a/apps/demo-node-form/package.json b/apps/demo-node-form/package.json index d6e33211..06c80c54 100644 --- a/apps/demo-node-form/package.json +++ b/apps/demo-node-form/package.json @@ -19,10 +19,10 @@ "build:fast": "exit 0", "build:watch": "exit 0", "clean": "rimraf dist", - "dev": "MODE=app NODE_ENV=development rsbuild dev --open", + "dev": "cross-env MODE=app NODE_ENV=development rsbuild dev --open", "lint": "eslint ./src --cache", "lint:fix": "eslint ./src --fix", - "start": "NODE_ENV=development rsbuild dev --open", + "start": "cross-env NODE_ENV=development rsbuild dev --open", "test": "exit", "test:cov": "exit", "watch": "exit 0" @@ -48,7 +48,8 @@ "@types/react-dom": "^18", "@types/styled-components": "^5", "@typescript-eslint/parser": "^6.10.0", - "eslint": "^8.54.0" + "eslint": "^8.54.0", + "cross-env": "~7.0.3" }, "publishConfig": { "access": "public", diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1bde1617..d20c9a7a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -120,6 +120,9 @@ importers: '@typescript-eslint/parser': specifier: ^6.10.0 version: 6.21.0(eslint@8.57.1)(typescript@5.0.4) + cross-env: + specifier: ~7.0.3 + version: 7.0.3 eslint: specifier: ^8.54.0 version: 8.57.1 @@ -178,6 +181,9 @@ importers: '@types/react-dom': specifier: ^18 version: 18.3.5(@types/react@18.3.16) + cross-env: + specifier: ~7.0.3 + version: 7.0.3 eslint: specifier: ^8.54.0 version: 8.57.1 @@ -254,6 +260,9 @@ importers: '@types/styled-components': specifier: ^5 version: 5.1.34 + cross-env: + specifier: ~7.0.3 + version: 7.0.3 eslint: specifier: ^8.54.0 version: 8.57.1 @@ -303,6 +312,9 @@ importers: '@types/styled-components': specifier: ^5 version: 5.1.34 + cross-env: + specifier: ~7.0.3 + version: 7.0.3 eslint: specifier: ^8.54.0 version: 8.57.1 @@ -364,6 +376,9 @@ importers: '@typescript-eslint/parser': specifier: ^6.10.0 version: 6.21.0(eslint@8.57.1)(typescript@5.0.4) + cross-env: + specifier: ~7.0.3 + version: 7.0.3 eslint: specifier: ^8.54.0 version: 8.57.1 @@ -5814,6 +5829,7 @@ packages: resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==} cpu: [arm] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5822,6 +5838,7 @@ packages: resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==} cpu: [arm] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -5830,6 +5847,7 @@ packages: resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5838,6 +5856,7 @@ packages: resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -5846,6 +5865,7 @@ packages: resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} cpu: [loong64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5854,6 +5874,7 @@ packages: resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} cpu: [ppc64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5862,6 +5883,7 @@ packages: resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==} cpu: [riscv64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5870,6 +5892,7 @@ packages: resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==} cpu: [s390x] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5878,6 +5901,7 @@ packages: resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -5886,6 +5910,7 @@ packages: resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -6022,6 +6047,7 @@ packages: resolution: {integrity: sha512-lZlO/rAJSeozi+qtVLkGSXfe+riPawCwM4FsrflELfNlvvEXpANwtrdJ+LsaNVXcgvhh50ZX2KicTdmx9G2b6Q==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true optional: true @@ -6029,6 +6055,7 @@ packages: resolution: {integrity: sha512-En/SMl45s19iUVb1/ZDFQvFDxIjnlfk7yqV3drMWWAL5HSgksNejaTIFTO52aoohIBbmwuk5wSGcbU0G0IFiPg==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -6037,6 +6064,7 @@ packages: resolution: {integrity: sha512-bX7exULSZwy8xtDh6Z65b6sRC4uSxGuyvSLCEKyhmG6AnJkg0gQMxk3hoO0hWnyGEZgdJEn+jEhk0fjl+6ZRAQ==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true optional: true @@ -6044,6 +6072,7 @@ packages: resolution: {integrity: sha512-N1oZsXfJ9VLLcK7p1PS65cxLYQCZ7iqHW2OP6Ew2+hlz/d1hzngxgzrtZMCXFOHXDvTzVu5ff6jGS2v7+zv2tA==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -6052,6 +6081,7 @@ packages: resolution: {integrity: sha512-2Prw2USgTJ3aLdLExfik8pAwAHbX4MZrACBGEmR7Vbb56kLjC+++fXkciRc50pUDK4JFr1VQ7eNZrJuDR6GG6Q==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true optional: true @@ -6059,6 +6089,7 @@ packages: resolution: {integrity: sha512-BdPaepoLKuaVwip4QK/nGqNi1xpbCWSxiycPbKRrGqKgt/QGihxxFgiqr4EpWQVIJNIMy4nCsg4arO0+H1KWGQ==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -6067,6 +6098,7 @@ packages: resolution: {integrity: sha512-bnVGB/mQBKEdzOU/CPmcOE3qEXxGOGGW7/i6iLl2MamVOykJq8fYjL9j86yi6L0r009ja16OgWckykQGc4UqGw==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true optional: true @@ -6074,6 +6106,7 @@ packages: resolution: {integrity: sha512-GFv0Bod268OcXIcjeLoPlK0oz8rClEIxIRFkz+ejhbvfCwRJ+Fd+EKaaKQTBfZQujPqc0h2GctIF25nN5pFTmA==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -8148,6 +8181,14 @@ packages: resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} dev: false + /cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + dependencies: + cross-spawn: 7.0.6 + dev: true + /cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'}