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

deps: upgrade various deps (mainly babel) #20586

Merged
merged 15 commits into from Dec 29, 2020

Conversation

Timer
Copy link
Member

@Timer Timer commented Dec 29, 2020

Fixes #20585
Closes #20406 as it duplicates Babel dependencies
Closes #18926 as it's outdated

@vercel vercel bot temporarily deployed to Preview December 29, 2020 18:38 Inactive
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@vercel vercel bot temporarily deployed to Preview December 29, 2020 18:53 Inactive
@ijjk

This comment has been minimized.

@vercel vercel bot temporarily deployed to Preview December 29, 2020 19:18 Inactive
@ijjk

This comment has been minimized.

@vercel vercel bot temporarily deployed to Preview December 29, 2020 19:23 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
buildDuration 8.7s 8.5s -202ms
nodeModulesSize 82.7 MB 82.9 MB ⚠️ +259 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
/ failed reqs 0 0
/ total time (seconds) 1.796 1.736 -0.06
/ avg req/sec 1391.68 1440 +48.32
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.014 1.023 ⚠️ +0.01
/error-in-render avg req/sec 2465.17 2444.02 ⚠️ -21.15
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
677f882d2ed8..68d0.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
polyfills-d3..23f6.js gzip 31 kB 31.2 kB ⚠️ +168 B
Overall change 31 kB 31.2 kB ⚠️ +168 B
Client Pages
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
index.html gzip 614 B 613 B -1 B
link.html gzip 619 B 620 B ⚠️ +1 B
withRouter.html gzip 607 B 608 B ⚠️ +1 B
Overall change 1.84 kB 1.84 kB ⚠️ +1 B

Diffs

Diff for 677f882d2ed8..413dc7645.js
@@ -1831,9 +1831,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             } // if the locale isn't configured hard navigate to show 404 page
 
                             if (
-                              (_this$locales = this.locales) == null
-                                ? void 0
-                                : _this$locales.includes(this.locale)
+                              (_this$locales = this.locales) != null &&
+                              _this$locales.includes(this.locale)
                             ) {
                               _context.next = 14;
                               break;
@@ -3133,9 +3132,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     }
 
                     if (
-                      !((_App$prototype = App.prototype) == null
-                        ? void 0
-                        : _App$prototype.getInitialProps)
+                      !(
+                        (_App$prototype = App.prototype) != null &&
+                        _App$prototype.getInitialProps
+                      )
                     ) {
                       _context.next = 4;
                       break;
Diff for polyfills-f7..972ef83e9.js
failed to diff
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -50,7 +50,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -55,7 +55,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -50,7 +50,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
buildDuration 10.5s 9.8s -622ms
nodeModulesSize 82.7 MB 82.9 MB ⚠️ +259 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
677f882d2ed8..68d0.js gzip 12.7 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
677f882d2ed8..beab.js gzip N/A 12.7 kB N/A
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
polyfills-d3..23f6.js gzip 31 kB N/A N/A
polyfills-cf..9865.js gzip N/A 31.2 kB N/A
Overall change 31 kB 31.2 kB ⚠️ +168 B
Client Pages
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_error.js 1 MB 1 MB -32 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB -32 B
link.js 1.06 MB 1.06 MB -32 B
routerDirect.js 1.05 MB 1.05 MB -32 B
withRouter.js 1.05 MB 1.05 MB -32 B
Overall change 5.16 MB 5.16 MB -160 B
Commit: 8894151

@vercel vercel bot temporarily deployed to Preview December 29, 2020 19:48 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
buildDuration 9.8s 9.8s -44ms
nodeModulesSize 82.7 MB 82.9 MB ⚠️ +259 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
/ failed reqs 0 0
/ total time (seconds) 2.044 1.928 -0.12
/ avg req/sec 1222.8 1296.45 +73.65
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.179 1.165 -0.01
/error-in-render avg req/sec 2120.76 2145.64 +24.88
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
677f882d2ed8..68d0.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
polyfills-d3..23f6.js gzip 31 kB 31.2 kB ⚠️ +168 B
Overall change 31 kB 31.2 kB ⚠️ +168 B
Client Pages
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
index.html gzip 614 B 614 B
link.html gzip 619 B 620 B ⚠️ +1 B
withRouter.html gzip 607 B 608 B ⚠️ +1 B
Overall change 1.84 kB 1.84 kB ⚠️ +2 B

Diffs

Diff for 677f882d2ed8..413dc7645.js
@@ -1831,9 +1831,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             } // if the locale isn't configured hard navigate to show 404 page
 
                             if (
-                              (_this$locales = this.locales) == null
-                                ? void 0
-                                : _this$locales.includes(this.locale)
+                              (_this$locales = this.locales) != null &&
+                              _this$locales.includes(this.locale)
                             ) {
                               _context.next = 14;
                               break;
@@ -3133,9 +3132,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     }
 
                     if (
-                      !((_App$prototype = App.prototype) == null
-                        ? void 0
-                        : _App$prototype.getInitialProps)
+                      !(
+                        (_App$prototype = App.prototype) != null &&
+                        _App$prototype.getInitialProps
+                      )
                     ) {
                       _context.next = 4;
                       break;
Diff for polyfills-f7..972ef83e9.js
failed to diff
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -50,7 +50,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -55,7 +55,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       as="script"
     />
     <link
@@ -50,7 +50,7 @@
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-ae47a1f95297af5f55f8.js"
     ></script>
     <script
       src="/_next/static/chunks/main-0bc58ce23e7f930fc47a.js"
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.98cd454f84e413dc7645.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1aec164edf17250b8f61.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
buildDuration 11.3s 11.3s ⚠️ +17ms
nodeModulesSize 82.7 MB 82.9 MB ⚠️ +259 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
677f882d2ed8..68d0.js gzip 12.7 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB N/A N/A
webpack-95c2..e870.js gzip 751 B N/A N/A
677f882d2ed8..45a8.js gzip N/A 12.7 kB N/A
main-eda9847..6ba4.js gzip N/A 6.56 kB N/A
webpack-7193..1446.js gzip N/A 751 B N/A
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
polyfills-d3..23f6.js gzip 31 kB N/A N/A
polyfills-67..b7d1.js gzip N/A 31.2 kB N/A
Overall change 31 kB 31.2 kB ⚠️ +168 B
Client Pages
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_app-0d19cb6..5497.js gzip 1.28 kB N/A N/A
_error-85785..a9f3.js gzip 3.44 kB N/A N/A
hooks-42456f..0c06.js gzip 887 B N/A N/A
index-8081ce..e44f.js gzip 227 B N/A N/A
link-0ab9f83..fa00.js gzip 1.61 kB N/A N/A
routerDirect..c3d8.js gzip 303 B N/A N/A
withRouter-0..a68e.js gzip 302 B N/A N/A
_app-370a053..c381.js gzip N/A 1.28 kB N/A
_error-b7502..6249.js gzip N/A 3.44 kB N/A
hooks-baa922..722d.js gzip N/A 887 B N/A
index-c8a663..7961.js gzip N/A 227 B N/A
link-64502f2..a071.js gzip N/A 1.61 kB N/A
routerDirect..4623.js gzip N/A 303 B N/A
withRouter-f..7105.js gzip N/A 302 B N/A
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Timer/next.js deps/upgrade-babel Change
_error.js 1 MB 1 MB -32 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB -32 B
link.js 1.06 MB 1.06 MB -32 B
routerDirect.js 1.05 MB 1.05 MB -32 B
withRouter.js 1.05 MB 1.05 MB -32 B
Overall change 5.16 MB 5.16 MB -160 B
Commit: 579f1dc

@kodiakhq kodiakhq bot merged commit 61e7dea into vercel:canary Dec 29, 2020
@Timer Timer deleted the deps/upgrade-babel branch December 29, 2020 20:18
@merceyz
Copy link
Contributor

merceyz commented Jan 9, 2021

This also fixes #19334 due to babel/babel#12439

kodiakhq bot pushed a commit that referenced this pull request Jan 11, 2021
**What's the problem this PR addresses?**

- ~~#18768 started to ncc babel and thus it's version of resolve which breaks PnP support~~
Babel replaced `resolve` with the builtin `require.resolve` and a polyfill for older node versions in babel/babel#12439 which was upgraded in #20586
- `next` unnecessarily bundles the `resolve` package when `require.resolve` is builtin and can do the same job

**How did you fix it?**

- ~~Avoid running `resolve` through ncc~~
Added a test for #19334 (closes #19334)
- Replace `resolve` with `require.resolve`
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Babel dependencies
3 participants