Skip to content
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

Update Babel dependencies #51962

Merged
merged 19 commits into from
Oct 17, 2023
Merged

Update Babel dependencies #51962

merged 19 commits into from
Oct 17, 2023

Conversation

Andarist
Copy link
Contributor

What?

Update Babel packages across the board

Why?

Since you ship vendored presets and plugins it's impossible for people to update this stuff at their own pace - independently from Next. So users of next/babel are currently stuck with old versions and, for example, they might not be able to use the TS satisfies operator.

How?

I just updated ranges (to pinned ones) where I could find them, run corepack pnpm i and re-run build scripts in the packages/next.

Fixes #43799

@ijjk ijjk added examples Issue/PR related to examples area: tests Turbopack Related to Turbopack with Next.js. type: next labels Jun 29, 2023
@ijjk
Copy link
Member

ijjk commented Jun 29, 2023

Allow CI Workflow Run

  • approve CI run for commit: a21662d

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@timneutkens timneutkens requested a review from a team as a code owner July 4, 2023 08:18
@jrolfs
Copy link

jrolfs commented Jul 11, 2023

We've since moved on to the SWC-based toolchain, but I'm still pretty curious about this:

Since you ship vendored presets and plugins

I'm sure there's a good reason, but I am curious why. What all is vendored?

@codinsonn
Copy link

Can confirm this would help solve my (and others still stuck with the babel approach) issues with supporting the satisfies operator

@ryota-murakami
Copy link
Contributor

When can this PR be reviewed?

@p-iknow
Copy link

p-iknow commented Aug 24, 2023

Dear esteemed next maintainers. @timneutkens @ijjk

Please review this PR quickly, there are many type issues that can be solved with the satisfy operator. However, typescript satisfy operator issue currently prevents us from using the satisfy operator in next.

Please help me out of pain of issue

@timneutkens
Copy link
Member

Please review this PR quickly

The PR is failing tests as you can see, so it can't be merged.

# Conflicts:
#	bench/nested-deps/package.json
#	package.json
#	packages/next/src/compiled/babel-packages/packages-bundle.js
#	packages/next/src/compiled/babel/bundle.js
#	pnpm-lock.yaml
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@Andarist
Copy link
Contributor Author

@timneutkens I'm not sure if those are really failing here - the jobs are stuck on the lack of approval of a Next.js team member. cc @huozhi - maybe you could approve those runs?

@timneutkens timneutkens added the CI approved Approve running CI for fork label Sep 22, 2023
# Conflicts:
#	package.json
#	packages/next/src/compiled/babel-packages/packages-bundle.js
#	packages/next/src/compiled/babel/bundle.js
#	packages/next/src/compiled/cssnano-simple/index.js
#	packages/next/src/compiled/ora/index.js
#	packages/next/src/compiled/postcss-modules-local-by-default/index.js
#	packages/next/src/compiled/postcss-modules-scope/index.js
#	packages/next/src/compiled/postcss-preset-env/index.cjs
@ijjk
Copy link
Member

ijjk commented Oct 14, 2023

Tests Passed

@ijjk
Copy link
Member

ijjk commented Oct 14, 2023

Stats from current PR

Default Build
General Overall increase ⚠️
vercel/next.js canary Andarist/next.js update-babel-deps Change
buildDuration 10.4s 10.2s N/A
buildDurationCached 6.1s 6.2s N/A
nodeModulesSize 173 MB 174 MB ⚠️ +625 kB
nextStartRea..uration (ms) 537ms 516ms N/A
Client Bundles (main, webpack)
vercel/next.js canary Andarist/next.js update-babel-deps Change
199-HASH.js gzip 27.5 kB 27.5 kB
3f784ff6-HASH.js gzip 53.1 kB 53.1 kB
99.HASH.js gzip 182 B 182 B
framework-HASH.js gzip 45.3 kB 45.3 kB
main-app-HASH.js gzip 254 B 251 B N/A
main-HASH.js gzip 32.9 kB 32.9 kB N/A
webpack-HASH.js gzip 1.75 kB 1.75 kB N/A
Overall change 126 kB 126 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Andarist/next.js update-babel-deps Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Andarist/next.js update-babel-deps Change
_app-HASH.js gzip 206 B 205 B N/A
_error-HASH.js gzip 182 B 180 B N/A
amp-HASH.js gzip 506 B 505 B N/A
css-HASH.js gzip 322 B 323 B N/A
dynamic-HASH.js gzip 2.57 kB 2.57 kB N/A
edge-ssr-HASH.js gzip 260 B 259 B N/A
head-HASH.js gzip 350 B 350 B
hooks-HASH.js gzip 369 B 369 B
image-HASH.js gzip 4.35 kB 4.35 kB N/A
index-HASH.js gzip 256 B 256 B
link-HASH.js gzip 2.64 kB 2.63 kB N/A
routerDirect..HASH.js gzip 312 B 311 B N/A
script-HASH.js gzip 385 B 384 B N/A
withRouter-HASH.js gzip 307 B 308 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 1.08 kB 1.08 kB
Client Build Manifests
vercel/next.js canary Andarist/next.js update-babel-deps Change
_buildManifest.js gzip 485 B 482 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary Andarist/next.js update-babel-deps Change
index.html gzip 528 B 528 B
link.html gzip 542 B 541 B N/A
withRouter.html gzip 524 B 524 B
Overall change 1.05 kB 1.05 kB
Edge SSR bundle Size
vercel/next.js canary Andarist/next.js update-babel-deps Change
edge-ssr.js gzip 93.7 kB 93.7 kB N/A
page.js gzip 154 kB 154 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary Andarist/next.js update-babel-deps Change
middleware-b..fest.js gzip 625 B 620 B N/A
middleware-r..fest.js gzip 150 B 151 B N/A
middleware.js gzip 22.5 kB 22.5 kB N/A
edge-runtime..pack.js gzip 1.92 kB 1.92 kB
Overall change 1.92 kB 1.92 kB
Commit: 1153c76

@Andarist
Copy link
Contributor Author

@timneutkens @huozhi the CI is green so it should be mergeable now 😉 Note though that this commit shows that you had some pretty big type issues there (I'm not sure how this has typechecked before, perhaps some anys leaked into all of this?): 5252a91 I also added a TODO comment about the cast that I added at one place. I think that this is kinda outside of the scope of this PR and I would prefer not to deal with this - unless u decide to block this PR before this gets resolved

styfle
styfle previously approved these changes Oct 16, 2023
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! 🎉

@kodiakhq kodiakhq bot merged commit db21421 into vercel:canary Oct 17, 2023
58 checks passed
@timneutkens
Copy link
Member

Thank you for the effort @Andarist 🙏

@Andarist Andarist deleted the update-babel-deps branch October 17, 2023 10:06
balazsorban44 added a commit that referenced this pull request Oct 18, 2023
@github-actions github-actions bot added the locked label Nov 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI approved Approve running CI for fork examples Issue/PR related to examples locked Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Babel TypeScript transformer does not support satisfies operator