Bump bundled execa from ^6.1.0 to ^9.5.3#13806
Open
kirkouimet wants to merge 1 commit intocloudflare:mainfrom
Open
Bump bundled execa from ^6.1.0 to ^9.5.3#13806kirkouimet wants to merge 1 commit intocloudflare:mainfrom
kirkouimet wants to merge 1 commit intocloudflare:mainfrom
Conversation
Resolves Node 24 DEP0190 deprecation warning on wrangler invocations. execa 6.1.0 is the highest 6.x ever published and predates the fix from sindresorhus/execa#1199, which landed in execa 9.5.3. All wrangler call sites use APIs that are stable across the 6 to 9 transition. Verified locally: - pnpm check:type passes - pnpm type:tests passes - src/__tests__/init.test.ts (21 tests) passes - src/__tests__/package-manager.test.ts (8 tests) passes - src/__tests__/custom-build.test.ts (6 tests) passes - src/__tests__/pages/deploy.test.ts (62 tests) passes - Smoke test: wrangler build with [build] command no longer emits DEP0190
🦋 Changeset detectedLatest commit: 242ed0b The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Heads up
This is an opportunistic hygiene PR. The motivating CI warning that started this investigation turned out to be coming from
@opennextjs/cloudflare, not from wrangler — that fix is at opennextjs-cloudflare#1248. So this PR isn't fixing any user-reported issue. Take it or leave it — happy to close if it's not worth the review cycles.That said, the work is done and the fix is real for anyone using a wrangler
[build] command = "..."config under Node 22+, so figured I'd share.Background
Per #13805,
wranglerbundlesexeca@^6.1.0.execa@6.1.0is the highest 6.x ever published and predates the Node 24DEP0190workaround, which only landed inexeca@9.5.3(sindresorhus/execa#1199). The fix concatenates command + args into a single string before handing off tonode:child_processwhenshell: trueis set, so the runtime doesn't see the deprecated args-array-with-shell pattern.In the wrangler tree,
shell: trueonly appears inpackages/wrangler/src/deployment-bundle/run-custom-build.ts, so the warning fires when a[build] command = "..."runs under Node 22+. Bumping to execa 9 silences it.Audit
execais imported in three production files:init.ts:139execa(packageManager.type, c3Arguments, { stdio })+childProcess.stdout?.pipe(...)(immediate) +e as ExecaError/.shortMessageExecaErrorandshortMessagestill exported in execa 9 final-error.d.tspackage-manager.ts:110execaCommandSync(\${name} --version`, { stdio: "ignore" })`execaCommandSyncstill exported in execa 9deployment-bundle/run-custom-build.ts:21execaCommand(command, { shell: true, cwd, env })+ immediate.pipe()toWritableexecaCommandstill exported;.pipe()happens immediately so the #658 timing constraint is metBreaking changes that don't affect us:
error.killed → error.isTerminated(not accessed),signal → cancelSignaloption (not used),encodingvalue renames (default),Buffer → Uint8Arrayfor'buffer'encoding (not used),subprocess.cancel()removal (not used),execPath → nodePath(not used), serialization default (not used).Breaking change to be aware of: dropped support for Node
<18.19.0and20.0.0–20.4.0. Wrangler'sengines.nodeis already>=22.0.0, so this is a no-op.Test plan
Verified locally on macOS 14, Node 24.14.1, pnpm 10.33.0:
pnpm check:typepassespnpm type:testspassessrc/__tests__/init.test.ts— 21 tests passsrc/__tests__/package-manager.test.ts— 8 tests passsrc/__tests__/autoconfig/details/framework-detection/package-manager-detection.test.ts— 5 tests passsrc/__tests__/custom-build.test.ts— 6 tests passsrc/__tests__/pages/deploy.test.ts— 62 tests passoxfmt --checkpasseswrangler buildagainst a project with[build] command = "echo hello"on Node 24 — no DEP0190 emitted (was emitted with old execa)