From 3b2c279fdb46c01a45b858ff155345eb87e5edeb Mon Sep 17 00:00:00 2001 From: liwakin <13691915910@163.com> Date: Thu, 13 Jun 2024 11:30:53 +0800 Subject: [PATCH 1/6] chore: ignore yarn cache --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index fce0f122f..a27e73c97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .idea/ /.yarn/* -!/.yarn/cache !/.yarn/patches !/.yarn/releases !/.yarn/sdks From 5b8e52781e2c011bfb84069e94e66644a96f6d4a Mon Sep 17 00:00:00 2001 From: liwakin <13691915910@163.com> Date: Thu, 13 Jun 2024 11:32:59 +0800 Subject: [PATCH 2/6] chore: replace rm -rf with rimraf --- package.json | 5 +++-- yarn.lock | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a0d84f8d2..9941719be 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "eslint-plugin-arca": "^0.16.0", "jest": "^29.0.0", "proxy-from-env": "^1.1.0", + "rimraf": "^5.0.7", "semver": "^7.5.2", "supports-color": "^9.0.0", "tar": "^6.2.1", @@ -56,12 +57,12 @@ "undici-types": "6.x" }, "scripts": { - "build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts", + "build": "rimraf dist shims && run build:bundle && ts-node ./mkshims.ts", "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", "corepack": "ts-node ./sources/_cli.ts", "lint": "eslint .", "prepack": "yarn build", - "postpack": "rm -rf dist shims", + "postpack": "rimraf dist shims", "typecheck": "tsc --noEmit", "test": "jest" }, diff --git a/yarn.lock b/yarn.lock index b393fb483..7f4189f26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2232,6 +2232,7 @@ __metadata: eslint-plugin-arca: "npm:^0.16.0" jest: "npm:^29.0.0" proxy-from-env: "npm:^1.1.0" + rimraf: "npm:^5.0.7" semver: "npm:^7.5.2" supports-color: "npm:^9.0.0" tar: "npm:^6.2.1" @@ -3247,7 +3248,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.4.1 resolution: "glob@npm:10.4.1" dependencies: @@ -5438,6 +5439,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^5.0.7": + version: 5.0.7 + resolution: "rimraf@npm:5.0.7" + dependencies: + glob: "npm:^10.3.7" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10c0/bd6dbfaa98ae34ce1e54d1e06045d2d63e8859d9a1979bb4a4628b652b459a2d17b17dc20ee072b034bd2d09bd691e801d24c4d9cfe94e16fdbcc8470a1d4807 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" From 82f3c5cd742e326791249d28cf9182b4096903ba Mon Sep 17 00:00:00 2001 From: liwakin Date: Thu, 13 Jun 2024 15:31:07 +0800 Subject: [PATCH 3/6] Revert "chore: ignore yarn cache" This reverts commit 3b2c279fdb46c01a45b858ff155345eb87e5edeb. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a27e73c97..fce0f122f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea/ /.yarn/* +!/.yarn/cache !/.yarn/patches !/.yarn/releases !/.yarn/sdks From 281b004d64b256d9208e66950a7bb2d654bcfd42 Mon Sep 17 00:00:00 2001 From: liwakin Date: Thu, 13 Jun 2024 15:34:02 +0800 Subject: [PATCH 4/6] Revert "chore: replace rm -rf with rimraf" This reverts commit 5b8e52781e2c011bfb84069e94e66644a96f6d4a. --- package.json | 5 ++--- yarn.lock | 14 +------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 9941719be..a0d84f8d2 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "eslint-plugin-arca": "^0.16.0", "jest": "^29.0.0", "proxy-from-env": "^1.1.0", - "rimraf": "^5.0.7", "semver": "^7.5.2", "supports-color": "^9.0.0", "tar": "^6.2.1", @@ -57,12 +56,12 @@ "undici-types": "6.x" }, "scripts": { - "build": "rimraf dist shims && run build:bundle && ts-node ./mkshims.ts", + "build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts", "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", "corepack": "ts-node ./sources/_cli.ts", "lint": "eslint .", "prepack": "yarn build", - "postpack": "rimraf dist shims", + "postpack": "rm -rf dist shims", "typecheck": "tsc --noEmit", "test": "jest" }, diff --git a/yarn.lock b/yarn.lock index 7f4189f26..b393fb483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2232,7 +2232,6 @@ __metadata: eslint-plugin-arca: "npm:^0.16.0" jest: "npm:^29.0.0" proxy-from-env: "npm:^1.1.0" - rimraf: "npm:^5.0.7" semver: "npm:^7.5.2" supports-color: "npm:^9.0.0" tar: "npm:^6.2.1" @@ -3248,7 +3247,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": +"glob@npm:^10.2.2, glob@npm:^10.3.10": version: 10.4.1 resolution: "glob@npm:10.4.1" dependencies: @@ -5439,17 +5438,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^5.0.7": - version: 5.0.7 - resolution: "rimraf@npm:5.0.7" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/bd6dbfaa98ae34ce1e54d1e06045d2d63e8859d9a1979bb4a4628b652b459a2d17b17dc20ee072b034bd2d09bd691e801d24c4d9cfe94e16fdbcc8470a1d4807 - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" From 71a61cdf5dbaa8fc1fb1172a990864af58e3d937 Mon Sep 17 00:00:00 2001 From: liwakin Date: Thu, 13 Jun 2024 15:41:00 +0800 Subject: [PATCH 5/6] replace 'rm -rf' with 'node -e' --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a0d84f8d2..9b6ebab63 100644 --- a/package.json +++ b/package.json @@ -56,12 +56,14 @@ "undici-types": "6.x" }, "scripts": { - "build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts", + "build": "run clean && run build:bundle && ts-node ./mkshims.ts", "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", + "clean": "run rimraf dist shims", "corepack": "ts-node ./sources/_cli.ts", "lint": "eslint .", "prepack": "yarn build", - "postpack": "rm -rf dist shims", + "postpack": "run clean", + "rimraf": "node -e 'for(let i=2; i Date: Thu, 13 Jun 2024 16:16:28 +0800 Subject: [PATCH 6/6] chore: fix inconsistency in rimraf script spacing Co-authored-by: Antoine du Hamel --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b6ebab63..7919cd800 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "lint": "eslint .", "prepack": "yarn build", "postpack": "run clean", - "rimraf": "node -e 'for(let i=2; i