Remove patched dom types (v6.x branch)#3531
Remove patched dom types (v6.x branch)#3531mcollina merged 2 commits intonodejs:v6.xfrom eXhumer:remove-patched-dom-types-v6.x
v6.x branch)#3531Conversation
* see #3524 Signed-off-by: eXhumer <exhumer@exhumer.cc>
* Add minimum types for node based on `engines` version * Currently undici locks engine to node@>=18.17 * Get @types/node for 18.17.x specificially and lock to patch upgrades only for 18.17 Signed-off-by: eXhumer <exhumer@exhumer.cc>
| "@matteo.collina/tspl": "^0.1.1", | ||
| "@sinonjs/fake-timers": "^11.1.0", | ||
| "@types/node": "^18.0.3", | ||
| "@types/node": "~18.17.19", |
There was a problem hiding this comment.
This just provides type for node 18.17 specifically, which is the minimum required based on the engines version. The listed version ^18.0.3 doesn't contain the Event and EventTarget. And the version that ends up being installed installs typing related to node 18.19 (18.19.47) instead of the minimum supported 18.17
There was a problem hiding this comment.
I can revert back this change if necessary, but I strongly recommend locking the @types/node to the minimum supported version mentioned in engines.node in package.json.
|
Should I create a separate PR for the |
|
If possible target the main branch and we use the backport action. |
|
@eXhumer PTAL, I think we'd need a manual backport after all. |
|
Correct. This requires manual backport to |
|
I guess #3533 must be first merged before merging this. |
|
Yes, LGTM |
This relates to...
Fixes #3524
Rationale
Several missing DOM types from
@types/nodewere added as part ofpatch.d.ts.Event&EventTargetexported DOM types in global were overwritten withpatch.d.ts.Changes
Event&EventTargettype and references to it from other declaration files.@types/nodeto~18.17.19.Features
N/A
Bug Fixes
Eventtype.Breaking Changes and Deprecations
N/A
Status
Notes
This only applies to branch
v6.x, which is the latest stable version available currently. This will also need to be ported for themainbranch, where the major version was bumped to v7.@types/nodeversion was updated to reflect the minimum supported engine version inpackage.json.