From 2b07bdf34f2c76afb3301cd6e95cc0a817820ef8 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 12:52:51 +0530 Subject: [PATCH 01/11] added pre-commit flow to format --- lefthook.yml | 9 +++-- package-lock.json | 85 ----------------------------------------------- 2 files changed, 6 insertions(+), 88 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 4c9d22e756..b86ad2a308 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,12 +1,15 @@ -pre-push: +pre-commit: parallel: true commands: format: glob: '*.{js,ts,md,yml}' - run: npm run fmt:check + run: npm run fmt +pre-push: + parallel: true + commands: license: run: npm run test:license size: run: npm run test:size circular: - run: npm run test:circular + run: npm run test:circular \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fa3e659ed5..8fe4f35c65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -897,83 +897,6 @@ "tslib": "^2.6.3" } }, - "node_modules/@swc/core": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.15.tgz", - "integrity": "sha512-/iFeQuNaGdK7mfJbQcObhAhsMqLT7qgMYl7jX2GEIO+VDTejESpzAyKwaMeYXExN8D6e5BRHBCe7M5YlsuzjDA==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.17" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.10.15", - "@swc/core-darwin-x64": "1.10.15", - "@swc/core-linux-arm-gnueabihf": "1.10.15", - "@swc/core-linux-arm64-gnu": "1.10.15", - "@swc/core-linux-arm64-musl": "1.10.15", - "@swc/core-linux-x64-gnu": "1.10.15", - "@swc/core-linux-x64-musl": "1.10.15", - "@swc/core-win32-arm64-msvc": "1.10.15", - "@swc/core-win32-ia32-msvc": "1.10.15", - "@swc/core-win32-x64-msvc": "1.10.15" - }, - "peerDependencies": { - "@swc/helpers": "*" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.15.tgz", - "integrity": "sha512-zFdZ6/yHqMCPk7OhLFqHy/MQ1EqJhcZMpNHd1gXYT7VRU3FaqvvKETrUlG3VYl65McPC7AhMRfXPyJ0JO/jARQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true - }, - "node_modules/@swc/types": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", - "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, "node_modules/@ts-graphviz/adapter": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@ts-graphviz/adapter/-/adapter-2.0.6.tgz", @@ -5555,14 +5478,6 @@ "node": ">=18" } }, - "node_modules/search-insights": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", - "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/semiver": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz", From f1653fd4cf09785a000478dabc4af0a1bee84014 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 12:56:40 +0530 Subject: [PATCH 02/11] testing pre-commit --- src/core.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core.ts b/src/core.ts index 7dfdba88c5..5947bf65cc 100644 --- a/src/core.ts +++ b/src/core.ts @@ -257,6 +257,7 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot const id = self.id + const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From 452942d977425d02eedbe76c1d37f1b4711b7748 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 12:58:20 +0530 Subject: [PATCH 03/11] added back format check for testing --- lefthook.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index b86ad2a308..ce12789c64 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -7,9 +7,12 @@ pre-commit: pre-push: parallel: true commands: + format: + glob: '*.{js,ts,md,yml}' + run: npm run fmt:check license: run: npm run test:license size: run: npm run test:size circular: - run: npm run test:circular \ No newline at end of file + run: npm run test:circular From 30b1c37e5247ea4577a3dca4dd319791eb471b43 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 12:59:31 +0530 Subject: [PATCH 04/11] testing format --- src/core.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core.ts b/src/core.ts index 5947bf65cc..7dfdba88c5 100644 --- a/src/core.ts +++ b/src/core.ts @@ -257,7 +257,6 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot const id = self.id - const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From 12f6dd99a8956aff6039a342b0ee3a233b02af0f Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 13:00:25 +0530 Subject: [PATCH 05/11] increased size limit --- .size-limit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.size-limit.json b/.size-limit.json index 3fa3af322b..1015fe94f9 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -9,7 +9,7 @@ { "name": "zx/index", "path": "build/*.{js,cjs}", - "limit": "812.1 kB", + "limit": "812.34 kB", "brotli": false, "gzip": false }, From 8e382371fbc7a11fbaa0e60fc58c777c59b317d8 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 13:06:45 +0530 Subject: [PATCH 06/11] testing conditional formatting --- lefthook.yml | 5 +---- src/core.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index ce12789c64..3eb961e35c 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,13 +3,10 @@ pre-commit: commands: format: glob: '*.{js,ts,md,yml}' - run: npm run fmt + run: npm run fmt:check && echo "No formatting issues found." || npm run fmt pre-push: parallel: true commands: - format: - glob: '*.{js,ts,md,yml}' - run: npm run fmt:check license: run: npm run test:license size: diff --git a/src/core.ts b/src/core.ts index 7dfdba88c5..795a07db44 100644 --- a/src/core.ts +++ b/src/core.ts @@ -256,7 +256,7 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot - const id = self.id + const id = self.id const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From c255c9869196cb45a98172dfcf8d9ca4968148d2 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 13:07:31 +0530 Subject: [PATCH 07/11] made paralle false --- lefthook.yml | 2 +- src/core.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 3eb961e35c..d3f5a515c1 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,5 +1,5 @@ pre-commit: - parallel: true + parallel: false commands: format: glob: '*.{js,ts,md,yml}' diff --git a/src/core.ts b/src/core.ts index 795a07db44..7dfdba88c5 100644 --- a/src/core.ts +++ b/src/core.ts @@ -256,7 +256,7 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot - const id = self.id + const id = self.id const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From f01def6a4a24d236c4622b43042b8df051a5a282 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 13:07:55 +0530 Subject: [PATCH 08/11] testing fomrat issue --- src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.ts b/src/core.ts index 7dfdba88c5..a36003021a 100644 --- a/src/core.ts +++ b/src/core.ts @@ -257,7 +257,7 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot const id = self.id - const sync = $[SYNC] + const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From b3a6846a6dc52427f8b7a464e7a49ffe04aab5a5 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 13:09:54 +0530 Subject: [PATCH 09/11] formatting testing --- lefthook.yml | 4 ++-- src/core.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index d3f5a515c1..a825a2203b 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,9 +1,9 @@ pre-commit: - parallel: false + parallel: true commands: format: glob: '*.{js,ts,md,yml}' - run: npm run fmt:check && echo "No formatting issues found." || npm run fmt + run: npm run fmt:check && echo "No formatting issues found." || npm run fmt && git add {staged_files} pre-push: parallel: true commands: diff --git a/src/core.ts b/src/core.ts index a36003021a..7dfdba88c5 100644 --- a/src/core.ts +++ b/src/core.ts @@ -257,7 +257,7 @@ export class ProcessPromise extends Promise { const self = this const $ = self._snapshot const id = self.id - const sync = $[SYNC] + const sync = $[SYNC] const timeout = self._timeout ?? $.timeout const timeoutSignal = self._timeoutSignal ?? $.timeoutSignal From c40ede0b284cb6d0cdd61197f51bb464b1d1d7c8 Mon Sep 17 00:00:00 2001 From: Ashis Date: Mon, 3 Mar 2025 17:58:56 +0530 Subject: [PATCH 10/11] addressed changes --- lefthook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index a825a2203b..75a547cd00 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,7 +3,7 @@ pre-commit: commands: format: glob: '*.{js,ts,md,yml}' - run: npm run fmt:check && echo "No formatting issues found." || npm run fmt && git add {staged_files} + run: npm run fmt && git add {staged_files} pre-push: parallel: true commands: From 665d1f613987f06053bb0910a58e0a3139f4b088 Mon Sep 17 00:00:00 2001 From: Ashis Date: Tue, 4 Mar 2025 14:17:54 +0530 Subject: [PATCH 11/11] reverted size-limit and pkg-lock --- .size-limit.json | 2 +- package-lock.json | 85 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/.size-limit.json b/.size-limit.json index 1015fe94f9..3fa3af322b 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -9,7 +9,7 @@ { "name": "zx/index", "path": "build/*.{js,cjs}", - "limit": "812.34 kB", + "limit": "812.1 kB", "brotli": false, "gzip": false }, diff --git a/package-lock.json b/package-lock.json index 8fe4f35c65..fa3e659ed5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -897,6 +897,83 @@ "tslib": "^2.6.3" } }, + "node_modules/@swc/core": { + "version": "1.10.15", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.15.tgz", + "integrity": "sha512-/iFeQuNaGdK7mfJbQcObhAhsMqLT7qgMYl7jX2GEIO+VDTejESpzAyKwaMeYXExN8D6e5BRHBCe7M5YlsuzjDA==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.17" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.10.15", + "@swc/core-darwin-x64": "1.10.15", + "@swc/core-linux-arm-gnueabihf": "1.10.15", + "@swc/core-linux-arm64-gnu": "1.10.15", + "@swc/core-linux-arm64-musl": "1.10.15", + "@swc/core-linux-x64-gnu": "1.10.15", + "@swc/core-linux-x64-musl": "1.10.15", + "@swc/core-win32-arm64-msvc": "1.10.15", + "@swc/core-win32-ia32-msvc": "1.10.15", + "@swc/core-win32-x64-msvc": "1.10.15" + }, + "peerDependencies": { + "@swc/helpers": "*" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.10.15", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.15.tgz", + "integrity": "sha512-zFdZ6/yHqMCPk7OhLFqHy/MQ1EqJhcZMpNHd1gXYT7VRU3FaqvvKETrUlG3VYl65McPC7AhMRfXPyJ0JO/jARQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@swc/types": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", + "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, "node_modules/@ts-graphviz/adapter": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@ts-graphviz/adapter/-/adapter-2.0.6.tgz", @@ -5478,6 +5555,14 @@ "node": ">=18" } }, + "node_modules/search-insights": { + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/semiver": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",