-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Drop Node 14 support #5782
Drop Node 14 support #5782
Conversation
🦋 Changeset detectedLatest commit: 5322217 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -7,6 +7,7 @@ import { | |||
import { Event, EventTarget } from 'event-target-shim' | |||
import { Blob, File } from 'fetch-blob/from.js' | |||
import { FormData } from 'formdata-polyfill/esm.min.js' | |||
import * as undici from 'undici' |
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.
Trying to import the needed classes directly from undici
failed with a weird error, probably because it's CJS. I couldn't figure it out, but this works
const reader = stream.getReader(); | ||
|
||
try { | ||
while (true) { |
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.
any code with a while(true)
gets my approval
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.
And a try / finally
? This code has it all!
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.
This is one of my favorite PRs ever. Great work!
@@ -198,7 +198,6 @@ | |||
"eol": "^0.9.1", | |||
"memfs": "^3.4.7", | |||
"mocha": "^9.2.2", | |||
"node-fetch": "^3.2.5", |
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.
🫡
const reader = stream.getReader(); | ||
|
||
try { | ||
while (true) { |
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.
And a try / finally
? This code has it all!
Co-authored-by: Nate Moore <[email protected]>
Changes
Now that Node 14 is going EOL, we can remove some old stuff we had to support it. I, for one, welcome our new Node 16, 18 and 20 overlords.
Testing
Docs
We'll make a PR to docs indicating that we now have 16 as a minimum version