From c43500c50b3184802ac45135c8d0fd4cb665c9be Mon Sep 17 00:00:00 2001 From: Jacob Richman Date: Wed, 18 Feb 2026 18:58:26 -0800 Subject: [PATCH] build: replace deprecated built-in punycode with userland package (#19502) --- esbuild.config.js | 6 ++++++ package-lock.json | 2 +- package.json | 1 + packages/vscode-ide-companion/esbuild.js | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/esbuild.config.js b/esbuild.config.js index 45e17d0b2f..7bf17ec9da 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,6 +92,7 @@ const cliConfig = { plugins: createWasmPlugins(), alias: { 'is-in-ci': path.resolve(__dirname, 'packages/cli/src/patches/is-in-ci.ts'), + ...commonAliases, }, metafile: true, }; @@ -103,6 +108,7 @@ const a2aServerConfig = { 'process.env.CLI_VERSION': JSON.stringify(pkg.version), }, plugins: createWasmPlugins(), + alias: commonAliases, }; Promise.allSettled([ diff --git a/package-lock.json b/package-lock.json index aa298ff4b8..e8417cc3e5 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 7df18f2490..ef1791523d 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 468ba34825..228eb27cdf 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,