Update Node.js dependencies for improved LTS support#11648
Merged
Conversation
changelog: Internal, Dependencies, Drop dependencies in favor of Node.js native utilities
Now includes fixed TypeScript types. Previously wasn't possible to upgrade because project is ESM, but Node.js 22 adds experimental support for CommonJS require of ESM
Avoid issues with types on Array.fromAsync
mitchellhenke
approved these changes
Dec 16, 2024
516b37d to
ae1be49
Compare
zachmargolis
approved these changes
Dec 16, 2024
scripts/enforce-typescript-files.mjs
Outdated
Contributor
There was a problem hiding this comment.
just curious, did we find all these by searching for await glob( or did they turn up as type errors?
Contributor
Author
There was a problem hiding this comment.
I had searched fast-glob and updated references. TypeScript did come in handy when it came to converting to using Array.fromAsync, since the return type of Node.js's built-in glob is neither an array nor a promise, but instead an AsyncIterable.
c1ae07b to
2e2fb65
Compare
2e2fb65 to
f79b01f
Compare
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.
🛠 Summary of changes
Following upgrade to Node.js LTS 22 in #11605, updates use of a few dependencies to take advantage of new features:
fast-globin favor of newfsglobutilityclipboard-polyfill, which had been stuck on an older version with TypeScript types patch due to project migrating to ESM-only, but Node.js 22 includes experimental support for CommonJSrequireof ESMAdditional dependency updates were required:
typescriptand@types/nodeto support use ofArray.fromAsyncwebpackto resolve TypeScript errors stemming from upgrade oftypescript📜 Testing Plan
Verify build passes.
The riskiest upgrade here is
webpack, which affects end-user bundled JavaScript. But we're only a few minor versions behind, so it should be relatively safe (see release notes).