-
Notifications
You must be signed in to change notification settings - Fork 30.6k
[node] process: avoid inheriting event-mapped overloads in v25 #74380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[node] process: avoid inheriting event-mapped overloads in v25 #74380
Conversation
|
@Renegade334 Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode 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": 74380,
"author": "Renegade334",
"headCommitOid": "9c0429e2ae329ef94bed7e63361bd71747f844a3",
"mergeBaseOid": "fffee71d83ce76670301d5bee9ca8f930a930dc3",
"lastPushDate": "2026-01-21T22:41:39.000Z",
"lastActivityDate": "2026-01-21T23:15:47.000Z",
"mergeOfferDate": "2026-01-21T23:05:45.000Z",
"mergeRequestDate": "2026-01-21T23:15:47.000Z",
"mergeRequestUser": "Renegade334",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"kind": "edit",
"files": [
{
"path": "types/node/process.d.ts",
"kind": "definition"
}
],
"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": "jakebailey",
"date": "2026-01-21T23:05:06.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 3781518427,
"ciResult": "pass"
} |
|
Hey @Renegade334, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @anonrig — please review this PR in the next few days. Be sure to explicitly select |
| @@ -1,6 +1,5 @@ | |||
| declare module "node:process" { | |||
| import { Control, MessageOptions, SendHandle } from "node:child_process"; | |||
| import { InternalEventEmitter } from "node:events"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is InternalEventEmitter still referenced after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not within process.d.ts.
It still sees some use for directly-inherited EventEmitter classes, as inheriting where possible is more straightforward than copying all the overloads. We could switch to a single pattern throughout, but given that it doesn't really make sense to add augmented event definitions to a Node.js base class, the rest are probably fine.
|
@Renegade334: Everything looks good here. I am ready to merge this PR (at 9c0429e) 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, @anonrig: you can do this too.) |
|
Ready to merge. |
electron augments the
NodeJS.Processinterface with its own event overloads. If @types/node's own process event methods are inherited, rather than defined on the interface itself, then any augmented overloads cause the inherited definitions to vanish. Switch to using the alternate pattern.