Skip to content

module: remove --experimental-transform-types - #61803

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:rip-transform-type
Feb 27, 2026
Merged

module: remove --experimental-transform-types#61803
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:rip-transform-type

Conversation

@marco-ippolito

@marco-ippolito marco-ippolito commented Feb 13, 2026

Copy link
Copy Markdown
Member

This PR removes the --experimental-transform-types flag and all related code, tests, and documentation.

Refs: nodejs/typescript#51

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/loaders
  • @nodejs/performance
  • @nodejs/startup
  • @nodejs/typescript

@marco-ippolito marco-ippolito added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 13, 2026
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Feb 13, 2026
@marco-ippolito marco-ippolito added module Issues and PRs related to the module subsystem. strip-types Issues and PRs related to TypeScript type stripping. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Feb 13, 2026
@GeoffreyBooth

Copy link
Copy Markdown
Member

process.features.typescript now only returns a boolean

I think we should add process.features.stripTypes that returns a boolean. This should be a separate PR so that it can be backported.

Then the question becomes what to do with process.features.typescript. I think having a feature called typescript only makes sense if the overall feature has various modes, like currently it's either off (false), strip or transform. But we might someday add other TypeScript-related features like type checking, or tsconfig.json support, or support for various features within tsconfig.json; and these might be individual features to be toggled on or off (like maybe a user enables tsconfig.json paths support but not type checking) and so a single string value for an overall mode doesn't make sense. We could make process.features.typescript a Record<string, boolean> so that there's something like process.features.typescript.strip === true and other features add onto there, or treat each new TypeScript-related feature as a top-level key on process.features.

For the purposes of this PR, perhaps the simplest thing to do would be to just keep process.features.typescript as it is but remove transform as a possible return type. Then a redesign of process.features.typescript can happen in a dedicated PR.

@marco-ippolito

Copy link
Copy Markdown
Member Author

User can run --no-strip-types so typescript might not be enabled

@aduh95

aduh95 commented Feb 13, 2026

Copy link
Copy Markdown
Contributor
  • process.features.typescript now only returns a boolean.

I wouldn't do that:

  • it's perfectly workable as is, as a string
  • if we end up re-introducing --transform-type or another type of typescript handling, it will put us in an awkard position.

Why risk it?

@styfle

styfle commented Feb 13, 2026

Copy link
Copy Markdown
Member

if we end up re-introducing --transform-type or another type of typescript handling, it will put us in an awkard position.

If we think thats a possibility in the future, then we should keep process.features.typescript as a string and also keep the options object in stripTypeScriptTypes() so we can allow strip but throw and error for other modes.

TLDR - keep this semver-major change as breaking only for those using transform but anyone using strip should not have a breaking change. Does that make sense?

@codecov

codecov Bot commented Feb 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.66%. Comparing base (da5efc4) to head (1708c57).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/modules/typescript.js 75.00% 1 Missing ⚠️
src/compile_cache.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61803      +/-   ##
==========================================
+ Coverage   88.84%   89.66%   +0.82%     
==========================================
  Files         674      676       +2     
  Lines      204957   205951     +994     
  Branches    39309    39434     +125     
==========================================
+ Hits       182087   184670    +2583     
+ Misses      15088    13426    -1662     
- Partials     7782     7855      +73     
Files with missing lines Coverage Δ
lib/internal/bootstrap/node.js 98.96% <100.00%> (-0.01%) ⬇️
src/compile_cache.h 100.00% <ø> (ø)
src/node_options.cc 76.32% <ø> (-0.05%) ⬇️
lib/internal/modules/typescript.js 92.30% <75.00%> (-5.18%) ⬇️
src/compile_cache.cc 79.09% <0.00%> (-1.64%) ⬇️

... and 210 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeoffreyBooth

Copy link
Copy Markdown
Member

This PR's goal is to remove transform-types. So in this PR, I think just remove the transform response from process.features.typescript. Any other rethinking or redesign of that property can come in a follow-up PR.

@marco-ippolito

Copy link
Copy Markdown
Member Author

Applied suggestions, only remove transform related stuff

@ljharb ljharb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

@marco-ippolito

Copy link
Copy Markdown
Member Author

Cna someone help me understand the CI failure?

@Renegade334

Renegade334 commented Feb 25, 2026

Copy link
Copy Markdown
Member

Cna someone help me understand the CI failure?

The --[experimental-]strip-types CLI flag needs to be reintroduced here:

https://github.com/nodejs/node/blob/50a77dbaa26fd58460d1bee1de317047d1462a5f/test/parallel/test-runner-cli.js#L67-L68

@aduh95

aduh95 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Cna someone help me understand the CI failure?

The --experimental-strip-types CLI flag needs to be reintroduced here:

That doesn't really make sense, type stripping has been unflagged for a while, that flag is now a no-op. The issue seems to be that the following branch is no longer needed:

https://github.com/nodejs/node/blob/50a77dbaa26fd58460d1bee1de317047d1462a5f/test/parallel/test-runner-cli.js#L71-L74

RafaelGSS added a commit that referenced this pull request Apr 28, 2026
assert:
  * (SEMVER-MAJOR) allow printf-style messages as assertion error (Ruben Bridgewater) #58849
build:
  * (SEMVER-MAJOR) bump GCC requirement to 13.2 (Michaël Zasso) #62555
  * (SEMVER-MAJOR) enable Temporal by default (Richard Lau) #61806
  * (SEMVER-MAJOR) enable V8_VERIFY_WRITE_BARRIERS in debug build (Joyee Cheung) #61898
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #61898
  * (SEMVER-MAJOR) target Power 9 for AIX/IBM i (Richard Lau) #62296
  * (SEMVER-MAJOR) drop support for Python 3.9 (Mike McCready) #61177
  * (SEMVER-MAJOR) enable maglev for Linux on s390x (Richard Lau) #60863
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60488
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60111
build,test:
  * (CVE-2026-21717) (SEMVER-MAJOR) test array index hash collision (Joyee Cheung) #61898
build,win:
  * (SEMVER-MAJOR) fix Temporal build (StefanStojanovic) #61806
crypto:
  * (SEMVER-MAJOR) unify asymmetric key import through KeyObjectHandle::Init (Filip Skokan) #62499
  * (SEMVER-MAJOR) runtime-deprecate DEP0203 and DEP0204 (Filip Skokan) #62453
  * (SEMVER-MAJOR) decorate async crypto job errors with OpenSSL error details (Filip Skokan) #62348
  * (SEMVER-MAJOR) default ML-KEM and ML-DSA pkcs8 export to seed-only format (Filip Skokan) #62178
  * (SEMVER-MAJOR) move DEP0182 to End-of-Life (Tobias Nießen) #61084
  * (SEMVER-MAJOR) fix DOMException name for non-extractable key error (Filip Skokan) #60830
deps:
  * (SEMVER-MAJOR) fix V8 race condition for AIX (Abdirahim Musse) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cd2c216e7658 (LuYahan) #61898
  * (SEMVER-MAJOR) V8: backport 088b7112e7ab (Igor Sheludko) #61898
  * (SEMVER-MAJOR) V8: cherry-pick 00f6e834029f (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: backport bef0d9c1bc90 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cf1bce40a5ef (Richard Lau) #61898
  * (SEMVER-MAJOR) V8: cherry-pick daf4656ba85e (Milad Fa) #61898
  * (SEMVER-MAJOR) V8: cherry-pick d83f479604c8 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick edeb0a4fa181 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick aa0b288f87cc (Richard Lau) #61898
  * (SEMVER-MAJOR) patch V8 to fix Windows build (StefanStojanovic) #61898
  * (SEMVER-MAJOR) V8: cherry-pick highway@989a498fdf3 (Richard Lau) #61898
  * (SEMVER-MAJOR) support madvise(3C) across ALL illumos revisions (Dan McDonald) #61898
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #61898
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #61898
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #61898
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 to 14.6.202.33 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update undici to 8.0.2 (Node.js GitHub Bot) #62384
  * (SEMVER-MAJOR) V8: backport 151d0a44a1b2 (Abdirahim Musse) #60488
  * (SEMVER-MAJOR) V8: cherry-pick 47800791b35c (Jakob Kummerow) #60488
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.3.127.12 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) V8: cherry-pick ff34ae20c8e3 (Chengzhong Wu) #60111
  * (SEMVER-MAJOR) V8: backport fed47445bbdd (Abdirahim Musse) #60111
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.2.231.9 (Michaël Zasso) #60111
diagnostics_channel:
  * (SEMVER-MAJOR) ensure tracePromise consistency with non-Promises (René) #61766
doc:
  * (SEMVER-MAJOR) remove extensionless CJS exception for type:module packages (Matteo Collina) #62176
  * (SEMVER-MAJOR) update supported Windows SDK version to 11 (Mike McCready) #61973
  * (SEMVER-MAJOR) drop p8 and z13 support (Milad Fa) #61005
http:
  * (SEMVER-MAJOR) move writeHeader to end-of-life (Sebastian Beltran) #60635
  * (SEMVER-MAJOR) fix handling of HTTP upgrades with bodies (Tim Perry) #60016
lib:
  * (SEMVER-MAJOR) return undefined for localStorage without file (Matteo Collina) #61333
lib,src:
  * (SEMVER-MAJOR) implement QuotaExceededError as DOMException-derived interface (Filip Skokan) #62293
module:
  * (SEMVER-MAJOR) runtime-deprecate module.register() (Geoffrey Booth) #62401
  * (SEMVER-MAJOR) remove --experimental-transform-types (Marco Ippolito) #61803
src:
  * (SEMVER-MAJOR) replace uses of deprecated v8::External APIs (gahaas) #61898
  * (SEMVER-MAJOR) stop using `v8::PropertyCallbackInfo<T>::This()` (Igor Sheludko) #61898
  * (SEMVER-MAJOR) avoid deprecated Wasm API (Clemens Backes) #61898
  * (SEMVER-MAJOR) avoid deprecated `FixedArray::Get` (Clemens Backes) #61898
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 147 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) remove deprecated and unused isolate fields (Michaël Zasso) #60488
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 144 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) include `node_api_types.h` instead of `node_api.h` in `node.h` (Anna Henningsen) #60496
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 142 (Michaël Zasso) #60111
stream:
  * (SEMVER-MAJOR) promote DEP0201 to runtime deprecation (René) #62173
  * (SEMVER-MAJOR) move _stream_* to end-of-life (Sebastian Beltran) #60657
  * (SEMVER-MAJOR) readable read one buffer at a time (Robert Nagy) #60441
  * (SEMVER-MAJOR) preserve AsyncLocalStorage on finished only when needed (avcribl) #59873
test:
  * (SEMVER-MAJOR) skip wasm allocation tests in workers (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update wpt Wasm jsapi expectations (Michaël Zasso) #61898
  * (SEMVER-MAJOR) support presence of Temporal global (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add type tags to uses of v8::External (gahaas) #61898
  * (SEMVER-MAJOR) fix test-linux-perf-logger for V8 14.3 (Michaël Zasso) #60488
tools:
  * (SEMVER-MAJOR) remove v8_initializers_slow workaround from v8.gyp (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add Rust args to `tools/make-v8.sh` (Richard Lau) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.6 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.5 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.4 (Michaël Zasso) #61898
util:
  * (SEMVER-MAJOR) mark proxied objects as such when inspecting them (Ruben Bridgewater) #61029
  * (SEMVER-MAJOR) reduce TextEncoder.encodeInto function size (Yagiz Nizipli) #60339

PR-URL: #62526
RafaelGSS added a commit that referenced this pull request Apr 28, 2026
assert:
  * (SEMVER-MAJOR) allow printf-style messages as assertion error (Ruben Bridgewater) #58849
build:
  * (SEMVER-MAJOR) bump GCC requirement to 13.2 (Michaël Zasso) #62555
  * (SEMVER-MAJOR) enable Temporal by default (Richard Lau) #61806
  * (SEMVER-MAJOR) enable V8_VERIFY_WRITE_BARRIERS in debug build (Joyee Cheung) #61898
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #61898
  * (SEMVER-MAJOR) target Power 9 for AIX/IBM i (Richard Lau) #62296
  * (SEMVER-MAJOR) drop support for Python 3.9 (Mike McCready) #61177
  * (SEMVER-MAJOR) enable maglev for Linux on s390x (Richard Lau) #60863
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60488
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60111
build,test:
  * (CVE-2026-21717) (SEMVER-MAJOR) test array index hash collision (Joyee Cheung) #61898
build,win:
  * (SEMVER-MAJOR) fix Temporal build (StefanStojanovic) #61806
crypto:
  * (SEMVER-MAJOR) unify asymmetric key import through KeyObjectHandle::Init (Filip Skokan) #62499
  * (SEMVER-MAJOR) runtime-deprecate DEP0203 and DEP0204 (Filip Skokan) #62453
  * (SEMVER-MAJOR) decorate async crypto job errors with OpenSSL error details (Filip Skokan) #62348
  * (SEMVER-MAJOR) default ML-KEM and ML-DSA pkcs8 export to seed-only format (Filip Skokan) #62178
  * (SEMVER-MAJOR) move DEP0182 to End-of-Life (Tobias Nießen) #61084
  * (SEMVER-MAJOR) fix DOMException name for non-extractable key error (Filip Skokan) #60830
deps:
  * (SEMVER-MAJOR) fix V8 race condition for AIX (Abdirahim Musse) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cd2c216e7658 (LuYahan) #61898
  * (SEMVER-MAJOR) V8: backport 088b7112e7ab (Igor Sheludko) #61898
  * (SEMVER-MAJOR) V8: cherry-pick 00f6e834029f (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: backport bef0d9c1bc90 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cf1bce40a5ef (Richard Lau) #61898
  * (SEMVER-MAJOR) V8: cherry-pick daf4656ba85e (Milad Fa) #61898
  * (SEMVER-MAJOR) V8: cherry-pick d83f479604c8 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick edeb0a4fa181 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick aa0b288f87cc (Richard Lau) #61898
  * (SEMVER-MAJOR) patch V8 to fix Windows build (StefanStojanovic) #61898
  * (SEMVER-MAJOR) V8: cherry-pick highway@989a498fdf3 (Richard Lau) #61898
  * (SEMVER-MAJOR) support madvise(3C) across ALL illumos revisions (Dan McDonald) #61898
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #61898
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #61898
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #61898
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 to 14.6.202.33 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update undici to 8.0.2 (Node.js GitHub Bot) #62384
  * (SEMVER-MAJOR) V8: backport 151d0a44a1b2 (Abdirahim Musse) #60488
  * (SEMVER-MAJOR) V8: cherry-pick 47800791b35c (Jakob Kummerow) #60488
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.3.127.12 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) V8: cherry-pick ff34ae20c8e3 (Chengzhong Wu) #60111
  * (SEMVER-MAJOR) V8: backport fed47445bbdd (Abdirahim Musse) #60111
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.2.231.9 (Michaël Zasso) #60111
diagnostics_channel:
  * (SEMVER-MAJOR) ensure tracePromise consistency with non-Promises (René) #61766
doc:
  * (SEMVER-MAJOR) remove extensionless CJS exception for type:module packages (Matteo Collina) #62176
  * (SEMVER-MAJOR) update supported Windows SDK version to 11 (Mike McCready) #61973
  * (SEMVER-MAJOR) drop p8 and z13 support (Milad Fa) #61005
http:
  * (SEMVER-MAJOR) move writeHeader to end-of-life (Sebastian Beltran) #60635
  * (SEMVER-MAJOR) fix handling of HTTP upgrades with bodies (Tim Perry) #60016
lib:
  * (SEMVER-MAJOR) return undefined for localStorage without file (Matteo Collina) #61333
lib,src:
  * (SEMVER-MAJOR) implement QuotaExceededError as DOMException-derived interface (Filip Skokan) #62293
module:
  * (SEMVER-MAJOR) runtime-deprecate module.register() (Geoffrey Booth) #62401
  * (SEMVER-MAJOR) remove --experimental-transform-types (Marco Ippolito) #61803
src:
  * (SEMVER-MAJOR) replace uses of deprecated v8::External APIs (gahaas) #61898
  * (SEMVER-MAJOR) stop using `v8::PropertyCallbackInfo<T>::This()` (Igor Sheludko) #61898
  * (SEMVER-MAJOR) avoid deprecated Wasm API (Clemens Backes) #61898
  * (SEMVER-MAJOR) avoid deprecated `FixedArray::Get` (Clemens Backes) #61898
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 147 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) remove deprecated and unused isolate fields (Michaël Zasso) #60488
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 144 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) include `node_api_types.h` instead of `node_api.h` in `node.h` (Anna Henningsen) #60496
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 142 (Michaël Zasso) #60111
stream:
  * (SEMVER-MAJOR) promote DEP0201 to runtime deprecation (René) #62173
  * (SEMVER-MAJOR) move _stream_* to end-of-life (Sebastian Beltran) #60657
  * (SEMVER-MAJOR) readable read one buffer at a time (Robert Nagy) #60441
  * (SEMVER-MAJOR) preserve AsyncLocalStorage on finished only when needed (avcribl) #59873
test:
  * (SEMVER-MAJOR) skip wasm allocation tests in workers (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update wpt Wasm jsapi expectations (Michaël Zasso) #61898
  * (SEMVER-MAJOR) support presence of Temporal global (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add type tags to uses of v8::External (gahaas) #61898
  * (SEMVER-MAJOR) fix test-linux-perf-logger for V8 14.3 (Michaël Zasso) #60488
tools:
  * (SEMVER-MAJOR) remove v8_initializers_slow workaround from v8.gyp (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add Rust args to `tools/make-v8.sh` (Richard Lau) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.6 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.5 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.4 (Michaël Zasso) #61898
util:
  * (SEMVER-MAJOR) mark proxied objects as such when inspecting them (Ruben Bridgewater) #61029
  * (SEMVER-MAJOR) reduce TextEncoder.encodeInto function size (Yagiz Nizipli) #60339

PR-URL: #62526
RafaelGSS added a commit that referenced this pull request May 4, 2026
assert:
  * (SEMVER-MAJOR) allow printf-style messages as assertion error (Ruben Bridgewater) #58849
build:
  * (SEMVER-MAJOR) bump GCC requirement to 13.2 (Michaël Zasso) #62555
  * (SEMVER-MAJOR) enable Temporal by default (Richard Lau) #61806
  * (SEMVER-MAJOR) enable V8_VERIFY_WRITE_BARRIERS in debug build (Joyee Cheung) #61898
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #61898
  * (SEMVER-MAJOR) target Power 9 for AIX/IBM i (Richard Lau) #62296
  * (SEMVER-MAJOR) drop support for Python 3.9 (Mike McCready) #61177
  * (SEMVER-MAJOR) enable maglev for Linux on s390x (Richard Lau) #60863
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60488
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60111
build,test:
  * (CVE-2026-21717) (SEMVER-MAJOR) test array index hash collision (Joyee Cheung) #61898
build,win:
  * (SEMVER-MAJOR) fix Temporal build (StefanStojanovic) #61806
crypto:
  * (SEMVER-MAJOR) unify asymmetric key import through KeyObjectHandle::Init (Filip Skokan) #62499
  * (SEMVER-MAJOR) runtime-deprecate DEP0203 and DEP0204 (Filip Skokan) #62453
  * (SEMVER-MAJOR) decorate async crypto job errors with OpenSSL error details (Filip Skokan) #62348
  * (SEMVER-MAJOR) default ML-KEM and ML-DSA pkcs8 export to seed-only format (Filip Skokan) #62178
  * (SEMVER-MAJOR) move DEP0182 to End-of-Life (Tobias Nießen) #61084
  * (SEMVER-MAJOR) fix DOMException name for non-extractable key error (Filip Skokan) #60830
deps:
  * (SEMVER-MAJOR) V8: cherry-pick 0f024d4e66e0 (ishabi) #62408
  * (SEMVER-MAJOR) fix V8 race condition for AIX (Abdirahim Musse) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cd2c216e7658 (LuYahan) #61898
  * (SEMVER-MAJOR) V8: backport 088b7112e7ab (Igor Sheludko) #61898
  * (SEMVER-MAJOR) V8: cherry-pick 00f6e834029f (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: backport bef0d9c1bc90 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cf1bce40a5ef (Richard Lau) #61898
  * (SEMVER-MAJOR) V8: cherry-pick daf4656ba85e (Milad Fa) #61898
  * (SEMVER-MAJOR) V8: cherry-pick d83f479604c8 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick edeb0a4fa181 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick aa0b288f87cc (Richard Lau) #61898
  * (SEMVER-MAJOR) patch V8 to fix Windows build (StefanStojanovic) #61898
  * (SEMVER-MAJOR) V8: cherry-pick highway@989a498fdf3 (Richard Lau) #61898
  * (SEMVER-MAJOR) support madvise(3C) across ALL illumos revisions (Dan McDonald) #61898
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #61898
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #61898
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #61898
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 to 14.6.202.33 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update undici to 8.0.2 (Node.js GitHub Bot) #62384
  * (SEMVER-MAJOR) V8: backport 151d0a44a1b2 (Abdirahim Musse) #60488
  * (SEMVER-MAJOR) V8: cherry-pick 47800791b35c (Jakob Kummerow) #60488
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.3.127.12 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) V8: cherry-pick ff34ae20c8e3 (Chengzhong Wu) #60111
  * (SEMVER-MAJOR) V8: backport fed47445bbdd (Abdirahim Musse) #60111
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.2.231.9 (Michaël Zasso) #60111
diagnostics_channel:
  * (SEMVER-MAJOR) ensure tracePromise consistency with non-Promises (René) #61766
doc:
  * (SEMVER-MAJOR) remove extensionless CJS exception for type:module packages (Matteo Collina) #62176
  * (SEMVER-MAJOR) update supported Windows SDK version to 11 (Mike McCready) #61973
  * (SEMVER-MAJOR) drop p8 and z13 support (Milad Fa) #61005
http:
  * (SEMVER-MAJOR) move writeHeader to end-of-life (Sebastian Beltran) #60635
  * (SEMVER-MAJOR) fix handling of HTTP upgrades with bodies (Tim Perry) #60016
lib:
  * (SEMVER-MAJOR) return undefined for localStorage without file (Matteo Collina) #61333
lib,src:
  * (SEMVER-MAJOR) implement QuotaExceededError as DOMException-derived interface (Filip Skokan) #62293
module:
  * (SEMVER-MAJOR) runtime-deprecate module.register() (Geoffrey Booth) #62401
  * (SEMVER-MAJOR) remove --experimental-transform-types (Marco Ippolito) #61803
src:
  * (SEMVER-MAJOR) replace uses of deprecated v8::External APIs (gahaas) #61898
  * (SEMVER-MAJOR) stop using `v8::PropertyCallbackInfo<T>::This()` (Igor Sheludko) #61898
  * (SEMVER-MAJOR) avoid deprecated Wasm API (Clemens Backes) #61898
  * (SEMVER-MAJOR) avoid deprecated `FixedArray::Get` (Clemens Backes) #61898
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 147 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) remove deprecated and unused isolate fields (Michaël Zasso) #60488
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 144 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) include `node_api_types.h` instead of `node_api.h` in `node.h` (Anna Henningsen) #60496
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 142 (Michaël Zasso) #60111
stream:
  * (SEMVER-MAJOR) promote DEP0201 to runtime deprecation (René) #62173
  * (SEMVER-MAJOR) move _stream_* to end-of-life (Sebastian Beltran) #60657
  * (SEMVER-MAJOR) readable read one buffer at a time (Robert Nagy) #60441
  * (SEMVER-MAJOR) preserve AsyncLocalStorage on finished only when needed (avcribl) #59873
test:
  * (SEMVER-MAJOR) skip wasm allocation tests in workers (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update wpt Wasm jsapi expectations (Michaël Zasso) #61898
  * (SEMVER-MAJOR) support presence of Temporal global (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add type tags to uses of v8::External (gahaas) #61898
  * (SEMVER-MAJOR) fix test-linux-perf-logger for V8 14.3 (Michaël Zasso) #60488
tools:
  * (SEMVER-MAJOR) remove v8_initializers_slow workaround from v8.gyp (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add Rust args to `tools/make-v8.sh` (Richard Lau) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.6 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.5 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.4 (Michaël Zasso) #61898
util:
  * (SEMVER-MAJOR) mark proxied objects as such when inspecting them (Ruben Bridgewater) #61029
  * (SEMVER-MAJOR) reduce TextEncoder.encodeInto function size (Yagiz Nizipli) #60339

PR-URL: #62526
RafaelGSS added a commit that referenced this pull request May 5, 2026
assert:
  * (SEMVER-MAJOR) allow printf-style messages as assertion error (Ruben Bridgewater) #58849
build:
  * (SEMVER-MAJOR) bump GCC requirement to 13.2 (Michaël Zasso) #62555
  * (SEMVER-MAJOR) enable Temporal by default (Richard Lau) #61806
  * (SEMVER-MAJOR) enable V8_VERIFY_WRITE_BARRIERS in debug build (Joyee Cheung) #61898
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #61898
  * (SEMVER-MAJOR) target Power 9 for AIX/IBM i (Richard Lau) #62296
  * (SEMVER-MAJOR) drop support for Python 3.9 (Mike McCready) #61177
  * (SEMVER-MAJOR) enable maglev for Linux on s390x (Richard Lau) #60863
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60488
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #60111
build,test:
  * (CVE-2026-21717) (SEMVER-MAJOR) test array index hash collision (Joyee Cheung) #61898
build,win:
  * (SEMVER-MAJOR) fix Temporal build (StefanStojanovic) #61806
crypto:
  * (SEMVER-MAJOR) unify asymmetric key import through KeyObjectHandle::Init (Filip Skokan) #62499
  * (SEMVER-MAJOR) runtime-deprecate DEP0203 and DEP0204 (Filip Skokan) #62453
  * (SEMVER-MAJOR) decorate async crypto job errors with OpenSSL error details (Filip Skokan) #62348
  * (SEMVER-MAJOR) default ML-KEM and ML-DSA pkcs8 export to seed-only format (Filip Skokan) #62178
  * (SEMVER-MAJOR) move DEP0182 to End-of-Life (Tobias Nießen) #61084
  * (SEMVER-MAJOR) fix DOMException name for non-extractable key error (Filip Skokan) #60830
deps:
  * (SEMVER-MAJOR) V8: cherry-pick 0f024d4e66e0 (ishabi) #62408
  * (SEMVER-MAJOR) fix V8 race condition for AIX (Abdirahim Musse) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cd2c216e7658 (LuYahan) #61898
  * (SEMVER-MAJOR) V8: backport 088b7112e7ab (Igor Sheludko) #61898
  * (SEMVER-MAJOR) V8: cherry-pick 00f6e834029f (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: backport bef0d9c1bc90 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick cf1bce40a5ef (Richard Lau) #61898
  * (SEMVER-MAJOR) V8: cherry-pick daf4656ba85e (Milad Fa) #61898
  * (SEMVER-MAJOR) V8: cherry-pick d83f479604c8 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick edeb0a4fa181 (Joyee Cheung) #61898
  * (SEMVER-MAJOR) V8: cherry-pick aa0b288f87cc (Richard Lau) #61898
  * (SEMVER-MAJOR) patch V8 to fix Windows build (StefanStojanovic) #61898
  * (SEMVER-MAJOR) V8: cherry-pick highway@989a498fdf3 (Richard Lau) #61898
  * (SEMVER-MAJOR) support madvise(3C) across ALL illumos revisions (Dan McDonald) #61898
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #61898
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #61898
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #61898
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 to 14.6.202.33 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update undici to 8.0.2 (Node.js GitHub Bot) #62384
  * (SEMVER-MAJOR) V8: backport 151d0a44a1b2 (Abdirahim Musse) #60488
  * (SEMVER-MAJOR) V8: cherry-pick 47800791b35c (Jakob Kummerow) #60488
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.3.127.12 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) V8: cherry-pick ff34ae20c8e3 (Chengzhong Wu) #60111
  * (SEMVER-MAJOR) V8: backport fed47445bbdd (Abdirahim Musse) #60111
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) #59805
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) #58070
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) #58070
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
  * (SEMVER-MAJOR) update V8 to 14.2.231.9 (Michaël Zasso) #60111
diagnostics_channel:
  * (SEMVER-MAJOR) ensure tracePromise consistency with non-Promises (René) #61766
doc:
  * (SEMVER-MAJOR) remove extensionless CJS exception for type:module packages (Matteo Collina) #62176
  * (SEMVER-MAJOR) update supported Windows SDK version to 11 (Mike McCready) #61973
  * (SEMVER-MAJOR) drop p8 and z13 support (Milad Fa) #61005
http:
  * (SEMVER-MAJOR) move writeHeader to end-of-life (Sebastian Beltran) #60635
  * (SEMVER-MAJOR) fix handling of HTTP upgrades with bodies (Tim Perry) #60016
lib:
  * (SEMVER-MAJOR) return undefined for localStorage without file (Matteo Collina) #61333
lib,src:
  * (SEMVER-MAJOR) implement QuotaExceededError as DOMException-derived interface (Filip Skokan) #62293
module:
  * (SEMVER-MAJOR) runtime-deprecate module.register() (Geoffrey Booth) #62401
  * (SEMVER-MAJOR) remove --experimental-transform-types (Marco Ippolito) #61803
src:
  * (SEMVER-MAJOR) replace uses of deprecated v8::External APIs (gahaas) #61898
  * (SEMVER-MAJOR) stop using `v8::PropertyCallbackInfo<T>::This()` (Igor Sheludko) #61898
  * (SEMVER-MAJOR) avoid deprecated Wasm API (Clemens Backes) #61898
  * (SEMVER-MAJOR) avoid deprecated `FixedArray::Get` (Clemens Backes) #61898
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 147 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) remove deprecated and unused isolate fields (Michaël Zasso) #60488
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 144 (Michaël Zasso) #60488
  * (SEMVER-MAJOR) include `node_api_types.h` instead of `node_api.h` in `node.h` (Anna Henningsen) #60496
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 142 (Michaël Zasso) #60111
stream:
  * (SEMVER-MAJOR) promote DEP0201 to runtime deprecation (René) #62173
  * (SEMVER-MAJOR) move _stream_* to end-of-life (Sebastian Beltran) #60657
  * (SEMVER-MAJOR) readable read one buffer at a time (Robert Nagy) #60441
  * (SEMVER-MAJOR) preserve AsyncLocalStorage on finished only when needed (avcribl) #59873
test:
  * (SEMVER-MAJOR) skip wasm allocation tests in workers (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update wpt Wasm jsapi expectations (Michaël Zasso) #61898
  * (SEMVER-MAJOR) support presence of Temporal global (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add type tags to uses of v8::External (gahaas) #61898
  * (SEMVER-MAJOR) fix test-linux-perf-logger for V8 14.3 (Michaël Zasso) #60488
tools:
  * (SEMVER-MAJOR) remove v8_initializers_slow workaround from v8.gyp (Michaël Zasso) #61898
  * (SEMVER-MAJOR) add Rust args to `tools/make-v8.sh` (Richard Lau) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.6 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.5 (Michaël Zasso) #61898
  * (SEMVER-MAJOR) update V8 gypfiles for 14.4 (Michaël Zasso) #61898
util:
  * (SEMVER-MAJOR) mark proxied objects as such when inspecting them (Ruben Bridgewater) #61029
  * (SEMVER-MAJOR) reduce TextEncoder.encodeInto function size (Yagiz Nizipli) #60339

PR-URL: #62526
nodejs-github-bot pushed a commit that referenced this pull request Jun 8, 2026
`processTypeScriptCode` does not produce source maps at all for type
stripping. Given that the transform mode was removed, there is no need
to keep the source map support around it.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #63738
Refs: #61803
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 18, 2026
`processTypeScriptCode` does not produce source maps at all for type
stripping. Given that the transform mode was removed, there is no need
to keep the source map support around it.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #63738
Refs: #61803
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
robobun added a commit to oven-sh/bun that referenced this pull request Aug 6, 2026
Node 26 removed the "transform" value (nodejs/node#61803); the getter
returns "strip" by default or false under --no-strip-types. Code
feature-detecting TypeScript support against Node 26 checks for "strip",
so returning "transform" breaks strict comparisons.
robobun added a commit to oven-sh/bun that referenced this pull request Aug 6, 2026
Node 26 removed the "transform" value (nodejs/node#61803); the getter
returns "strip" by default or false under --no-strip-types. Code
feature-detecting TypeScript support against Node 26 checks for "strip",
so returning "transform" breaks strict comparisons.
robobun added a commit to oven-sh/bun that referenced this pull request Aug 6, 2026
Node 26 removed the "transform" value (nodejs/node#61803); the getter
returns "strip" by default or false under --no-strip-types. Code
feature-detecting TypeScript support against Node 26 checks for "strip",
so returning "transform" breaks strict comparisons.
ScriptedAlchemy added a commit to ScriptedAlchemy/agent-bundle that referenced this pull request Sep 4, 2026
… MCP negotiation test; provider-view cross-process coverage (integration) (#554)

* fix(scripts): choose the TypeScript transform flag Node actually supports (Node 26 drops --experimental-transform-types)

runScript spawned every plain .ts script under
node --experimental-transform-types. Node 26 removed the flag
(nodejs/node#61803) and rejects it as a bad option (exit code 9), so the
Verify (Node 26) leg failed on every main push.

typeScriptTransformFlags (core/runtime.ts) decides from
process.allowedNodeEnvironmentFlags: the transform flag where the binary
accepts it (Node 22, 24), nothing on Node 26, which strips types unflagged.
Unit-tested against the flag sets of each release line.

* chore: name #554 in the changeset

* fix(scripts): name --strip-types on Node 26 so an inherited NODE_OPTIONS=--no-strip-types cannot switch TypeScript loading off

Codex review on #554: with no command-line flag the child inherited the
environment's --no-strip-types and failed on every typed .ts source. The
helper now picks the first flag the binary accepts, strongest first:
--experimental-transform-types (22, 24), then --strip-types (26). Covered by
a script-dispatch test that sets the version-appropriate switch in
NODE_OPTIONS and expects the source run to succeed regardless.

* test(routes): prove the provider request view across built surfaces; fix framework-mode.md ordering (from #556)

* fix(install): apply the operator .env layer before plugin modules evaluate and below manifest env defaults (#469)

Two findings from the #538 self-review.

Precedence: a host merges the stdio server's manifest `env` block into the
child environment, so the shell could not tell a manifest default from a host
export and reserved both — manifest env beat the file, contrary to the
documented `manifest < .env < .env.local < process.env`. The emitted stdio
entry now embeds the server's normalized `env` block as build-time literals
and `applyOperatorEnv` takes it as `manifestEnv`: a present variable is
reserved only when its value differs from the embedded default, so a
passed-through default yields to the file while a host or operator export is
kept. An operator export equal to the default is indistinguishable from the
pass-through and yields too; a default carrying a path token never equals its
expanded value and is always kept. Host manifests are unchanged.

Import timing: the layer was a statement after the consumer imports, and ESM
evaluates static imports first, so module-level `process.env` reads in hook
handlers and CLI route/provider modules never saw the file. A dynamic
`import()` after the statement does not help either — Rspack inlines a
single-chunk bundle into one scope and places the dynamic target ahead of
the static imports. The layer is now a generated virtual module
(`agent-bundle/launch-env-layer`) that every stdio entry, hook wrapper, and
artifact CLI bin imports first, with the server module, handler, routes,
providers, and state definition as static imports after it; the build marks
generated modules side-effectful so a consumer `"sideEffects": false` cannot
drop the bare import. The MCP shell's `loadEntry` becomes a static import
for the same reason, so the console guard now covers the factory call and
the running server rather than the module's top-level evaluation.

Tests build each shell through the real pipeline and run it under node with
a `process.env` read at module top level: manifest-only key takes the file,
host-exported key keeps the host value, absent key takes the file,
`AGENT_BUNDLE_ENV_FILE=none` restores the previous behaviour.

* chore: drop the tracked .superpowers scratch notes and ignore the folder

* fix(mcp): install the stdout guard in the stdio entry's first import so module-scope writes never reach the protocol stream (#469)

The env-precedence follow-up made the generated stdio entry import the
server module statically so the operator .env layer lands by import order —
but that put the module's top level ahead of the console guard that
`runGeneratedStdioMcpEntry` installs in the shell body. A `console.log` or
`process.stdout.write` at module scope in a consumer's server or tool module
reached stdout, which carries JSON-RPC framing, contradicting the documented
guarantee that redirection precedes the consumer module's evaluation.

The stdio shell now imports a generated prelude (`agent-bundle/stdio-prelude`)
as its first import: it calls `redirectConsoleToStderr` from
`agent-bundle/mcp-entry`, then applies the operator .env layer with the
server's manifest env defaults. Hook wrappers and the artifact CLI bin keep
the env-only layer (`agent-bundle/launch-env-layer`) — they legitimately
write stdout. The guard has one implementation: `redirectConsoleToStderr`
returns the guard already installed (recognised by `process.stdout.write`
still being its redirect) instead of stacking a second, which would capture
the redirect as the original and restore stdout to stderr; the lifecycle
adopts the prelude's guard and restores raw stdout from it before serving.

Tests: a built stdio entry whose server module writes `console.log('hello')`
and `process.stdout.write('raw\n')` at module scope, driven by a real stdio
client through initialize, tools/list, and tools/call, asserts both land on
stderr (fails on the previous code: stderr held only the factory-time line);
the entry-shell unit tests pin the prelude as the stdio entry's first import
and the env-only layer for hook wrappers and the CLI bin; the mcp-entry unit
test pins guard adoption and re-install after restore.

* fix(mcp): adopt the installed stdout guard regardless of write identity so a consumer wrapper cannot stack a second guard (#469)

Adoption by identity (`process.stdout.write === redirectedWrite`) broke the
moment a consumer module wrapped `process.stdout.write` at module scope: the
lifecycle's `redirectConsoleToStderr()` saw a foreign function, installed a
second guard with the wrapper recorded as the original, and restoring for
the protocol stream handed stdout to the wrapper — which still forwarded to
the first redirect, so every JSON-RPC frame left on stderr and the client
hung in initialize.

The rule is now: while a guard is installed, `redirectConsoleToStderr()`
returns it whatever `process.stdout.write` has become; `restoreProtocolStdout()`
restores the real original the guard owns, writes one stderr line if a module
replaced the write in the meantime (the replacement is discarded — stdout is
the protocol channel and wrapping it is unsupported), and clears the
installed guard so a later call installs anew.

Tests: the mcp-entry unit test wraps the redirect, adopts the same guard,
restores to the real stdout, and installs fresh afterwards (fails on
a677371 at the adoption step); the packed stdio test's server module now
also wraps `process.stdout.write` at module scope and the real client still
completes initialize, tools/list, and tools/call with the wrapper's output
and the warning on stderr (hangs to timeout on a677371).

* fix(mcp): make restoreProtocolStdout once-only so a stale or repeated restore cannot clobber a fresh guard (#469)

Two holders of the same guard could restore twice: after the first restore
and a fresh install, the stale restore overwrote the fresh redirect with the
old original while `installedGuard` still named the fresh guard, so adoption
returned a guard that was no longer installed. A plain double restore also
emitted the foreign-wrapper warning twice. The guard now records that it has
restored and returns immediately on later calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Issues and PRs related to the module subsystem. notable-change PRs with changes that should be highlighted in changelogs. semver-major PRs that contain breaking changes and should be released in the next major version. strip-types Issues and PRs related to TypeScript type stripping.

Projects

None yet

Development

Successfully merging this pull request may close these issues.