From 9d146771878a0c2f76de35a6171fe428ab0d76db Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Thu, 7 Nov 2024 18:08:31 +0800 Subject: [PATCH 01/13] feat(build): integrate tree-shaker for improved bundle optimization --- extensions/vscode/package.json | 1 + extensions/vscode/scripts/build.js | 27 ++++++++++++++-- pnpm-lock.yaml | 50 ++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9d8913ee87..1ef6b5afb5 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -555,6 +555,7 @@ "postinstall": "vscode-ext-gen --scope vue" }, "devDependencies": { + "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e", "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", "@volar/vscode": "~2.4.9", diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index 39acc64a1f..6dec1c426b 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -1,6 +1,7 @@ // @ts-check const path = require('path'); const fs = require('fs'); +const treeShake = require('@kermanx/tree-shaker').treeShake; require('esbuild').context({ entryPoints: { @@ -17,7 +18,6 @@ require('esbuild').context({ platform: 'node', tsconfig: './tsconfig.json', define: { 'process.env.NODE_ENV': '"production"' }, - minify: process.argv.includes('--minify'), plugins: [ { name: 'umd2esm', @@ -79,15 +79,36 @@ require('esbuild').context({ }); }, }, + { + name: 'tree-shaking', + setup(build) { + build.onEnd(() => { + for (const file of [ + '../dist/client.js', + '../dist/server.js', + '../node_modules/vue-language-core-pack/index.js', + '../node_modules/vue-typescript-plugin-pack/index.js', + ]) { + console.time('tree-shaking ' + file); + const filePath = path.resolve(__dirname, file); + const soruce = fs.readFileSync(filePath, 'utf-8'); + const { output } = treeShake(soruce, 'recommended', process.argv.includes('--minify')); + fs.writeFileSync(filePath, output); + console.timeEnd('tree-shaking ' + file); + } + }); + }, + }, ], }).then(async ctx => { - console.log('building...'); + console.time('build'); if (process.argv.includes('--watch')) { await ctx.watch(); + console.timeEnd('build'); console.log('watching...'); } else { await ctx.rebuild(); await ctx.dispose(); - console.log('finished.'); + console.timeEnd('build'); } }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 392970d800..2f62f9250f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: extensions/vscode: devDependencies: + '@kermanx/tree-shaker': + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -747,6 +750,34 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [linux] + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [win32] + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e} + version: 0.0.0 + '@lerna-lite/cli@3.10.0': resolution: {integrity: sha512-D0QS8vw1lz9LWDlKax1nXQPbA4qokT/yXsi36hFmnNATVViJL1TRqbsz5lpFEW8WNlz42/r+Uftt/jW+DtIymA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3675,6 +3706,25 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': + optional: true + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': + optional: true + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': + optional: true + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': + optional: true + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': + optionalDependencies: + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e + '@lerna-lite/cli@3.10.0(@lerna-lite/publish@3.10.0(@types/node@22.9.0)(typescript@5.6.3))(@lerna-lite/version@3.10.0(@lerna-lite/publish@3.10.0(@types/node@22.9.0)(typescript@5.6.3))(@types/node@22.9.0)(typescript@5.6.3))(@types/node@22.9.0)(typescript@5.6.3)': dependencies: '@lerna-lite/core': 3.10.0(@types/node@22.9.0)(typescript@5.6.3) From efafb83d08fa032b9674238c40063875481aba05 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 18 Dec 2024 21:26:50 +0800 Subject: [PATCH 02/13] Update pnpm-lock.yaml --- pnpm-lock.yaml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1477ac9381..8ccaead1be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: extensions/vscode: devDependencies: + '@kermanx/tree-shaker': + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -607,6 +610,34 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [linux] + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e} + version: 0.0.0 + engines: {node: '>= 10'} + os: [win32] + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e} + version: 0.0.0 + '@lerna-lite/cli@3.10.1': resolution: {integrity: sha512-T7wFyKpH8YaXADadqYMyIl5n3ZNSGNXxCiy+KodHqLmeUlMzUGb57zL3QvZ2k/yqotJGIhc7m9FGhdwh0kfDgA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3480,6 +3511,25 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': + optional: true + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': + optional: true + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': + optional: true + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': + optional: true + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': + optionalDependencies: + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e + '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2)': dependencies: '@lerna-lite/core': 3.10.1(@types/node@22.10.1)(typescript@5.7.2) From 8f26abf82e34c054245428ee21c03b234a0c998e Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 18 Dec 2024 21:37:38 +0800 Subject: [PATCH 03/13] bump --- extensions/vscode/package.json | 2 +- pnpm-lock.yaml | 42 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 7744c4751c..1bd8070fbe 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -563,7 +563,7 @@ "postinstall": "vscode-ext-gen --scope vue" }, "devDependencies": { - "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e", + "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045", "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", "@volar/vscode": "~2.4.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ccaead1be..99c393ab40 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: extensions/vscode: devDependencies: '@kermanx/tree-shaker': - specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e - version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045 + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045 '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -610,32 +610,32 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e} + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e} + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19} version: 0.0.0 engines: {node: '>= 10'} os: [linux] - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e} + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19} version: 0.0.0 engines: {node: '>= 10'} os: [win32] - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e} + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045} version: 0.0.0 '@lerna-lite/cli@3.10.1': @@ -3511,24 +3511,24 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e': + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19': optional: true - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e': + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19': optional: true - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e': + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19': optional: true - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e': + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19': optional: true - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@67a133e': + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045': optionalDependencies: - '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@67a133e - '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@67a133e - '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@67a133e - '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@67a133e + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19 + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19 + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19 + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19 '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2)': dependencies: From 8943e797711cb604d9d5f212bc0c2e12c57f3bf4 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 18 Dec 2024 22:21:26 +0800 Subject: [PATCH 04/13] works --- extensions/vscode/scripts/build.js | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index 6dec1c426b..a7c49ff723 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -1,7 +1,18 @@ -// @ts-check const path = require('path'); const fs = require('fs'); const treeShake = require('@kermanx/tree-shaker').treeShake; +const minify = process.argv.includes('--minify'); +const shakeFailPaths = [ + '/request-light/lib/node/main.js', + '/@vue/compiler-core/dist/compiler-core.cjs.prod.js', + '/packages/typescript-plugin/lib/requests/componentInfos.js', + '/volar-service-typescript/lib/plugins/docCommentTemplate.js', + '/@volar/language-service/lib/features/provideHover.js', + '/volar-service-typescript/lib/utils/previewer.js', + '/@babel/parser/lib/index.js', + '/@vscode/emmet-helper/lib/cjs/emmetHelper.js', + '/vscode-json-languageservice/lib/esm/services/jsonHover.js', +]; require('esbuild').context({ entryPoints: { @@ -18,6 +29,7 @@ require('esbuild').context({ platform: 'node', tsconfig: './tsconfig.json', define: { 'process.env.NODE_ENV': '"production"' }, + minify: minify, plugins: [ { name: 'umd2esm', @@ -82,19 +94,20 @@ require('esbuild').context({ { name: 'tree-shaking', setup(build) { - build.onEnd(() => { - for (const file of [ - '../dist/client.js', - '../dist/server.js', - '../node_modules/vue-language-core-pack/index.js', - '../node_modules/vue-typescript-plugin-pack/index.js', - ]) { - console.time('tree-shaking ' + file); - const filePath = path.resolve(__dirname, file); - const soruce = fs.readFileSync(filePath, 'utf-8'); - const { output } = treeShake(soruce, 'recommended', process.argv.includes('--minify')); - fs.writeFileSync(filePath, output); - console.timeEnd('tree-shaking ' + file); + if (!minify) { + return; + } + build.onLoad({ filter: /\.js/ }, ({ path }) => { + if (shakeFailPaths.some(name => path.endsWith(name))) { + return; + } + const soruce = fs.readFileSync(path, 'utf-8'); + const { output, diagnostics } = treeShake(soruce, 'recommended', false); + if (!diagnostics.length) { + return { + contents: output, + loader: 'js', + } } }); }, From e11c402c60a4f00262779aa4c56bd8fc3687b252 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 18 Dec 2024 22:45:54 +0800 Subject: [PATCH 05/13] Update build.js --- extensions/vscode/scripts/build.js | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index a7c49ff723..17c2f3bff9 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -98,6 +98,7 @@ require('esbuild').context({ return; } build.onLoad({ filter: /\.js/ }, ({ path }) => { + path = path.replace(/\\/g, '/'); if (shakeFailPaths.some(name => path.endsWith(name))) { return; } From 3d46d246487c1790416f06149e7d0c37930c76bc Mon Sep 17 00:00:00 2001 From: _Kerman Date: Fri, 20 Dec 2024 00:15:08 +0800 Subject: [PATCH 06/13] chore: update tree-shaker --- extensions/vscode/package.json | 2 +- pnpm-lock.yaml | 42 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 1bd8070fbe..3fa9052ea6 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -563,7 +563,7 @@ "postinstall": "vscode-ext-gen --scope vue" }, "devDependencies": { - "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045", + "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed", "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", "@volar/vscode": "~2.4.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99c393ab40..ab5ea98354 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: extensions/vscode: devDependencies: '@kermanx/tree-shaker': - specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045 - version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045 + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -610,32 +610,32 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19} + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19} + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519} version: 0.0.0 engines: {node: '>= 10'} os: [linux] - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19} + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519} version: 0.0.0 engines: {node: '>= 10'} os: [win32] - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045} + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed} version: 0.0.0 '@lerna-lite/cli@3.10.1': @@ -3511,24 +3511,24 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19': + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': optional: true - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19': + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': optional: true - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19': + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': optional: true - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19': + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': optional: true - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@e12c045': + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': optionalDependencies: - '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@e12c04558794bb992a2aa7726de47b707140fc19 - '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@e12c04558794bb992a2aa7726de47b707140fc19 - '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@e12c04558794bb992a2aa7726de47b707140fc19 - '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@e12c04558794bb992a2aa7726de47b707140fc19 + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519 '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2))(@types/node@22.10.1)(typescript@5.7.2)': dependencies: From 26a3a0a7401c60c4cf0a02e602d7f19e30dab63e Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 01:02:59 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E7=94=B0=E6=88=88=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1837a0aa6b..daf56afa11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: extensions/vscode: devDependencies: + '@kermanx/tree-shaker': + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -745,6 +748,34 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + version: 0.0.0 + engines: {node: '>= 10'} + os: [darwin] + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + version: 0.0.0 + engines: {node: '>= 10'} + os: [linux] + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + version: 0.0.0 + engines: {node: '>= 10'} + os: [win32] + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed} + version: 0.0.0 + '@lerna-lite/cli@3.10.1': resolution: {integrity: sha512-T7wFyKpH8YaXADadqYMyIl5n3ZNSGNXxCiy+KodHqLmeUlMzUGb57zL3QvZ2k/yqotJGIhc7m9FGhdwh0kfDgA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3706,6 +3737,25 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + optional: true + + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + optional: true + + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + optional: true + + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + optional: true + + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': + optionalDependencies: + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2)': dependencies: '@lerna-lite/core': 3.10.1(@types/node@22.10.2)(typescript@5.7.2) From 4c48739329b0ceec8479f0d69d7e103a90206793 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 01:07:30 +0800 Subject: [PATCH 08/13] Update pnpm-lock.yaml --- pnpm-lock.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index daf56afa11..498c451db0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2252,8 +2252,8 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true - math-intrinsics@1.0.0: - resolution: {integrity: sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} mdurl@2.0.0: @@ -2480,8 +2480,8 @@ packages: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - p-limit@6.1.0: - resolution: {integrity: sha512-H0jc0q1vOzlEk0TqAKXKZxdl7kX3OFUzCnNVUnq5Pc3DGo0kpeaMuPqxQn235HibwBEb0/pm9dgKTjXy66fBkg==} + p-limit@6.2.0: + resolution: {integrity: sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==} engines: {node: '>=18'} p-locate@4.1.0: @@ -3901,7 +3901,7 @@ snapshots: new-github-release-url: 2.0.0 node-fetch: 3.3.2 npm-package-arg: 11.0.3 - p-limit: 6.1.0 + p-limit: 6.2.0 p-map: 7.0.3 p-pipe: 4.0.0 p-reduce: 3.0.0 @@ -5171,7 +5171,7 @@ snapshots: gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 - math-intrinsics: 1.0.0 + math-intrinsics: 1.1.0 get-stream@8.0.1: {} @@ -5569,7 +5569,7 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 - math-intrinsics@1.0.0: {} + math-intrinsics@1.1.0: {} mdurl@2.0.0: {} @@ -5796,7 +5796,7 @@ snapshots: dependencies: yocto-queue: 1.1.1 - p-limit@6.1.0: + p-limit@6.2.0: dependencies: yocto-queue: 1.1.1 From 733203fbbbeeb22707735cc77f74999cc678e502 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 01:07:35 +0800 Subject: [PATCH 09/13] Remove shakeFailPaths --- extensions/vscode/scripts/build.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index 17c2f3bff9..2a2fbcfff1 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -2,17 +2,6 @@ const path = require('path'); const fs = require('fs'); const treeShake = require('@kermanx/tree-shaker').treeShake; const minify = process.argv.includes('--minify'); -const shakeFailPaths = [ - '/request-light/lib/node/main.js', - '/@vue/compiler-core/dist/compiler-core.cjs.prod.js', - '/packages/typescript-plugin/lib/requests/componentInfos.js', - '/volar-service-typescript/lib/plugins/docCommentTemplate.js', - '/@volar/language-service/lib/features/provideHover.js', - '/volar-service-typescript/lib/utils/previewer.js', - '/@babel/parser/lib/index.js', - '/@vscode/emmet-helper/lib/cjs/emmetHelper.js', - '/vscode-json-languageservice/lib/esm/services/jsonHover.js', -]; require('esbuild').context({ entryPoints: { @@ -99,9 +88,6 @@ require('esbuild').context({ } build.onLoad({ filter: /\.js/ }, ({ path }) => { path = path.replace(/\\/g, '/'); - if (shakeFailPaths.some(name => path.endsWith(name))) { - return; - } const soruce = fs.readFileSync(path, 'utf-8'); const { output, diagnostics } = treeShake(soruce, 'recommended', false); if (!diagnostics.length) { From 651283088bbaf6c4d4cb833c851321c463a0a8ed Mon Sep 17 00:00:00 2001 From: _Kerman Date: Fri, 20 Dec 2024 17:06:28 +0800 Subject: [PATCH 10/13] update tree-shaker version --- extensions/vscode/package.json | 2 +- pnpm-lock.yaml | 42 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 3fa9052ea6..1f504f9fe5 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -563,7 +563,7 @@ "postinstall": "vscode-ext-gen --scope vue" }, "devDependencies": { - "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed", + "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166", "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", "@volar/vscode": "~2.4.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 498c451db0..46c1b25011 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: extensions/vscode: devDependencies: '@kermanx/tree-shaker': - specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed - version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166 + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166 '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -748,32 +748,32 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394} version: 0.0.0 engines: {node: '>= 10'} os: [linux] - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519} + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394} version: 0.0.0 engines: {node: '>= 10'} os: [win32] - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed} + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166} version: 0.0.0 '@lerna-lite/cli@3.10.1': @@ -3737,24 +3737,24 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394': optional: true - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394': optional: true - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394': optional: true - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519': + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394': optional: true - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@182c8ed': + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166': optionalDependencies: - '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 - '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@182c8eded28498ac5dff6bfe94cb33c2eed7f519 - '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@182c8eded28498ac5dff6bfe94cb33c2eed7f519 - '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@182c8eded28498ac5dff6bfe94cb33c2eed7f519 + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394 + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394 + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394 + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394 '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2)': dependencies: From 38eddf30d0af315f99c15559d3064ec25e2e73ba Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 21:47:14 +0800 Subject: [PATCH 11/13] Update tsconfig.json --- tsconfig.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index a273185343..504507e0ea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { + "allowJs": true, "noEmit": true, }, - "include": [ "packages/*/tests" ], + "include": [ + "packages/*/tests", + "extensions/vscode/scripts/build.js", + ], "references": [ { "path": "./extensions/vscode/tsconfig.json" }, { "path": "./packages/language-plugin-pug/tsconfig.json" }, From 0c285d93f07ecaad348c85ee87b4c4f0f81ff902 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 21:48:42 +0800 Subject: [PATCH 12/13] Update build.js --- extensions/vscode/scripts/build.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index 2a2fbcfff1..54935e70c6 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -1,9 +1,11 @@ +// @ts-check const path = require('path'); const fs = require('fs'); -const treeShake = require('@kermanx/tree-shaker').treeShake; +const esbuild = require('esbuild'); +const { treeShake } = require('@kermanx/tree-shaker'); const minify = process.argv.includes('--minify'); -require('esbuild').context({ +esbuild.context({ entryPoints: { 'dist/client': './out/nodeClientMain.js', 'dist/server': './node_modules/@vue/language-server/bin/vue-language-server.js', From 9a08cfa22dcbc0dd85829d58b6a1e544971fd50c Mon Sep 17 00:00:00 2001 From: _Kerman Date: Thu, 26 Dec 2024 21:30:04 +0800 Subject: [PATCH 13/13] fix --- extensions/vscode/package.json | 2 +- extensions/vscode/scripts/build.js | 6 ++--- pnpm-lock.yaml | 42 +++++++++++++++--------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 1f504f9fe5..2c511b4cbd 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -563,7 +563,7 @@ "postinstall": "vscode-ext-gen --scope vue" }, "devDependencies": { - "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166", + "@kermanx/tree-shaker": "https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6", "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", "@volar/vscode": "~2.4.11", diff --git a/extensions/vscode/scripts/build.js b/extensions/vscode/scripts/build.js index 54935e70c6..2266d7abce 100644 --- a/extensions/vscode/scripts/build.js +++ b/extensions/vscode/scripts/build.js @@ -88,10 +88,10 @@ esbuild.context({ if (!minify) { return; } - build.onLoad({ filter: /\.js/ }, ({ path }) => { + build.onLoad({ filter: /\.js$/ }, ({ path }) => { path = path.replace(/\\/g, '/'); - const soruce = fs.readFileSync(path, 'utf-8'); - const { output, diagnostics } = treeShake(soruce, 'recommended', false); + const source = fs.readFileSync(path, 'utf-8'); + const { output, diagnostics } = treeShake(source, 'recommended', false); if (!diagnostics.length) { return { contents: output, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46c1b25011..7799fb0653 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: extensions/vscode: devDependencies: '@kermanx/tree-shaker': - specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166 - version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166 + specifier: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6 + version: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6 '@types/semver': specifier: ^7.5.3 version: 7.5.8 @@ -748,32 +748,32 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394} + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@93d12c6d4de524b41b0bded00e91760e7946cc9b': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@93d12c6d4de524b41b0bded00e91760e7946cc9b} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394} + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@93d12c6d4de524b41b0bded00e91760e7946cc9b': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@93d12c6d4de524b41b0bded00e91760e7946cc9b} version: 0.0.0 engines: {node: '>= 10'} os: [darwin] - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394} + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@93d12c6d4de524b41b0bded00e91760e7946cc9b': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@93d12c6d4de524b41b0bded00e91760e7946cc9b} version: 0.0.0 engines: {node: '>= 10'} os: [linux] - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394} + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@93d12c6d4de524b41b0bded00e91760e7946cc9b': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@93d12c6d4de524b41b0bded00e91760e7946cc9b} version: 0.0.0 engines: {node: '>= 10'} os: [win32] - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166': - resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166} + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6': + resolution: {tarball: https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6} version: 0.0.0 '@lerna-lite/cli@3.10.1': @@ -3737,24 +3737,24 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394': + '@kermanx/tree-shaker-darwin-arm64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@93d12c6d4de524b41b0bded00e91760e7946cc9b': optional: true - '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394': + '@kermanx/tree-shaker-darwin-x64@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@93d12c6d4de524b41b0bded00e91760e7946cc9b': optional: true - '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394': + '@kermanx/tree-shaker-linux-x64-gnu@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@93d12c6d4de524b41b0bded00e91760e7946cc9b': optional: true - '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394': + '@kermanx/tree-shaker-win32-x64-msvc@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@93d12c6d4de524b41b0bded00e91760e7946cc9b': optional: true - '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@37d3166': + '@kermanx/tree-shaker@https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker@93d12c6': optionalDependencies: - '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@37d31663500c3d32b55c820c835e064d4379a394 - '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@37d31663500c3d32b55c820c835e064d4379a394 - '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@37d31663500c3d32b55c820c835e064d4379a394 - '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@37d31663500c3d32b55c820c835e064d4379a394 + '@kermanx/tree-shaker-darwin-arm64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-arm64@93d12c6d4de524b41b0bded00e91760e7946cc9b + '@kermanx/tree-shaker-darwin-x64': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-darwin-x64@93d12c6d4de524b41b0bded00e91760e7946cc9b + '@kermanx/tree-shaker-linux-x64-gnu': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-linux-x64-gnu@93d12c6d4de524b41b0bded00e91760e7946cc9b + '@kermanx/tree-shaker-win32-x64-msvc': https://pkg.pr.new/KermanX/tree-shaker/@kermanx/tree-shaker-win32-x64-msvc@93d12c6d4de524b41b0bded00e91760e7946cc9b '@lerna-lite/cli@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@lerna-lite/version@3.10.1(@lerna-lite/publish@3.10.1(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2))(@types/node@22.10.2)(typescript@5.7.2)': dependencies: