Merged
Conversation
Member
Tests Passed |
Member
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
|
balazsorban44
commented
Oct 16, 2023
Merged
c49c329 to
04faa24
Compare
kodiakhq bot
pushed a commit
that referenced
this pull request
Oct 19, 2023
### What? Upgrade jest to its latest version ### Why? #56899 fails because historically Jest stripped the globals in Node.js, but 28+ isn't doing that anymore. If we upgrade, we don't have to keep track of Node.js globals and when they are added. This will be useful in removing even more polyfills for things that are natively shipped in Node.js now. ### How? Jest 29 introduced a change to the snapshot format: https://jestjs.io/blog/2022/08/25/jest-29 First, I tried setting the old compat option to not require updating snapshots, but some tests were still failing: https://dev.azure.com/nextjs/next.js/_build/results?buildId=70633&view=logs&j=8af7cf9c-43a1-584d-6f5c-57bad8880974&t=7ae70e63-3625-50f4-6764-5b3e72b4bd7a&l=273 So going through the pain now instead.
feedthejim
approved these changes
Oct 19, 2023
styfle
approved these changes
Oct 19, 2023
Merged
kodiakhq bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
### What? Dropping `form-data` polyfill as Node.js 18+ versions all expose it on `globalThis` ### Why? Reduce the amount of shipped code in Next.js ### How? Similar to #56899 See: https://nodejs.org/docs/latest-v18.x/api/globals.html#class-formdata
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What?
Note: This is not a breaking change, just removing some unused code.
Why?
Since #56896 we don't need this, as Node.js 18+ has
fetchexposed by default.How?
Depends on #56896, #56909
We already didn't load
fetchifglobalThishad it (ie. Node.js 18+ environments), and since we are dropping support for Node.js 16, these code paths should have no effect on runtime behavior.See: https://nodejs.org/docs/latest-v18.x/api/globals.html#fetch