From 23da60c3cb3cc6db38e4c0e5c7605ca638bca47d Mon Sep 17 00:00:00 2001 From: Mingxuan Zhang <132491513+mingxuanzhangsfdx@users.noreply.github.com> Date: Wed, 8 May 2024 13:48:15 -0700 Subject: [PATCH] Chore: update in order to facilitate bundling (#5579) * chore: update for bundling * chore: revert to unbundled versions * chore: apply js esbuild --------- Co-authored-by: Daphne Yang <139700604+daphne-sfdc@users.noreply.github.com> --- package-lock.json | 833 ++++++++++++++++++ .../.eslintrc.json | 17 +- .../esbuild.config.js | 46 + .../package.json | 3 +- .../.eslintrc.json | 17 +- .../esbuild.config.js | 46 + .../package.json | 3 +- .../salesforcedx-vscode-apex/.eslintrc.json | 17 +- .../esbuild.config.js | 48 + .../salesforcedx-vscode-apex/package.json | 3 +- .../salesforcedx-vscode-core/.eslintrc.json | 17 +- .../esbuild.config.js | 51 ++ .../salesforcedx-vscode-core/package.json | 3 +- .../.eslintrc.json | 17 +- .../esbuild.config.js | 48 + .../package.json | 3 +- .../salesforcedx-vscode-lwc/.eslintrc.json | 17 +- .../salesforcedx-vscode-lwc/esbuild.config.js | 50 ++ packages/salesforcedx-vscode-lwc/package.json | 3 +- .../salesforcedx-vscode-soql/.eslintrc.json | 17 +- .../esbuild.config.js | 51 ++ .../salesforcedx-vscode-soql/package.json | 3 +- 22 files changed, 1278 insertions(+), 35 deletions(-) create mode 100644 packages/salesforcedx-vscode-apex-debugger/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-apex-replay-debugger/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-apex/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-core/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-lightning/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-lwc/esbuild.config.js create mode 100644 packages/salesforcedx-vscode-soql/esbuild.config.js diff --git a/package-lock.json b/package-lock.json index 558bbc19ad..4da957a364 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1341,6 +1341,22 @@ "node": ">= 12.0.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.15.10", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.10.tgz", @@ -1357,6 +1373,150 @@ "node": ">=12" } }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/linux-loong64": { "version": "0.15.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", @@ -1373,6 +1533,182 @@ "node": ">=12" } }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -36692,6 +37028,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -36730,6 +37067,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -36746,12 +37084,82 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-apex-debugger/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-apex-debugger/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-apex-debugger/node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", "dev": true }, + "packages/salesforcedx-vscode-apex-debugger/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-apex-replay-debugger": { "version": "60.12.0", "license": "BSD-3-Clause", @@ -36778,6 +37186,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -36794,12 +37203,114 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-apex-replay-debugger/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-apex-replay-debugger/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-apex-replay-debugger/node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", "dev": true }, + "packages/salesforcedx-vscode-apex-replay-debugger/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "packages/salesforcedx-vscode-apex/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-apex/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-apex/node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", @@ -36816,6 +37327,44 @@ "@types/node": "*" } }, + "packages/salesforcedx-vscode-apex/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-apex/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -36930,6 +37479,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -36956,6 +37506,38 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-core/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-core/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-core/node_modules/@salesforce/ts-types": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/@salesforce/ts-types/-/ts-types-2.0.9.tgz", @@ -37019,6 +37601,44 @@ "diagnostic-channel": "*" } }, + "packages/salesforcedx-vscode-core/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-core/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -37093,6 +37713,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -37113,6 +37734,38 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-lightning/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-lightning/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-lightning/node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", @@ -37152,6 +37805,44 @@ "diagnostic-channel": "*" } }, + "packages/salesforcedx-vscode-lightning/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-lightning/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -37204,6 +37895,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -37228,6 +37920,38 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-lwc/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-lwc/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-lwc/node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", @@ -37267,6 +37991,44 @@ "diagnostic-channel": "*" } }, + "packages/salesforcedx-vscode-lwc/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-lwc/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -37326,6 +38088,7 @@ "chai": "^4.0.2", "cross-env": "5.2.0", "debounce": "^1.2.0", + "esbuild": "^0.19.5", "eslint": "8.23.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -37348,6 +38111,38 @@ "vscode": "^1.82.0" } }, + "packages/salesforcedx-vscode-soql/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/salesforcedx-vscode-soql/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "packages/salesforcedx-vscode-soql/node_modules/@salesforce/apex-tmlanguage": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@salesforce/apex-tmlanguage/-/apex-tmlanguage-1.6.0.tgz", @@ -37733,6 +38528,44 @@ "semver": "bin/semver" } }, + "packages/salesforcedx-vscode-soql/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "packages/salesforcedx-vscode-soql/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", diff --git a/packages/salesforcedx-vscode-apex-debugger/.eslintrc.json b/packages/salesforcedx-vscode-apex-debugger/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-apex-debugger/.eslintrc.json +++ b/packages/salesforcedx-vscode-apex-debugger/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex-debugger/esbuild.config.js b/packages/salesforcedx-vscode-apex-debugger/esbuild.config.js new file mode 100644 index 0000000000..49c13bde61 --- /dev/null +++ b/packages/salesforcedx-vscode-apex-debugger/esbuild.config.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +// Configure and run the build process +const sharedConfig = { + bundle: true, // Bundle all dependencies into one file + format: 'cjs', // Output format (CommonJS) + platform: 'node', // Platform target (Node.js) + minify: true, // Minify the output + external: [ + 'vscode', + '@salesforce/core', + '@salesforce/source-tracking' + ] +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex-debugger/package.json b/packages/salesforcedx-vscode-apex-debugger/package.json index 1218af6f2b..b53ec70306 100644 --- a/packages/salesforcedx-vscode-apex-debugger/package.json +++ b/packages/salesforcedx-vscode-apex-debugger/package.json @@ -40,6 +40,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -59,7 +60,7 @@ "scripts": { "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", "bundle:extension:copy": "cp ../salesforcedx-apex-debugger/dist/apexdebug.js ./dist/", - "bundle:extension:build": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:@salesforce/source-tracking --minify", + "bundle:extension:build": "node ./esbuild.config.js", "vscode:prepublish": "npm prune --production", "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", diff --git a/packages/salesforcedx-vscode-apex-replay-debugger/.eslintrc.json b/packages/salesforcedx-vscode-apex-replay-debugger/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-apex-replay-debugger/.eslintrc.json +++ b/packages/salesforcedx-vscode-apex-replay-debugger/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex-replay-debugger/esbuild.config.js b/packages/salesforcedx-vscode-apex-replay-debugger/esbuild.config.js new file mode 100644 index 0000000000..78537f3f10 --- /dev/null +++ b/packages/salesforcedx-vscode-apex-replay-debugger/esbuild.config.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + external: [ + 'vscode', + '@salesforce/core', + '@salesforce/source-tracking', + 'applicationinsights' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex-replay-debugger/package.json b/packages/salesforcedx-vscode-apex-replay-debugger/package.json index 684991cfb0..24f35d7f4d 100644 --- a/packages/salesforcedx-vscode-apex-replay-debugger/package.json +++ b/packages/salesforcedx-vscode-apex-replay-debugger/package.json @@ -203,6 +203,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -263,7 +264,7 @@ }, "scripts": { "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", - "bundle:extension:build": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:@salesforce/source-tracking --external:applicationinsights --minify", + "bundle:extension:build": "node ./esbuild.config.js", "bundle:extension:copy": "cp ../salesforcedx-apex-replay-debugger/dist/apexreplaydebug.js ./dist/", "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", "compile": "tsc -p ./", diff --git a/packages/salesforcedx-vscode-apex/.eslintrc.json b/packages/salesforcedx-vscode-apex/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-apex/.eslintrc.json +++ b/packages/salesforcedx-vscode-apex/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex/esbuild.config.js b/packages/salesforcedx-vscode-apex/esbuild.config.js new file mode 100644 index 0000000000..74e0181a43 --- /dev/null +++ b/packages/salesforcedx-vscode-apex/esbuild.config.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + external: [ + 'vscode', + '@salesforce/core', + 'applicationinsights', + 'shelljs', + '@salesforce/source-deploy-retrieve', + '@salesforce/source-tracking' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-apex/package.json b/packages/salesforcedx-vscode-apex/package.json index bf8160544f..6c6b3f0778 100644 --- a/packages/salesforcedx-vscode-apex/package.json +++ b/packages/salesforcedx-vscode-apex/package.json @@ -344,6 +344,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -410,7 +411,7 @@ }, "scripts": { "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", - "bundle:extension:build": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:applicationinsights --external:shelljs --external:@salesforce/source-deploy-retrieve --external:@salesforce/source-tracking --minify", + "bundle:extension:build": "node ./esbuild.config.js", "bundle:extension:copy": "cp ./out/apex-jorje-lsp.jar ./dist/", "clean": "shx rm -rf node_modules && cd out && node ../../../scripts/clean-all-but-jar.js && shx rm -rf coverage && shx rm -rf .nyc_output", "compile": "tsc -p ./", diff --git a/packages/salesforcedx-vscode-core/.eslintrc.json b/packages/salesforcedx-vscode-core/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-core/.eslintrc.json +++ b/packages/salesforcedx-vscode-core/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-core/esbuild.config.js b/packages/salesforcedx-vscode-core/esbuild.config.js new file mode 100644 index 0000000000..51b50b0c4a --- /dev/null +++ b/packages/salesforcedx-vscode-core/esbuild.config.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + external: [ + 'vscode', + 'applicationinsights', + 'shelljs', + '@salesforce/core', + '@salesforce/source-tracking', + '@salesforce/templates', + '@salesforce/source-deploy-retrieve' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})() + .then(async () => { + // await copyFiles(srcPath, destPath); + }) + .catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-core/package.json b/packages/salesforcedx-vscode-core/package.json index 03fac78130..a4d08c47c5 100644 --- a/packages/salesforcedx-vscode-core/package.json +++ b/packages/salesforcedx-vscode-core/package.json @@ -58,6 +58,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -107,7 +108,7 @@ } }, "scripts": { - "bundle:extension": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:applicationinsights --external:shelljs --external:@salesforce/source-tracking --external:@salesforce/templates --external:@salesforce/source-deploy-retrieve --minify", + "bundle:extension": "node ./esbuild.config.js", "vscode:prepublish": "npm prune --production", "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", diff --git a/packages/salesforcedx-vscode-lightning/.eslintrc.json b/packages/salesforcedx-vscode-lightning/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-lightning/.eslintrc.json +++ b/packages/salesforcedx-vscode-lightning/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-lightning/esbuild.config.js b/packages/salesforcedx-vscode-lightning/esbuild.config.js new file mode 100644 index 0000000000..141598ef36 --- /dev/null +++ b/packages/salesforcedx-vscode-lightning/esbuild.config.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + external: [ + 'vscode', + '@salesforce/core', + '@salesforce/source-tracking', + 'applicationinsights', + '@salesforce/lightning-lsp-common', + '@salesforce/aura-language-server' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-lightning/package.json b/packages/salesforcedx-vscode-lightning/package.json index 9ac7f216dd..f2d86160fd 100644 --- a/packages/salesforcedx-vscode-lightning/package.json +++ b/packages/salesforcedx-vscode-lightning/package.json @@ -44,6 +44,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -64,7 +65,7 @@ "salesforce.salesforcedx-vscode-core" ], "scripts": { - "bundle:extension": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:@salesforce/source-tracking --external:applicationinsights --external:@salesforce/lightning-lsp-common --external:@salesforce/aura-language-server --minify", + "bundle:extension": "node ./esbuild.config.js", "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", "compile": "tsc -p ./", "lint": "eslint .", diff --git a/packages/salesforcedx-vscode-lwc/.eslintrc.json b/packages/salesforcedx-vscode-lwc/.eslintrc.json index a8b986b195..5b59dce583 100644 --- a/packages/salesforcedx-vscode-lwc/.eslintrc.json +++ b/packages/salesforcedx-vscode-lwc/.eslintrc.json @@ -1,12 +1,21 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-lwc/esbuild.config.js b/packages/salesforcedx-vscode-lwc/esbuild.config.js new file mode 100644 index 0000000000..171c607e38 --- /dev/null +++ b/packages/salesforcedx-vscode-lwc/esbuild.config.js @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + loader: { '.node': 'file' }, + external: [ + 'vscode', + '@salesforce/core', + '@salesforce/source-tracking', + 'applicationinsights', + '@salesforce/lightning-lsp-common', + '@salesforce/lwc-language-server', + '@babel/preset-typescript/package.json' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-lwc/package.json b/packages/salesforcedx-vscode-lwc/package.json index 6d5788bf82..6752c2c257 100644 --- a/packages/salesforcedx-vscode-lwc/package.json +++ b/packages/salesforcedx-vscode-lwc/package.json @@ -401,6 +401,7 @@ "@typescript-eslint/parser": "6.9.0", "chai": "^4.0.2", "cross-env": "5.2.0", + "esbuild": "^0.19.5", "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -474,7 +475,7 @@ "url": "https://github.com/forcedotcom/salesforcedx-vscode" }, "scripts": { - "bundle:extension": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --loader:.node=file --external:vscode --external:@salesforce/core --external:@salesforce/source-tracking --external:applicationinsights --external:@salesforce/lightning-lsp-common --external:@salesforce/lwc-language-serve --external:@babel/preset-typescript/package.json --minify", + "bundle:extension": "node ./esbuild.config.js", "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", "compile": "tsc -p ./", "lint": "eslint .", diff --git a/packages/salesforcedx-vscode-soql/.eslintrc.json b/packages/salesforcedx-vscode-soql/.eslintrc.json index 65461bff09..a697ac1df5 100644 --- a/packages/salesforcedx-vscode-soql/.eslintrc.json +++ b/packages/salesforcedx-vscode-soql/.eslintrc.json @@ -1,9 +1,15 @@ { "root": true, - "extends": ["../../config/base-eslintrc.json", "./fix-these-rules.json"], + "extends": [ + "../../config/base-eslintrc.json", + "./fix-these-rules.json" + ], "overrides": [ { - "files": ["./src/**/*.ts", "./test/**/*.ts"], + "files": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], "parserOptions": { "project": "./tsconfig.json" }, @@ -11,5 +17,8 @@ "@typescript-eslint/restrict-plus-operands": "warn" } } - ] -} + ], + "env": { + "node": true + } +} \ No newline at end of file diff --git a/packages/salesforcedx-vscode-soql/esbuild.config.js b/packages/salesforcedx-vscode-soql/esbuild.config.js new file mode 100644 index 0000000000..5164ab9e47 --- /dev/null +++ b/packages/salesforcedx-vscode-soql/esbuild.config.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { build } = require('esbuild'); +// const fs = require('fs').promises; + +const sharedConfig = { + bundle: true, + format: 'cjs', + platform: 'node', + external: [ + 'vscode', + '@salesforce/core', + '@salesforce/source-tracking', + 'applicationinsights', + 'shelljs', + '@salesforce/soql-model', + '@salesforce/soql-language-server', + '@salesforce/soql-data-view', + '@salesforce/soql-builder-ui' + ], + minify: true +}; + +// copy core-bundle/lib/transformStream.js to dist if core-bundle is included +// const copyFiles = async (src, dest) => { +// try { +// // Copy the file +// await fs.copyFile(src, dest); +// console.log(`File was copied from ${src} to ${dest}`); +// } catch (error) { +// console.error('An error occurred:', error); +// } +// }; + +// const srcPath = '../../node_modules/@salesforce/core-bundle/lib/transformStream.js'; +// const destPath = './dist/transformStream.js'; + +(async () => { + await build({ + ...sharedConfig, + entryPoints: ['./src/index.ts'], + outfile: 'dist/index.js' + }); +})().then(async () => { + // await copyFiles(srcPath, destPath); +}).catch(() => process.exit(1)); \ No newline at end of file diff --git a/packages/salesforcedx-vscode-soql/package.json b/packages/salesforcedx-vscode-soql/package.json index dfbc1c0eec..5e2781ed97 100644 --- a/packages/salesforcedx-vscode-soql/package.json +++ b/packages/salesforcedx-vscode-soql/package.json @@ -60,6 +60,7 @@ "chai": "^4.0.2", "cross-env": "5.2.0", "debounce": "^1.2.0", + "esbuild": "^0.19.5", "eslint": "8.23.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-header": "3.1.1", @@ -82,7 +83,7 @@ "salesforce.salesforcedx-vscode-core" ], "scripts": { - "bundle:extension": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --external:vscode --external:@salesforce/core --external:@salesforce/source-tracking --external:applicationinsights --external:shelljs --external:@salesforce/soql-model --external:@salesforce/soql-language-server --external:@salesforce/soql-data-view --external:@salesforce/soql-builder-ui --minify", + "bundle:extension": "node ./esbuild.config.js", "build": "npm run compile", "compile": "tsc -p ./", "lint": "eslint .",