-
-
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
Merged
Merged
Drop Node 14 support #5782
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
36a636d
chore: Update engines field
Princesseuh de339fc
fix(deps): Remove node-fetch
Princesseuh 01566b6
feat(polyfills): Remove node-fetch for undici
Princesseuh 369cd6a
feat(webapi): Remove node-fetch from the webapis polyfills for undici
Princesseuh 968f45c
feat(core): Remove node-fetch for undici in Astro core
Princesseuh 51a45de
feat(telemetry): Remove node-fetch for undici
Princesseuh 406ec02
feat(node): Remove node-fetch for undici in node integration
Princesseuh 7cee130
feat(vercel): Remove node-fetch for undici in Vercel integration
Princesseuh d7aadc6
chore: update lockfile
Princesseuh 2c6b183
Merge branch 'main' into fix/drop-node-14
Princesseuh 06af09b
chore: update lockfile
Princesseuh 07b69c5
chore: changeset
Princesseuh d1e6f1f
fix(set): Fix set directives not streaming correctly on Node 16
Princesseuh 84acc35
Merge branch 'main' into fix/drop-node-14
Princesseuh 1e54efa
Try another approach
matthewp 283dacf
Debugging
matthewp a8eeec4
Debug fetch
matthewp ff698f4
Use global fetch if there is one
matthewp 371f91c
changeset for lit
matthewp 10a3e93
Remove web-streams-polyfill
matthewp d0a6744
Remove web-streams-polyfill license note
matthewp 5322217
Update .changeset/stupid-wolves-explain.md
matthewp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/lit': patch | ||
--- | ||
|
||
Only shim fetch if not already present |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'astro': major | ||
'@astrojs/prism': major | ||
'create-astro': major | ||
'@astrojs/mdx': minor | ||
'@astrojs/node': major | ||
'@astrojs/preact': major | ||
'@astrojs/react': major | ||
'@astrojs/solid-js': major | ||
'@astrojs/svelte': major | ||
'@astrojs/vercel': major | ||
'@astrojs/vue': major | ||
'@astrojs/telemetry': major | ||
--- | ||
|
||
Remove support for Node 14. Minimum supported Node version is now >=16.12.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@astrojs/webapi': major | ||
--- | ||
|
||
Replace node-fetch's polyfill with undici. | ||
|
||
Since `undici` does not support it, this change also removes custom support for the `file:` protocol |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,6 @@ | |
"@types/prismjs": "1.26.0" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,17 @@ export function serializeListValue(value: any) { | |
export function isPromise<T = any>(value: any): value is Promise<T> { | ||
return !!value && typeof value === 'object' && typeof value.then === 'function'; | ||
} | ||
|
||
export async function* streamAsyncIterator(stream: ReadableStream) { | ||
const reader = stream.getReader(); | ||
|
||
try { | ||
while (true) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any code with a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And a |
||
const { done, value } = await reader.read(); | ||
if (done) return; | ||
yield value; | ||
} | ||
} finally { | ||
reader.releaseLock(); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,6 @@ | |
"uvu": "^0.5.3" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,6 @@ | |
"vite": "^4.0.3" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,6 @@ | |
"preact": "^10.6.5" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,6 @@ | |
"solid-js": "^1.4.3" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,6 @@ | |
"astro": "workspace:^2.0.0-beta.0" | ||
}, | ||
"engines": { | ||
"node": "^14.18.0 || >=16.12.0" | ||
"node": ">=16.12.0" | ||
} | ||
} |
This file contains 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
File renamed without changes.
Oops, something went wrong.
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.
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.
🫡