From 483aef4b802b12a2c03942167e0dff0833845b9b Mon Sep 17 00:00:00 2001 From: jacob314 Date: Wed, 18 Feb 2026 18:06:37 -0800 Subject: [PATCH 1/2] build: replace deprecated built-in punycode with userland package Fixes deprecation warning by installing `punycode` userland package and aliasing it in esbuild configs. --- esbuild.config.js | 4 ++++ package-lock.json | 2 +- package.json | 1 + packages/vscode-ide-companion/esbuild.js | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/esbuild.config.js b/esbuild.config.js index 45e17d0b2f6..320d4a4253e 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -88,6 +88,7 @@ const cliConfig = { plugins: createWasmPlugins(), alias: { 'is-in-ci': path.resolve(__dirname, 'packages/cli/src/patches/is-in-ci.ts'), + punycode: 'punycode/', }, metafile: true, }; @@ -103,6 +104,9 @@ const a2aServerConfig = { 'process.env.CLI_VERSION': JSON.stringify(pkg.version), }, plugins: createWasmPlugins(), + alias: { + punycode: 'punycode/', + }, }; Promise.allSettled([ diff --git a/package-lock.json b/package-lock.json index aa298ff4b80..e8417cc3e58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "ink": "npm:@jrichman/ink@6.4.11", "latest-version": "^9.0.0", "proper-lockfile": "^4.1.2", + "punycode": "^2.3.1", "simple-git": "^3.28.0" }, "bin": { @@ -13520,7 +13521,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "devOptional": true, "license": "MIT", "engines": { "node": ">=6" diff --git a/package.json b/package.json index 7df18f24909..ef1791523de 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ "ink": "npm:@jrichman/ink@6.4.11", "latest-version": "^9.0.0", "proper-lockfile": "^4.1.2", + "punycode": "^2.3.1", "simple-git": "^3.28.0" }, "optionalDependencies": { diff --git a/packages/vscode-ide-companion/esbuild.js b/packages/vscode-ide-companion/esbuild.js index 468ba348256..228eb27cdf2 100644 --- a/packages/vscode-ide-companion/esbuild.js +++ b/packages/vscode-ide-companion/esbuild.js @@ -49,6 +49,9 @@ async function main() { define: { 'import.meta.url': 'import_meta.url', }, + alias: { + punycode: 'punycode/', + }, plugins: [ /* add to the end of plugins array */ esbuildProblemMatcherPlugin, From cdbaa33941f097171c3ed5eb5a6642a68f3577d0 Mon Sep 17 00:00:00 2001 From: jacob314 Date: Wed, 18 Feb 2026 18:22:50 -0800 Subject: [PATCH 2/2] refactor(build): consolidate common esbuild aliases --- esbuild.config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/esbuild.config.js b/esbuild.config.js index 320d4a4253e..7bf17ec9daf 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -75,6 +75,10 @@ const baseConfig = { write: true, }; +const commonAliases = { + punycode: 'punycode/', +}; + const cliConfig = { ...baseConfig, banner: { @@ -88,7 +92,7 @@ const cliConfig = { plugins: createWasmPlugins(), alias: { 'is-in-ci': path.resolve(__dirname, 'packages/cli/src/patches/is-in-ci.ts'), - punycode: 'punycode/', + ...commonAliases, }, metafile: true, }; @@ -104,9 +108,7 @@ const a2aServerConfig = { 'process.env.CLI_VERSION': JSON.stringify(pkg.version), }, plugins: createWasmPlugins(), - alias: { - punycode: 'punycode/', - }, + alias: commonAliases, }; Promise.allSettled([