Repository navigation
[node] Inherit CommonOptions in ForkOptions to support windowsHide - #75525
Conversation
Extend CommonOptions as suggested in discussion DefinitelyTyped#75523 so fork accepts windowsHide without a local intersection type. Apply the same correction to the latest, v22, v24, and v25 definitions and exercise both overloads. Package checks pass for all four versions. A compiled runtime example preserves stdout, IPC, and successful exit with hidden forked workers. Co-authored-by: Codex <[email protected]>
|
@christopher-buss Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75525,
"author": "christopher-buss",
"headCommitOid": "1d8eb21ae6a41f47c8f4bc1d26e500ccb4ce236e",
"mergeBaseOid": "af92471c4aa594ef307ac159ba753cf6a4cc01a0",
"lastPushDate": "2026-09-07T19:43:07.000Z",
"lastActivityDate": "2026-09-15T20:27:56.000Z",
"mergeOfferDate": "2026-09-15T20:26:38.000Z",
"mergeRequestDate": "2026-09-15T20:27:56.000Z",
"mergeRequestUser": "christopher-buss",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"version": "26.5",
"kind": "edit",
"files": [
{
"path": "types/node/child_process.d.ts",
"kind": "definition"
},
{
"path": "types/node/node-tests/child_process.ts",
"kind": "test"
},
{
"path": "types/node/v22/child_process.d.ts",
"kind": "definition"
},
{
"path": "types/node/v22/test/child_process.ts",
"kind": "test"
},
{
"path": "types/node/v24/child_process.d.ts",
"kind": "definition"
},
{
"path": "types/node/v24/test/child_process.ts",
"kind": "test"
},
{
"path": "types/node/v25/child_process.d.ts",
"kind": "definition"
},
{
"path": "types/node/v25/node-tests/child_process.ts",
"kind": "test"
}
],
"owners": [
"Microsoft",
"jkomyno",
"r3nya",
"btoueg",
"touffy",
"mohsen1",
"galkin",
"eps1lon",
"WilcoBakker",
"chyzwar",
"trivikr",
"yoursunny",
"qwelias",
"ExE-Boss",
"peterblazejewicz",
"addaleax",
"victorperin",
"NodeJS",
"LinusU",
"wafuwafu13",
"mcollina",
"Semigradsky",
"Renegade334",
"anonrig"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "RyanCavanaugh",
"date": "2026-09-15T20:26:00.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "Renegade334",
"date": "2026-09-07T19:55:38.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 5575013456,
"ciResult": "pass"
} |
|
🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @Renegade334 @anonrig — please review this PR in the next few days. Be sure to explicitly select |
Describe the existing windowsHide option and its false default alongside the other fork options, using the wording already documented for spawn. Refs: DefinitelyTyped/DefinitelyTyped#75525 Signed-off-by: christopher-buss <[email protected]> Assisted-by: Codex Co-authored-by: Codex <[email protected]> PR-URL: #65887 Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
|
The doc change was merged into node if this helps at all :) |
|
@christopher-buss: Everything looks good here. I am ready to merge this PR (at 1d8eb21) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@microsoft, @jkomyno, @r3nya, @btoueg, @Touffy, @mohsen1, @galkin, @eps1lon, @WilcoBakker, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky, @Renegade334, @anonrig: you can do this too.) |
|
Ready to merge |
e839b8f
into
DefinitelyTyped:master
Describe the existing windowsHide option and its false default alongside the other fork options, using the wording already documented for spawn. Refs: DefinitelyTyped/DefinitelyTyped#75525 Signed-off-by: christopher-buss <[email protected]> Assisted-by: Codex Co-authored-by: Codex <[email protected]> PR-URL: #65887 Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Describe the existing windowsHide option and its false default alongside the other fork options, using the wording already documented for spawn. Refs: DefinitelyTyped/DefinitelyTyped#75525 Signed-off-by: christopher-buss <[email protected]> Assisted-by: Codex Co-authored-by: Codex <[email protected]> PR-URL: #65887 Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
fork()rejectswindowsHidein TypeScript even though Node forwards the option tospawn()and uses it when creating cluster workers. MakeForkOptionsextendCommonOptions, as suggested in discussion #75523.Apply the same one-line correction to the latest, v22, v24, and v25 definitions. Existing child-process tests now exercise
windowsHidewith both fork overloads and retain coverage oftimeout.windowsHide: true; stdout, IPC messages, and exit status were preserved.windowsHidebefore the declaration change.pnpm test <package to test>. Passedpnpm test node,pnpm test node/v22,pnpm test node/v24, andpnpm test node/v25across their supported TypeScript configurations.For this existing definition:
windowsHideto fork.Repository-wide
test-allwas not run; local validation was scoped to the Node packages in a sparse checkout.Generated with Codex.