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

feat(router): router events type inference #23753

Closed
wants to merge 4 commits into from
Closed

feat(router): router events type inference #23753

wants to merge 4 commits into from

Conversation

lbwa
Copy link

@lbwa lbwa commented Apr 6, 2021

Feature

  • add router events type inference

before

It's not convenient without router events type and handler type.

0

after

Add router events type and handler type (refer from documentation) for better development experience and type hint.

1

Documentation / Examples

  • Make sure the linting passes

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 15.4s 15.3s -127ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 3.287 3.103 -0.18
/ avg req/sec 760.61 805.66 +45.05
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.884 1.796 -0.09
/error-in-render avg req/sec 1326.95 1392.29 +65.34
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 613 B 613 B
link.html gzip 621 B 621 B
withRouter.html gzip 607 B 608 B ⚠️ +1 B
Overall change 1.84 kB 1.84 kB ⚠️ +1 B

Diffs

Diff for 677f882d2ed8..68ee0afbc.js
@@ -1617,7 +1617,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this.clc = void 0;
           this.pageLoader = void 0;
           this._bps = void 0;
-          this.events = void 0;
+          this.events = (0, _mitt["default"])();
           this._wrapApp = void 0;
           this.isSsr = void 0;
           this.isFallback = void 0;
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 17s 17.8s ⚠️ +843ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..32e2.js gzip N/A 13.4 kB N/A
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB ⚠️ +14 B
routerDirect.js 1.42 MB 1.42 MB ⚠️ +14 B
withRouter.js 1.42 MB 1.42 MB ⚠️ +14 B
Overall change 7.01 MB 7.01 MB ⚠️ +42 B

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 18.8s 18.4s -436ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 3.205 3.287 ⚠️ +0.08
/ avg req/sec 780.02 760.5 ⚠️ -19.52
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.905 1.949 ⚠️ +0.04
/error-in-render avg req/sec 1312.16 1282.64 ⚠️ -29.52
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB -2 B
778-2fdd7b63..cd87.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB -2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 612 B 609 B -3 B
link.html gzip 617 B 614 B -3 B
withRouter.html gzip 605 B 604 B -1 B
Overall change 1.83 kB 1.83 kB -7 B

Diffs

Diff for 677f882d2ed8..2520de6c6.js
@@ -169,22 +169,22 @@
             o = t.protocol || "",
             i = t.pathname || "",
             s = t.hash || "",
-            c = t.query || "",
-            u = !1;
+            u = t.query || "",
+            c = !1;
           (e = e ? encodeURIComponent(e).replace(/%3A/i, ":") + "@" : ""),
             t.host
-              ? (u = e + t.host)
+              ? (c = e + t.host)
               : r &&
-                ((u = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
-                t.port && (u += ":" + t.port));
-          c &&
-            "object" === typeof c &&
-            (c = String(n.urlQueryToSearchParams(c)));
-          var l = t.search || (c && "?".concat(c)) || "";
+                ((c = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
+                t.port && (c += ":" + t.port));
+          u &&
+            "object" === typeof u &&
+            (u = String(n.urlQueryToSearchParams(u)));
+          var l = t.search || (u && "?".concat(u)) || "";
           o && ":" !== o.substr(-1) && (o += ":");
-          t.slashes || ((!o || a.test(o)) && !1 !== u)
-            ? ((u = "//" + (u || "")), i && "/" !== i[0] && (i = "/" + i))
-            : u || (u = "");
+          t.slashes || ((!o || a.test(o)) && !1 !== c)
+            ? ((c = "//" + (c || "")), i && "/" !== i[0] && (i = "/" + i))
+            : c || (c = "");
           s && "#" !== s[0] && (s = "#" + s);
           l && "?" !== l[0] && (l = "?" + l);
           return (
@@ -192,7 +192,7 @@
             (l = l.replace("#", "%23")),
             ""
               .concat(o)
-              .concat(u)
+              .concat(c)
               .concat(i)
               .concat(l)
               .concat(s)
@@ -273,7 +273,7 @@
         (e.default = void 0);
       i(r("Lab5"));
       var s = r("0G5g");
-      function c(t, e, r) {
+      function u(t, e, r) {
         var n,
           o = e.get(t);
         if (o) return "future" in o ? o.future : Promise.resolve(o);
@@ -289,7 +289,7 @@
             : a
         );
       }
-      var u = (function(t) {
+      var c = (function(t) {
         try {
           return (
             (t = document.createElement("link")),
@@ -403,7 +403,7 @@
         }
         return {
           whenEntrypoint: function(t) {
-            return c(t, e);
+            return u(t, e);
           },
           onEntrypoint: function(t, r) {
             Promise.resolve(r)
@@ -425,12 +425,12 @@
           },
           loadRoute: function(r) {
             var i = this;
-            return c(
+            return u(
               r,
               l,
               a(
                 n.mark(function a() {
-                  var s, c, u, l, y, m, g, w;
+                  var s, u, c, l, y, m, g, w;
                   return n.wrap(
                     function(n) {
                       for (;;)
@@ -440,12 +440,12 @@
                           case 3:
                             return (
                               (s = n.sent),
-                              (c = s.scripts),
-                              (u = s.css),
+                              (u = s.scripts),
+                              (c = s.css),
                               (n.next = 8),
                               Promise.all([
-                                e.has(r) ? [] : Promise.all(c.map(p)),
-                                Promise.all(u.map(v))
+                                e.has(r) ? [] : Promise.all(u.map(p)),
+                                Promise.all(c.map(v))
                               ])
                             );
                           case 8:
@@ -498,7 +498,7 @@
               : d(t, e)
                   .then(function(t) {
                     return Promise.all(
-                      u
+                      c
                         ? t.scripts.map(function(t) {
                             return (
                               (e = t),
@@ -730,8 +730,8 @@
         (e.interpolateAs = L),
         (e.resolveHref = O),
         (e.default = void 0);
-      var c = r("X24+"),
-        u = r("Nh2W"),
+      var u = r("X24+"),
+        c = r("Nh2W"),
         l = r("wkBG"),
         f = (r("3wub"), w(r("dZ6Y"))),
         h = r("g/15"),
@@ -765,7 +765,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, u.normalizePathTrailingSlash)(e)
               : "".concat(e).concat("/" === P(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -798,14 +798,14 @@
               r = a[t],
               o = r.repeat,
               s = r.optional,
-              c = "[".concat(o ? "..." : "").concat(t, "]");
+              u = "[".concat(o ? "..." : "").concat(t, "]");
             return (
-              s && (c = "".concat(e ? "" : "/", "[").concat(c, "]")),
+              s && (u = "".concat(e ? "" : "/", "[").concat(u, "]")),
               o && !Array.isArray(e) && (e = [e]),
               (s || t in i) &&
                 (n =
                   n.replace(
-                    c,
+                    u,
                     o
                       ? e
                           .map(function(t) {
@@ -834,13 +834,13 @@
         if (!R(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, u.normalizePathTrailingSlash)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var s = (0, v.searchParamsToUrlQuery)(a.searchParams),
-              u = L(a.pathname, a.pathname, s),
-              l = u.result,
-              f = u.params;
+              c = L(a.pathname, a.pathname, s),
+              l = c.result,
+              f = c.params;
             l &&
               (i = (0, h.formatWithValidation)({
                 pathname: l,
@@ -864,16 +864,16 @@
           o = s(n, 2),
           a = o[0],
           i = o[1],
-          c = (0, h.getLocationOrigin)(),
-          u = a.startsWith(c),
-          l = i && i.startsWith(c);
+          u = (0, h.getLocationOrigin)(),
+          c = a.startsWith(u),
+          l = i && i.startsWith(u);
         (a = I(a)), (i = i ? I(i) : i);
-        var f = u ? a : S(a),
+        var f = c ? a : S(a),
           p = r ? I(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
       function j(t, e) {
-        var r = (0, c.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
+        var r = (0, u.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
         return "/404" === r || "/_error" === r
           ? t
           : (e.includes(r) ||
@@ -884,7 +884,7 @@
                 )
                   return (t = e), !0;
               }),
-            (0, c.removePathTrailingSlash)(t));
+            (0, u.removePathTrailingSlash)(t));
       }
       var A = Symbol("SSG_DATA_NOT_FOUND");
       function D(t, e) {
@@ -903,22 +903,22 @@
       }
       function M(t, e) {
         return D(t, e ? 3 : 1).catch(function(t) {
-          throw (e || (0, u.markAssetError)(t), t);
+          throw (e || (0, c.markAssetError)(t), t);
         });
       }
       var N = (function() {
         function t(e, r, n, o) {
           var i = this,
             s = o.initialProps,
-            u = o.pageLoader,
+            c = o.pageLoader,
             l = o.App,
-            f = o.wrapApp,
-            v = o.Component,
-            y = o.err,
-            m = o.subscription,
-            g = o.isFallback,
-            w = o.locale,
-            b = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
+            v = o.wrapApp,
+            y = o.Component,
+            m = o.err,
+            g = o.subscription,
+            w = o.isFallback,
+            b = o.locale,
+            _ = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
           a(this, t),
             (this.route = void 0),
             (this.pathname = void 0),
@@ -932,7 +932,7 @@
             (this.clc = void 0),
             (this.pageLoader = void 0),
             (this._bps = void 0),
-            (this.events = void 0),
+            (this.events = (0, f.default)()),
             (this._wrapApp = void 0),
             (this.isSsr = void 0),
             (this.isFallback = void 0),
@@ -970,52 +970,52 @@
                     );
                 }
               } else {
-                var c = i.pathname,
-                  u = i.query;
+                var u = i.pathname,
+                  c = i.query;
                 i.changeState(
                   "replaceState",
-                  (0, h.formatWithValidation)({ pathname: S(c), query: u }),
+                  (0, h.formatWithValidation)({ pathname: S(u), query: c }),
                   (0, h.getURL)()
                 );
               }
             }),
-            (this.route = (0, c.removePathTrailingSlash)(e)),
+            (this.route = (0, u.removePathTrailingSlash)(e)),
             (this.components = {}),
             "/_error" !== e &&
               (this.components[this.route] = {
-                Component: v,
+                Component: y,
                 initial: !0,
                 props: s,
-                err: y,
+                err: m,
                 __N_SSG: s && s.__N_SSG,
                 __N_SSP: s && s.__N_SSP
               }),
             (this.components["/_app"] = { Component: l, styleSheets: [] }),
             (this.events = t.events),
-            (this.pageLoader = u),
+            (this.pageLoader = c),
             (this.pathname = e),
             (this.query = r);
-          var _ = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
-          (this.asPath = _ ? e : n),
+          var x = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
+          (this.asPath = x ? e : n),
             (this.basePath = ""),
-            (this.sub = m),
+            (this.sub = g),
             (this.clc = null),
-            (this._wrapApp = f),
+            (this._wrapApp = v),
             (this.isSsr = !0),
-            (this.isFallback = g),
+            (this.isFallback = w),
             (this.isReady = !(
               !self.__NEXT_DATA__.gssp &&
               !self.__NEXT_DATA__.gip &&
-              (_ || self.location.search)
+              (x || self.location.search)
             )),
-            (this.isPreview = !!b),
+            (this.isPreview = !!_),
             (this.isLocaleDomain = !1),
             "//" !== n.substr(0, 2) &&
               this.changeState(
                 "replaceState",
                 (0, h.formatWithValidation)({ pathname: S(e), query: r }),
                 (0, h.getURL)(),
-                { locale: w }
+                { locale: b }
               ),
             window.addEventListener("popstate", this.onPopState);
         }
@@ -1164,7 +1164,7 @@
                               return (
                                 (I = e.sent),
                                 (e.next = 42),
-                                (0, u.getClientBuildManifest)()
+                                (0, c.getClientBuildManifest)()
                               );
                             case 42:
                               (D = e.sent), D.__rewrites, (e.next = 50);
@@ -1182,13 +1182,13 @@
                                 (M = a),
                                 "/_error" !==
                                   (P = P
-                                    ? (0, c.removePathTrailingSlash)(E(P))
+                                    ? (0, u.removePathTrailingSlash)(E(P))
                                     : P) &&
                                   ((b.pathname = j(P, I)),
                                   b.pathname !== P &&
                                     ((P = b.pathname),
                                     (o = (0, h.formatWithValidation)(b)))),
-                                (N = (0, c.removePathTrailingSlash)(P)),
+                                (N = (0, u.removePathTrailingSlash)(P)),
                                 R(a))
                               ) {
                                 e.next = 60;
@@ -1444,7 +1444,7 @@
               key: "handleRouteInfoError",
               value: (function() {
                 var e = o(
-                  n.mark(function e(r, o, a, i, s, c) {
+                  n.mark(function e(r, o, a, i, s, u) {
                     var l, f, h, p;
                     return n.wrap(
                       function(e) {
@@ -1457,7 +1457,7 @@
                               }
                               throw r;
                             case 2:
-                              if (!(0, u.isAssetError)(r) && !c) {
+                              if (!(0, c.isAssetError)(r) && !u) {
                                 e.next = 6;
                                 break;
                               }
@@ -1553,8 +1553,8 @@
               value: (function() {
                 var t = o(
                   n.mark(function t(e, r, o, a, i, s) {
-                    var c,
-                      u,
+                    var u,
+                      c,
                       l,
                       f,
                       p,
@@ -1569,19 +1569,19 @@
                             case 0:
                               if (
                                 ((t.prev = 0),
-                                (c = this.components[e]),
-                                !s.shallow || !c || this.route !== e)
+                                (u = this.components[e]),
+                                !s.shallow || !u || this.route !== e)
                               ) {
                                 t.next = 4;
                                 break;
                               }
-                              return t.abrupt("return", c);
+                              return t.abrupt("return", u);
                             case 4:
-                              if (!(u = c && "initial" in c ? void 0 : c)) {
+                              if (!(c = u && "initial" in u ? void 0 : u)) {
                                 t.next = 9;
                                 break;
                               }
-                              (t.t0 = u), (t.next = 12);
+                              (t.t0 = c), (t.next = 12);
                               break;
                             case 9:
                               return (
@@ -1690,9 +1690,9 @@
                   o = r[1],
                   a = t.split("#"),
                   i = s(a, 2),
-                  c = i[0],
-                  u = i[1];
-                return !(!u || n !== c || o !== u) || (n === c && o !== u);
+                  u = i[0],
+                  c = i[1];
+                return !(!c || n !== u || o !== c) || (n === u && o !== c);
               }
             },
             {
@@ -1726,7 +1726,7 @@
                       a,
                       i,
                       s,
-                      u,
+                      c,
                       l,
                       f,
                       p,
@@ -1749,7 +1749,7 @@
                                 this.pageLoader.getPageList()
                               );
                             case 7:
-                              (s = t.sent), (u = r), (t.next = 19);
+                              (s = t.sent), (c = r), (t.next = 19);
                               break;
                             case 12:
                               (f = t.sent),
@@ -1764,7 +1764,7 @@
                                   },
                                   this.locales
                                 )),
-                                (u = x(E(p.asPath), this.locale)),
+                                (c = x(E(p.asPath), this.locale)),
                                 p.matchedPage &&
                                   p.resolvedHref &&
                                   ((i = p.resolvedHref),
@@ -1778,7 +1778,7 @@
                                   ((i = a.pathname),
                                   (e = (0, h.formatWithValidation)(a)));
                             case 21:
-                              (v = (0, c.removePathTrailingSlash)(i)),
+                              (v = (0, u.removePathTrailingSlash)(i)),
                                 (t.next = 24);
                               break;
                             case 24:
@@ -1791,7 +1791,7 @@
                                       m._getStaticData(
                                         m.pageLoader.getDataHref(
                                           e,
-                                          u,
+                                          c,
                                           !0,
                                           "undefined" !== typeof o.locale
                                             ? o.locale
@@ -1975,8 +1975,8 @@
           return t.substring(e.length);
         }),
         (e.getDisplayName = s),
-        (e.isResSent = c),
-        (e.loadGetInitialProps = u),
+        (e.isResSent = u),
+        (e.loadGetInitialProps = c),
         (e.formatWithValidation = function(t) {
           0;
           return (0, a.formatUrl)(t);
@@ -1996,10 +1996,10 @@
       function s(t) {
         return "string" === typeof t ? t : t.displayName || t.name || "Unknown";
       }
-      function c(t) {
+      function u(t) {
         return t.finished || t.headersSent;
       }
-      function u(t, e) {
+      function c(t, e) {
         return l.apply(this, arguments);
       }
       function l() {
@@ -2023,7 +2023,7 @@
                       t.next = 11;
                       break;
                     }
-                    return (t.next = 9), u(r.Component, r.ctx);
+                    return (t.next = 9), c(r.Component, r.ctx);
                   case 9:
                     return (
                       (t.t0 = t.sent), t.abrupt("return", { pageProps: t.t0 })
@@ -2033,7 +2033,7 @@
                   case 12:
                     return (t.next = 14), e.getInitialProps(r);
                   case 14:
-                    if (((a = t.sent), !o || !c(o))) {
+                    if (((a = t.sent), !o || !u(o))) {
                       t.next = 17;
                       break;
                     }
@@ -2126,8 +2126,8 @@
             a = e ? new URL(e, r) : r,
             i = new URL(t, a),
             s = i.pathname,
-            c = i.searchParams,
-            u = i.search,
+            u = i.searchParams,
+            c = i.search,
             l = i.hash,
             f = i.href;
           if (i.origin !== r.origin)
@@ -2136,8 +2136,8 @@
             );
           return {
             pathname: s,
-            query: (0, o.searchParamsToUrlQuery)(c),
-            search: u,
+            query: (0, o.searchParamsToUrlQuery)(u),
+            search: c,
             hash: l,
             href: f.slice(r.origin.length)
           };
@@ -2155,7 +2155,7 @@
           a = o.iterator || "@@iterator",
           i = o.asyncIterator || "@@asyncIterator",
           s = o.toStringTag || "@@toStringTag";
-        function c(t, e, r) {
+        function u(t, e, r) {
           return (
             Object.defineProperty(t, e, {
               value: r,
@@ -2167,13 +2167,13 @@
           );
         }
         try {
-          c({}, "");
+          u({}, "");
         } catch (I) {
-          c = function(t, e, r) {
+          u = function(t, e, r) {
             return (t[e] = r);
           };
         }
-        function u(t, e, r, n) {
+        function c(t, e, r, n) {
           var o = e && e.prototype instanceof y ? e : y,
             a = Object.create(o.prototype),
             i = new L(n || []);
@@ -2201,13 +2201,13 @@
                     r.dispatchException(r.arg);
                   } else "return" === r.method && r.abrupt("return", r.arg);
                   n = p;
-                  var c = l(t, e, r);
-                  if ("normal" === c.type) {
-                    if (((n = r.done ? d : h), c.arg === v)) continue;
-                    return { value: c.arg, done: r.done };
+                  var u = l(t, e, r);
+                  if ("normal" === u.type) {
+                    if (((n = r.done ? d : h), u.arg === v)) continue;
+                    return { value: u.arg, done: r.done };
                   }
-                  "throw" === c.type &&
-                    ((n = d), (r.method = "throw"), (r.arg = c.arg));
+                  "throw" === u.type &&
+                    ((n = d), (r.method = "throw"), (r.arg = u.arg));
                 }
               };
             })(t, r, i)),
@@ -2221,7 +2221,7 @@
             return { type: "throw", arg: I };
           }
         }
-        t.wrap = u;
+        t.wrap = c;
         var f = "suspendedStart",
           h = "suspendedYield",
           p = "executing",
@@ -2240,17 +2240,17 @@
         var x = (g.prototype = y.prototype = Object.create(w));
         function P(t) {
           ["next", "throw", "return"].forEach(function(e) {
-            c(t, e, function(t) {
+            u(t, e, function(t) {
               return this._invoke(e, t);
             });
           });
         }
         function k(t, e) {
           function r(o, a, i, s) {
-            var c = l(t[o], t, a);
-            if ("throw" !== c.type) {
-              var u = c.arg,
-                f = u.value;
+            var u = l(t[o], t, a);
+            if ("throw" !== u.type) {
+              var c = u.arg,
+                f = c.value;
               return f && "object" === typeof f && n.call(f, "__await")
                 ? e.resolve(f.__await).then(
                     function(t) {
@@ -2262,14 +2262,14 @@
                   )
                 : e.resolve(f).then(
                     function(t) {
-                      (u.value = t), i(u);
+                      (c.value = t), i(c);
                     },
                     function(t) {
                       return r("throw", t, i, s);
                     }
                   );
             }
-            s(c.arg);
+            s(u.arg);
           }
           var o;
           this._invoke = function(t, n) {
@@ -2357,7 +2357,7 @@
         return (
           (m.prototype = x.constructor = g),
           (g.constructor = m),
-          (m.displayName = c(g, s, "GeneratorFunction")),
+          (m.displayName = u(g, s, "GeneratorFunction")),
           (t.isGeneratorFunction = function(t) {
             var e = "function" === typeof t && t.constructor;
             return (
@@ -2369,7 +2369,7 @@
             return (
               Object.setPrototypeOf
                 ? Object.setPrototypeOf(t, g)
-                : ((t.__proto__ = g), c(t, s, "GeneratorFunction")),
+                : ((t.__proto__ = g), u(t, s, "GeneratorFunction")),
               (t.prototype = Object.create(x)),
               t
             );
@@ -2384,7 +2384,7 @@
           (t.AsyncIterator = k),
           (t.async = function(e, r, n, o, a) {
             void 0 === a && (a = Promise);
-            var i = new k(u(e, r, n, o), a);
+            var i = new k(c(e, r, n, o), a);
             return t.isGeneratorFunction(r)
               ? i
               : i.next().then(function(t) {
@@ -2392,7 +2392,7 @@
                 });
           }),
           P(x),
-          c(x, s, "Generator"),
+          u(x, s, "Generator"),
           (x[a] = function() {
             return this;
           }),
@@ -2457,15 +2457,15 @@
                   s = i.completion;
                 if ("root" === i.tryLoc) return o("end");
                 if (i.tryLoc <= this.prev) {
-                  var c = n.call(i, "catchLoc"),
-                    u = n.call(i, "finallyLoc");
-                  if (c && u) {
+                  var u = n.call(i, "catchLoc"),
+                    c = n.call(i, "finallyLoc");
+                  if (u && c) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
-                  } else if (c) {
+                  } else if (u) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                   } else {
-                    if (!u)
+                    if (!c)
                       throw new Error("try statement without catch or finally");
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
                   }
@@ -2569,8 +2569,8 @@
               (r.push(i.value), !e || r.length !== e);
               n = !0
             );
-          } catch (c) {
-            (o = !0), (a = c);
+          } catch (u) {
+            (o = !0), (a = u);
           } finally {
             try {
               n || null == s.return || s.return();
@@ -2626,7 +2626,7 @@
         }
         var i,
           s = !0,
-          c = !1;
+          u = !1;
         return {
           s: function() {
             r = t[Symbol.iterator]();
@@ -2636,13 +2636,13 @@
             return (s = t.done), t;
           },
           e: function(t) {
-            (c = !0), (i = t);
+            (u = !0), (i = t);
           },
           f: function() {
             try {
               s || null == r.return || r.return();
             } finally {
-              if (c) throw i;
+              if (u) throw i;
             }
           }
         };
@@ -2656,7 +2656,7 @@
         s = r("TqRt");
       (e.__esModule = !0),
         (e.useRouter = function() {
-          return c.default.useContext(l.RouterContext);
+          return u.default.useContext(l.RouterContext);
         }),
         (e.makePublicRouterInstance = function(t) {
           var e,
@@ -2676,7 +2676,7 @@
             a.f();
           }
           return (
-            (n.events = u.default.events),
+            (n.events = c.default.events),
             d.forEach(function(t) {
               n[t] = function() {
                 return r[t].apply(r, arguments);
@@ -2686,9 +2686,9 @@
           );
         }),
         (e.createRouter = e.withRouter = e.default = void 0);
-      var c = s(r("q1tI")),
-        u = i(r("elyg"));
-      (e.Router = u.default), (e.NextRouter = u.NextRouter);
+      var u = s(r("q1tI")),
+        c = i(r("elyg"));
+      (e.Router = c.default), (e.NextRouter = c.NextRouter);
       var l = r("qOIg"),
         f = s(r("0Bsm"));
       e.withRouter = f.default;
@@ -2726,7 +2726,7 @@
       }
       Object.defineProperty(h, "events", {
         get: function() {
-          return u.default.events;
+          return c.default.events;
         }
       }),
         p.forEach(function(t) {
@@ -2751,7 +2751,7 @@
           "hashChangeComplete"
         ].forEach(function(t) {
           h.ready(function() {
-            u.default.events.on(t, function() {
+            c.default.events.on(t, function() {
               var e = "on"
                   .concat(t.charAt(0).toUpperCase())
                   .concat(t.substring(1)),
@@ -2774,7 +2774,7 @@
         for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
           e[r] = arguments[r];
         return (
-          (h.router = n(u.default, e)),
+          (h.router = n(c.default, e)),
           h.readyCallbacks.forEach(function(t) {
             return t();
           }),
@@ -2844,11 +2844,11 @@
       function r(t, e, r, n, o, a, i) {
         try {
           var s = t[a](i),
-            c = s.value;
-        } catch (u) {
-          return void r(u);
+            u = s.value;
+        } catch (c) {
+          return void r(c);
         }
-        s.done ? e(c) : Promise.resolve(c).then(n, o);
+        s.done ? e(u) : Promise.resolve(u).then(n, o);
       }
       t.exports = function(t) {
         return function() {
@@ -2857,10 +2857,10 @@
           return new Promise(function(o, a) {
             var i = t.apply(e, n);
             function s(t) {
-              r(i, o, a, s, c, "next", t);
+              r(i, o, a, s, u, "next", t);
             }
-            function c(t) {
-              r(i, o, a, s, c, "throw", t);
+            function u(t) {
+              r(i, o, a, s, u, "throw", t);
             }
             s(void 0);
           });
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "YJpNboqeXBSJQp5ztO1tl",
+        "buildId": "Vn2w_rUgJqnKRgZbZ3MQT",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_buildManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_ssgManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "YJpNboqeXBSJQp5ztO1tl",
+        "buildId": "Vn2w_rUgJqnKRgZbZ3MQT",
         "isFallback": false,
         "gip": true
       }
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_buildManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_ssgManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "YJpNboqeXBSJQp5ztO1tl",
+        "buildId": "Vn2w_rUgJqnKRgZbZ3MQT",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_buildManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/YJpNboqeXBSJQp5ztO1tl/_ssgManifest.js"
+      src="/_next/static/Vn2w_rUgJqnKRgZbZ3MQT/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 054ff7b

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Failing test suites

Commit: 054ff7b

test/integration/typescript/test/index.test.js

  • TypeScript Features > should build the app
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error
Expand output

● TypeScript Features › should build the app

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

   97 |   it('should build the app', async () => {
   98 |     const output = await nextBuild(appDir, [], { stdout: true })
>  99 |     expect(output.stdout).toMatch(/Compiled successfully/)
      |                           ^
  100 |     expect(output.code).toBe(0)
  101 |   })
  102 |

  at Object.<anonymous> (integration/typescript/test/index.test.js:99:27)

● TypeScript Features › should compile with different types › should compile async getInitialProps for _error

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

  107 |         errorPage.replace('static ', 'static async ')
  108 |         const output = await nextBuild(appDir, [], { stdout: true })
> 109 |         expect(output.stdout).toMatch(/Compiled successfully/)
      |                               ^
  110 |       } finally {
  111 |         errorPage.restore()
  112 |       }

  at Object.<anonymous> (integration/typescript/test/index.test.js:109:31)

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 12.7s 13.1s ⚠️ +431ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.603 2.674 ⚠️ +0.07
/ avg req/sec 960.34 934.91 ⚠️ -25.43
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.477 1.494 ⚠️ +0.02
/error-in-render avg req/sec 1692.73 1672.9 ⚠️ -19.83
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 613 B 613 B
link.html gzip 621 B 621 B
withRouter.html gzip 607 B 608 B ⚠️ +1 B
Overall change 1.84 kB 1.84 kB ⚠️ +1 B

Diffs

Diff for 677f882d2ed8..68ee0afbc.js
@@ -1617,7 +1617,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this.clc = void 0;
           this.pageLoader = void 0;
           this._bps = void 0;
-          this.events = void 0;
+          this.events = (0, _mitt["default"])();
           this._wrapApp = void 0;
           this.isSsr = void 0;
           this.isFallback = void 0;
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 15s 14.5s -509ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..32e2.js gzip N/A 13.4 kB N/A
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB ⚠️ +14 B
routerDirect.js 1.42 MB 1.42 MB ⚠️ +14 B
withRouter.js 1.42 MB 1.42 MB ⚠️ +14 B
Overall change 7.01 MB 7.01 MB ⚠️ +42 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 14.6s 14.8s ⚠️ +215ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.02 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.598 2.586 -0.01
/ avg req/sec 962.39 966.78 +4.39
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.458 1.395 -0.06
/error-in-render avg req/sec 1714.51 1792.57 +78.06
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB -2 B
778-2fdd7b63..cd87.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB -2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 612 B 609 B -3 B
link.html gzip 617 B 614 B -3 B
withRouter.html gzip 605 B 604 B -1 B
Overall change 1.83 kB 1.83 kB -7 B

Diffs

Diff for 677f882d2ed8..2520de6c6.js
@@ -169,22 +169,22 @@
             o = t.protocol || "",
             i = t.pathname || "",
             s = t.hash || "",
-            c = t.query || "",
-            u = !1;
+            u = t.query || "",
+            c = !1;
           (e = e ? encodeURIComponent(e).replace(/%3A/i, ":") + "@" : ""),
             t.host
-              ? (u = e + t.host)
+              ? (c = e + t.host)
               : r &&
-                ((u = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
-                t.port && (u += ":" + t.port));
-          c &&
-            "object" === typeof c &&
-            (c = String(n.urlQueryToSearchParams(c)));
-          var l = t.search || (c && "?".concat(c)) || "";
+                ((c = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
+                t.port && (c += ":" + t.port));
+          u &&
+            "object" === typeof u &&
+            (u = String(n.urlQueryToSearchParams(u)));
+          var l = t.search || (u && "?".concat(u)) || "";
           o && ":" !== o.substr(-1) && (o += ":");
-          t.slashes || ((!o || a.test(o)) && !1 !== u)
-            ? ((u = "//" + (u || "")), i && "/" !== i[0] && (i = "/" + i))
-            : u || (u = "");
+          t.slashes || ((!o || a.test(o)) && !1 !== c)
+            ? ((c = "//" + (c || "")), i && "/" !== i[0] && (i = "/" + i))
+            : c || (c = "");
           s && "#" !== s[0] && (s = "#" + s);
           l && "?" !== l[0] && (l = "?" + l);
           return (
@@ -192,7 +192,7 @@
             (l = l.replace("#", "%23")),
             ""
               .concat(o)
-              .concat(u)
+              .concat(c)
               .concat(i)
               .concat(l)
               .concat(s)
@@ -273,7 +273,7 @@
         (e.default = void 0);
       i(r("Lab5"));
       var s = r("0G5g");
-      function c(t, e, r) {
+      function u(t, e, r) {
         var n,
           o = e.get(t);
         if (o) return "future" in o ? o.future : Promise.resolve(o);
@@ -289,7 +289,7 @@
             : a
         );
       }
-      var u = (function(t) {
+      var c = (function(t) {
         try {
           return (
             (t = document.createElement("link")),
@@ -403,7 +403,7 @@
         }
         return {
           whenEntrypoint: function(t) {
-            return c(t, e);
+            return u(t, e);
           },
           onEntrypoint: function(t, r) {
             Promise.resolve(r)
@@ -425,12 +425,12 @@
           },
           loadRoute: function(r) {
             var i = this;
-            return c(
+            return u(
               r,
               l,
               a(
                 n.mark(function a() {
-                  var s, c, u, l, y, m, g, w;
+                  var s, u, c, l, y, m, g, w;
                   return n.wrap(
                     function(n) {
                       for (;;)
@@ -440,12 +440,12 @@
                           case 3:
                             return (
                               (s = n.sent),
-                              (c = s.scripts),
-                              (u = s.css),
+                              (u = s.scripts),
+                              (c = s.css),
                               (n.next = 8),
                               Promise.all([
-                                e.has(r) ? [] : Promise.all(c.map(p)),
-                                Promise.all(u.map(v))
+                                e.has(r) ? [] : Promise.all(u.map(p)),
+                                Promise.all(c.map(v))
                               ])
                             );
                           case 8:
@@ -498,7 +498,7 @@
               : d(t, e)
                   .then(function(t) {
                     return Promise.all(
-                      u
+                      c
                         ? t.scripts.map(function(t) {
                             return (
                               (e = t),
@@ -730,8 +730,8 @@
         (e.interpolateAs = L),
         (e.resolveHref = O),
         (e.default = void 0);
-      var c = r("X24+"),
-        u = r("Nh2W"),
+      var u = r("X24+"),
+        c = r("Nh2W"),
         l = r("wkBG"),
         f = (r("3wub"), w(r("dZ6Y"))),
         h = r("g/15"),
@@ -765,7 +765,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, u.normalizePathTrailingSlash)(e)
               : "".concat(e).concat("/" === P(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -798,14 +798,14 @@
               r = a[t],
               o = r.repeat,
               s = r.optional,
-              c = "[".concat(o ? "..." : "").concat(t, "]");
+              u = "[".concat(o ? "..." : "").concat(t, "]");
             return (
-              s && (c = "".concat(e ? "" : "/", "[").concat(c, "]")),
+              s && (u = "".concat(e ? "" : "/", "[").concat(u, "]")),
               o && !Array.isArray(e) && (e = [e]),
               (s || t in i) &&
                 (n =
                   n.replace(
-                    c,
+                    u,
                     o
                       ? e
                           .map(function(t) {
@@ -834,13 +834,13 @@
         if (!R(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, u.normalizePathTrailingSlash)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var s = (0, v.searchParamsToUrlQuery)(a.searchParams),
-              u = L(a.pathname, a.pathname, s),
-              l = u.result,
-              f = u.params;
+              c = L(a.pathname, a.pathname, s),
+              l = c.result,
+              f = c.params;
             l &&
               (i = (0, h.formatWithValidation)({
                 pathname: l,
@@ -864,16 +864,16 @@
           o = s(n, 2),
           a = o[0],
           i = o[1],
-          c = (0, h.getLocationOrigin)(),
-          u = a.startsWith(c),
-          l = i && i.startsWith(c);
+          u = (0, h.getLocationOrigin)(),
+          c = a.startsWith(u),
+          l = i && i.startsWith(u);
         (a = I(a)), (i = i ? I(i) : i);
-        var f = u ? a : S(a),
+        var f = c ? a : S(a),
           p = r ? I(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
       function j(t, e) {
-        var r = (0, c.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
+        var r = (0, u.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
         return "/404" === r || "/_error" === r
           ? t
           : (e.includes(r) ||
@@ -884,7 +884,7 @@
                 )
                   return (t = e), !0;
               }),
-            (0, c.removePathTrailingSlash)(t));
+            (0, u.removePathTrailingSlash)(t));
       }
       var A = Symbol("SSG_DATA_NOT_FOUND");
       function D(t, e) {
@@ -903,22 +903,22 @@
       }
       function M(t, e) {
         return D(t, e ? 3 : 1).catch(function(t) {
-          throw (e || (0, u.markAssetError)(t), t);
+          throw (e || (0, c.markAssetError)(t), t);
         });
       }
       var N = (function() {
         function t(e, r, n, o) {
           var i = this,
             s = o.initialProps,
-            u = o.pageLoader,
+            c = o.pageLoader,
             l = o.App,
-            f = o.wrapApp,
-            v = o.Component,
-            y = o.err,
-            m = o.subscription,
-            g = o.isFallback,
-            w = o.locale,
-            b = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
+            v = o.wrapApp,
+            y = o.Component,
+            m = o.err,
+            g = o.subscription,
+            w = o.isFallback,
+            b = o.locale,
+            _ = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
           a(this, t),
             (this.route = void 0),
             (this.pathname = void 0),
@@ -932,7 +932,7 @@
             (this.clc = void 0),
             (this.pageLoader = void 0),
             (this._bps = void 0),
-            (this.events = void 0),
+            (this.events = (0, f.default)()),
             (this._wrapApp = void 0),
             (this.isSsr = void 0),
             (this.isFallback = void 0),
@@ -970,52 +970,52 @@
                     );
                 }
               } else {
-                var c = i.pathname,
-                  u = i.query;
+                var u = i.pathname,
+                  c = i.query;
                 i.changeState(
                   "replaceState",
-                  (0, h.formatWithValidation)({ pathname: S(c), query: u }),
+                  (0, h.formatWithValidation)({ pathname: S(u), query: c }),
                   (0, h.getURL)()
                 );
               }
             }),
-            (this.route = (0, c.removePathTrailingSlash)(e)),
+            (this.route = (0, u.removePathTrailingSlash)(e)),
             (this.components = {}),
             "/_error" !== e &&
               (this.components[this.route] = {
-                Component: v,
+                Component: y,
                 initial: !0,
                 props: s,
-                err: y,
+                err: m,
                 __N_SSG: s && s.__N_SSG,
                 __N_SSP: s && s.__N_SSP
               }),
             (this.components["/_app"] = { Component: l, styleSheets: [] }),
             (this.events = t.events),
-            (this.pageLoader = u),
+            (this.pageLoader = c),
             (this.pathname = e),
             (this.query = r);
-          var _ = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
-          (this.asPath = _ ? e : n),
+          var x = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
+          (this.asPath = x ? e : n),
             (this.basePath = ""),
-            (this.sub = m),
+            (this.sub = g),
             (this.clc = null),
-            (this._wrapApp = f),
+            (this._wrapApp = v),
             (this.isSsr = !0),
-            (this.isFallback = g),
+            (this.isFallback = w),
             (this.isReady = !(
               !self.__NEXT_DATA__.gssp &&
               !self.__NEXT_DATA__.gip &&
-              (_ || self.location.search)
+              (x || self.location.search)
             )),
-            (this.isPreview = !!b),
+            (this.isPreview = !!_),
             (this.isLocaleDomain = !1),
             "//" !== n.substr(0, 2) &&
               this.changeState(
                 "replaceState",
                 (0, h.formatWithValidation)({ pathname: S(e), query: r }),
                 (0, h.getURL)(),
-                { locale: w }
+                { locale: b }
               ),
             window.addEventListener("popstate", this.onPopState);
         }
@@ -1164,7 +1164,7 @@
                               return (
                                 (I = e.sent),
                                 (e.next = 42),
-                                (0, u.getClientBuildManifest)()
+                                (0, c.getClientBuildManifest)()
                               );
                             case 42:
                               (D = e.sent), D.__rewrites, (e.next = 50);
@@ -1182,13 +1182,13 @@
                                 (M = a),
                                 "/_error" !==
                                   (P = P
-                                    ? (0, c.removePathTrailingSlash)(E(P))
+                                    ? (0, u.removePathTrailingSlash)(E(P))
                                     : P) &&
                                   ((b.pathname = j(P, I)),
                                   b.pathname !== P &&
                                     ((P = b.pathname),
                                     (o = (0, h.formatWithValidation)(b)))),
-                                (N = (0, c.removePathTrailingSlash)(P)),
+                                (N = (0, u.removePathTrailingSlash)(P)),
                                 R(a))
                               ) {
                                 e.next = 60;
@@ -1444,7 +1444,7 @@
               key: "handleRouteInfoError",
               value: (function() {
                 var e = o(
-                  n.mark(function e(r, o, a, i, s, c) {
+                  n.mark(function e(r, o, a, i, s, u) {
                     var l, f, h, p;
                     return n.wrap(
                       function(e) {
@@ -1457,7 +1457,7 @@
                               }
                               throw r;
                             case 2:
-                              if (!(0, u.isAssetError)(r) && !c) {
+                              if (!(0, c.isAssetError)(r) && !u) {
                                 e.next = 6;
                                 break;
                               }
@@ -1553,8 +1553,8 @@
               value: (function() {
                 var t = o(
                   n.mark(function t(e, r, o, a, i, s) {
-                    var c,
-                      u,
+                    var u,
+                      c,
                       l,
                       f,
                       p,
@@ -1569,19 +1569,19 @@
                             case 0:
                               if (
                                 ((t.prev = 0),
-                                (c = this.components[e]),
-                                !s.shallow || !c || this.route !== e)
+                                (u = this.components[e]),
+                                !s.shallow || !u || this.route !== e)
                               ) {
                                 t.next = 4;
                                 break;
                               }
-                              return t.abrupt("return", c);
+                              return t.abrupt("return", u);
                             case 4:
-                              if (!(u = c && "initial" in c ? void 0 : c)) {
+                              if (!(c = u && "initial" in u ? void 0 : u)) {
                                 t.next = 9;
                                 break;
                               }
-                              (t.t0 = u), (t.next = 12);
+                              (t.t0 = c), (t.next = 12);
                               break;
                             case 9:
                               return (
@@ -1690,9 +1690,9 @@
                   o = r[1],
                   a = t.split("#"),
                   i = s(a, 2),
-                  c = i[0],
-                  u = i[1];
-                return !(!u || n !== c || o !== u) || (n === c && o !== u);
+                  u = i[0],
+                  c = i[1];
+                return !(!c || n !== u || o !== c) || (n === u && o !== c);
               }
             },
             {
@@ -1726,7 +1726,7 @@
                       a,
                       i,
                       s,
-                      u,
+                      c,
                       l,
                       f,
                       p,
@@ -1749,7 +1749,7 @@
                                 this.pageLoader.getPageList()
                               );
                             case 7:
-                              (s = t.sent), (u = r), (t.next = 19);
+                              (s = t.sent), (c = r), (t.next = 19);
                               break;
                             case 12:
                               (f = t.sent),
@@ -1764,7 +1764,7 @@
                                   },
                                   this.locales
                                 )),
-                                (u = x(E(p.asPath), this.locale)),
+                                (c = x(E(p.asPath), this.locale)),
                                 p.matchedPage &&
                                   p.resolvedHref &&
                                   ((i = p.resolvedHref),
@@ -1778,7 +1778,7 @@
                                   ((i = a.pathname),
                                   (e = (0, h.formatWithValidation)(a)));
                             case 21:
-                              (v = (0, c.removePathTrailingSlash)(i)),
+                              (v = (0, u.removePathTrailingSlash)(i)),
                                 (t.next = 24);
                               break;
                             case 24:
@@ -1791,7 +1791,7 @@
                                       m._getStaticData(
                                         m.pageLoader.getDataHref(
                                           e,
-                                          u,
+                                          c,
                                           !0,
                                           "undefined" !== typeof o.locale
                                             ? o.locale
@@ -1975,8 +1975,8 @@
           return t.substring(e.length);
         }),
         (e.getDisplayName = s),
-        (e.isResSent = c),
-        (e.loadGetInitialProps = u),
+        (e.isResSent = u),
+        (e.loadGetInitialProps = c),
         (e.formatWithValidation = function(t) {
           0;
           return (0, a.formatUrl)(t);
@@ -1996,10 +1996,10 @@
       function s(t) {
         return "string" === typeof t ? t : t.displayName || t.name || "Unknown";
       }
-      function c(t) {
+      function u(t) {
         return t.finished || t.headersSent;
       }
-      function u(t, e) {
+      function c(t, e) {
         return l.apply(this, arguments);
       }
       function l() {
@@ -2023,7 +2023,7 @@
                       t.next = 11;
                       break;
                     }
-                    return (t.next = 9), u(r.Component, r.ctx);
+                    return (t.next = 9), c(r.Component, r.ctx);
                   case 9:
                     return (
                       (t.t0 = t.sent), t.abrupt("return", { pageProps: t.t0 })
@@ -2033,7 +2033,7 @@
                   case 12:
                     return (t.next = 14), e.getInitialProps(r);
                   case 14:
-                    if (((a = t.sent), !o || !c(o))) {
+                    if (((a = t.sent), !o || !u(o))) {
                       t.next = 17;
                       break;
                     }
@@ -2126,8 +2126,8 @@
             a = e ? new URL(e, r) : r,
             i = new URL(t, a),
             s = i.pathname,
-            c = i.searchParams,
-            u = i.search,
+            u = i.searchParams,
+            c = i.search,
             l = i.hash,
             f = i.href;
           if (i.origin !== r.origin)
@@ -2136,8 +2136,8 @@
             );
           return {
             pathname: s,
-            query: (0, o.searchParamsToUrlQuery)(c),
-            search: u,
+            query: (0, o.searchParamsToUrlQuery)(u),
+            search: c,
             hash: l,
             href: f.slice(r.origin.length)
           };
@@ -2155,7 +2155,7 @@
           a = o.iterator || "@@iterator",
           i = o.asyncIterator || "@@asyncIterator",
           s = o.toStringTag || "@@toStringTag";
-        function c(t, e, r) {
+        function u(t, e, r) {
           return (
             Object.defineProperty(t, e, {
               value: r,
@@ -2167,13 +2167,13 @@
           );
         }
         try {
-          c({}, "");
+          u({}, "");
         } catch (I) {
-          c = function(t, e, r) {
+          u = function(t, e, r) {
             return (t[e] = r);
           };
         }
-        function u(t, e, r, n) {
+        function c(t, e, r, n) {
           var o = e && e.prototype instanceof y ? e : y,
             a = Object.create(o.prototype),
             i = new L(n || []);
@@ -2201,13 +2201,13 @@
                     r.dispatchException(r.arg);
                   } else "return" === r.method && r.abrupt("return", r.arg);
                   n = p;
-                  var c = l(t, e, r);
-                  if ("normal" === c.type) {
-                    if (((n = r.done ? d : h), c.arg === v)) continue;
-                    return { value: c.arg, done: r.done };
+                  var u = l(t, e, r);
+                  if ("normal" === u.type) {
+                    if (((n = r.done ? d : h), u.arg === v)) continue;
+                    return { value: u.arg, done: r.done };
                   }
-                  "throw" === c.type &&
-                    ((n = d), (r.method = "throw"), (r.arg = c.arg));
+                  "throw" === u.type &&
+                    ((n = d), (r.method = "throw"), (r.arg = u.arg));
                 }
               };
             })(t, r, i)),
@@ -2221,7 +2221,7 @@
             return { type: "throw", arg: I };
           }
         }
-        t.wrap = u;
+        t.wrap = c;
         var f = "suspendedStart",
           h = "suspendedYield",
           p = "executing",
@@ -2240,17 +2240,17 @@
         var x = (g.prototype = y.prototype = Object.create(w));
         function P(t) {
           ["next", "throw", "return"].forEach(function(e) {
-            c(t, e, function(t) {
+            u(t, e, function(t) {
               return this._invoke(e, t);
             });
           });
         }
         function k(t, e) {
           function r(o, a, i, s) {
-            var c = l(t[o], t, a);
-            if ("throw" !== c.type) {
-              var u = c.arg,
-                f = u.value;
+            var u = l(t[o], t, a);
+            if ("throw" !== u.type) {
+              var c = u.arg,
+                f = c.value;
               return f && "object" === typeof f && n.call(f, "__await")
                 ? e.resolve(f.__await).then(
                     function(t) {
@@ -2262,14 +2262,14 @@
                   )
                 : e.resolve(f).then(
                     function(t) {
-                      (u.value = t), i(u);
+                      (c.value = t), i(c);
                     },
                     function(t) {
                       return r("throw", t, i, s);
                     }
                   );
             }
-            s(c.arg);
+            s(u.arg);
           }
           var o;
           this._invoke = function(t, n) {
@@ -2357,7 +2357,7 @@
         return (
           (m.prototype = x.constructor = g),
           (g.constructor = m),
-          (m.displayName = c(g, s, "GeneratorFunction")),
+          (m.displayName = u(g, s, "GeneratorFunction")),
           (t.isGeneratorFunction = function(t) {
             var e = "function" === typeof t && t.constructor;
             return (
@@ -2369,7 +2369,7 @@
             return (
               Object.setPrototypeOf
                 ? Object.setPrototypeOf(t, g)
-                : ((t.__proto__ = g), c(t, s, "GeneratorFunction")),
+                : ((t.__proto__ = g), u(t, s, "GeneratorFunction")),
               (t.prototype = Object.create(x)),
               t
             );
@@ -2384,7 +2384,7 @@
           (t.AsyncIterator = k),
           (t.async = function(e, r, n, o, a) {
             void 0 === a && (a = Promise);
-            var i = new k(u(e, r, n, o), a);
+            var i = new k(c(e, r, n, o), a);
             return t.isGeneratorFunction(r)
               ? i
               : i.next().then(function(t) {
@@ -2392,7 +2392,7 @@
                 });
           }),
           P(x),
-          c(x, s, "Generator"),
+          u(x, s, "Generator"),
           (x[a] = function() {
             return this;
           }),
@@ -2457,15 +2457,15 @@
                   s = i.completion;
                 if ("root" === i.tryLoc) return o("end");
                 if (i.tryLoc <= this.prev) {
-                  var c = n.call(i, "catchLoc"),
-                    u = n.call(i, "finallyLoc");
-                  if (c && u) {
+                  var u = n.call(i, "catchLoc"),
+                    c = n.call(i, "finallyLoc");
+                  if (u && c) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
-                  } else if (c) {
+                  } else if (u) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                   } else {
-                    if (!u)
+                    if (!c)
                       throw new Error("try statement without catch or finally");
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
                   }
@@ -2569,8 +2569,8 @@
               (r.push(i.value), !e || r.length !== e);
               n = !0
             );
-          } catch (c) {
-            (o = !0), (a = c);
+          } catch (u) {
+            (o = !0), (a = u);
           } finally {
             try {
               n || null == s.return || s.return();
@@ -2626,7 +2626,7 @@
         }
         var i,
           s = !0,
-          c = !1;
+          u = !1;
         return {
           s: function() {
             r = t[Symbol.iterator]();
@@ -2636,13 +2636,13 @@
             return (s = t.done), t;
           },
           e: function(t) {
-            (c = !0), (i = t);
+            (u = !0), (i = t);
           },
           f: function() {
             try {
               s || null == r.return || r.return();
             } finally {
-              if (c) throw i;
+              if (u) throw i;
             }
           }
         };
@@ -2656,7 +2656,7 @@
         s = r("TqRt");
       (e.__esModule = !0),
         (e.useRouter = function() {
-          return c.default.useContext(l.RouterContext);
+          return u.default.useContext(l.RouterContext);
         }),
         (e.makePublicRouterInstance = function(t) {
           var e,
@@ -2676,7 +2676,7 @@
             a.f();
           }
           return (
-            (n.events = u.default.events),
+            (n.events = c.default.events),
             d.forEach(function(t) {
               n[t] = function() {
                 return r[t].apply(r, arguments);
@@ -2686,9 +2686,9 @@
           );
         }),
         (e.createRouter = e.withRouter = e.default = void 0);
-      var c = s(r("q1tI")),
-        u = i(r("elyg"));
-      (e.Router = u.default), (e.NextRouter = u.NextRouter);
+      var u = s(r("q1tI")),
+        c = i(r("elyg"));
+      (e.Router = c.default), (e.NextRouter = c.NextRouter);
       var l = r("qOIg"),
         f = s(r("0Bsm"));
       e.withRouter = f.default;
@@ -2726,7 +2726,7 @@
       }
       Object.defineProperty(h, "events", {
         get: function() {
-          return u.default.events;
+          return c.default.events;
         }
       }),
         p.forEach(function(t) {
@@ -2751,7 +2751,7 @@
           "hashChangeComplete"
         ].forEach(function(t) {
           h.ready(function() {
-            u.default.events.on(t, function() {
+            c.default.events.on(t, function() {
               var e = "on"
                   .concat(t.charAt(0).toUpperCase())
                   .concat(t.substring(1)),
@@ -2774,7 +2774,7 @@
         for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
           e[r] = arguments[r];
         return (
-          (h.router = n(u.default, e)),
+          (h.router = n(c.default, e)),
           h.readyCallbacks.forEach(function(t) {
             return t();
           }),
@@ -2844,11 +2844,11 @@
       function r(t, e, r, n, o, a, i) {
         try {
           var s = t[a](i),
-            c = s.value;
-        } catch (u) {
-          return void r(u);
+            u = s.value;
+        } catch (c) {
+          return void r(c);
         }
-        s.done ? e(c) : Promise.resolve(c).then(n, o);
+        s.done ? e(u) : Promise.resolve(u).then(n, o);
       }
       t.exports = function(t) {
         return function() {
@@ -2857,10 +2857,10 @@
           return new Promise(function(o, a) {
             var i = t.apply(e, n);
             function s(t) {
-              r(i, o, a, s, c, "next", t);
+              r(i, o, a, s, u, "next", t);
             }
-            function c(t) {
-              r(i, o, a, s, c, "throw", t);
+            function u(t) {
+              r(i, o, a, s, u, "throw", t);
             }
             s(void 0);
           });
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "dbouaxkF-vuAaCDt1k1U1",
+        "buildId": "lILupEN0P6QHxuld7_VZu",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_buildManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_ssgManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "dbouaxkF-vuAaCDt1k1U1",
+        "buildId": "lILupEN0P6QHxuld7_VZu",
         "isFallback": false,
         "gip": true
       }
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_buildManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_ssgManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "dbouaxkF-vuAaCDt1k1U1",
+        "buildId": "lILupEN0P6QHxuld7_VZu",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_buildManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/dbouaxkF-vuAaCDt1k1U1/_ssgManifest.js"
+      src="/_next/static/lILupEN0P6QHxuld7_VZu/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: b37ee2c

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Failing test suites

Commit: b37ee2c

test/integration/typescript/test/index.test.js

  • TypeScript Features > should build the app
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error
Expand output

● TypeScript Features › should build the app

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

   97 |   it('should build the app', async () => {
   98 |     const output = await nextBuild(appDir, [], { stdout: true })
>  99 |     expect(output.stdout).toMatch(/Compiled successfully/)
      |                           ^
  100 |     expect(output.code).toBe(0)
  101 |   })
  102 |

  at Object.<anonymous> (integration/typescript/test/index.test.js:99:27)

● TypeScript Features › should compile with different types › should compile async getInitialProps for _error

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

  107 |         errorPage.replace('static ', 'static async ')
  108 |         const output = await nextBuild(appDir, [], { stdout: true })
> 109 |         expect(output.stdout).toMatch(/Compiled successfully/)
      |                               ^
  110 |       } finally {
  111 |         errorPage.restore()
  112 |       }

  at Object.<anonymous> (integration/typescript/test/index.test.js:109:31)

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 9.7s 9.9s ⚠️ +185ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.096 2.072 -0.02
/ avg req/sec 1192.47 1206.74 +14.27
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.114 1.049 -0.07
/error-in-render avg req/sec 2243.89 2382.95 +139.06
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 613 B 614 B ⚠️ +1 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB ⚠️ +1 B

Diffs

Diff for 677f882d2ed8..68ee0afbc.js
@@ -1617,7 +1617,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this.clc = void 0;
           this.pageLoader = void 0;
           this._bps = void 0;
-          this.events = void 0;
+          this.events = (0, _mitt["default"])();
           this._wrapApp = void 0;
           this.isSsr = void 0;
           this.isFallback = void 0;
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 11.6s 11.4s -177ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..32e2.js gzip N/A 13.4 kB N/A
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB ⚠️ +14 B
routerDirect.js 1.42 MB 1.42 MB ⚠️ +14 B
withRouter.js 1.42 MB 1.42 MB ⚠️ +14 B
Overall change 7.01 MB 7.01 MB ⚠️ +42 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 11.6s 11.7s ⚠️ +59ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.055 2.087 ⚠️ +0.03
/ avg req/sec 1216.74 1197.67 ⚠️ -19.07
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.076 1.06 -0.02
/error-in-render avg req/sec 2322.35 2358.78 +36.43
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB -2 B
778-5cc798ac..5c25.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB -2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 610 B 610 B
link.html gzip 617 B 615 B -2 B
withRouter.html gzip 605 B 604 B -1 B
Overall change 1.83 kB 1.83 kB -3 B

Diffs

Diff for 677f882d2ed8..2520de6c6.js
@@ -169,22 +169,22 @@
             o = t.protocol || "",
             i = t.pathname || "",
             s = t.hash || "",
-            c = t.query || "",
-            u = !1;
+            u = t.query || "",
+            c = !1;
           (e = e ? encodeURIComponent(e).replace(/%3A/i, ":") + "@" : ""),
             t.host
-              ? (u = e + t.host)
+              ? (c = e + t.host)
               : r &&
-                ((u = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
-                t.port && (u += ":" + t.port));
-          c &&
-            "object" === typeof c &&
-            (c = String(n.urlQueryToSearchParams(c)));
-          var l = t.search || (c && "?".concat(c)) || "";
+                ((c = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
+                t.port && (c += ":" + t.port));
+          u &&
+            "object" === typeof u &&
+            (u = String(n.urlQueryToSearchParams(u)));
+          var l = t.search || (u && "?".concat(u)) || "";
           o && ":" !== o.substr(-1) && (o += ":");
-          t.slashes || ((!o || a.test(o)) && !1 !== u)
-            ? ((u = "//" + (u || "")), i && "/" !== i[0] && (i = "/" + i))
-            : u || (u = "");
+          t.slashes || ((!o || a.test(o)) && !1 !== c)
+            ? ((c = "//" + (c || "")), i && "/" !== i[0] && (i = "/" + i))
+            : c || (c = "");
           s && "#" !== s[0] && (s = "#" + s);
           l && "?" !== l[0] && (l = "?" + l);
           return (
@@ -192,7 +192,7 @@
             (l = l.replace("#", "%23")),
             ""
               .concat(o)
-              .concat(u)
+              .concat(c)
               .concat(i)
               .concat(l)
               .concat(s)
@@ -273,7 +273,7 @@
         (e.default = void 0);
       i(r("Lab5"));
       var s = r("0G5g");
-      function c(t, e, r) {
+      function u(t, e, r) {
         var n,
           o = e.get(t);
         if (o) return "future" in o ? o.future : Promise.resolve(o);
@@ -289,7 +289,7 @@
             : a
         );
       }
-      var u = (function(t) {
+      var c = (function(t) {
         try {
           return (
             (t = document.createElement("link")),
@@ -403,7 +403,7 @@
         }
         return {
           whenEntrypoint: function(t) {
-            return c(t, e);
+            return u(t, e);
           },
           onEntrypoint: function(t, r) {
             Promise.resolve(r)
@@ -425,12 +425,12 @@
           },
           loadRoute: function(r) {
             var i = this;
-            return c(
+            return u(
               r,
               l,
               a(
                 n.mark(function a() {
-                  var s, c, u, l, y, m, g, w;
+                  var s, u, c, l, y, m, g, w;
                   return n.wrap(
                     function(n) {
                       for (;;)
@@ -440,12 +440,12 @@
                           case 3:
                             return (
                               (s = n.sent),
-                              (c = s.scripts),
-                              (u = s.css),
+                              (u = s.scripts),
+                              (c = s.css),
                               (n.next = 8),
                               Promise.all([
-                                e.has(r) ? [] : Promise.all(c.map(p)),
-                                Promise.all(u.map(v))
+                                e.has(r) ? [] : Promise.all(u.map(p)),
+                                Promise.all(c.map(v))
                               ])
                             );
                           case 8:
@@ -498,7 +498,7 @@
               : d(t, e)
                   .then(function(t) {
                     return Promise.all(
-                      u
+                      c
                         ? t.scripts.map(function(t) {
                             return (
                               (e = t),
@@ -730,8 +730,8 @@
         (e.interpolateAs = L),
         (e.resolveHref = O),
         (e.default = void 0);
-      var c = r("X24+"),
-        u = r("Nh2W"),
+      var u = r("X24+"),
+        c = r("Nh2W"),
         l = r("wkBG"),
         f = (r("3wub"), w(r("dZ6Y"))),
         h = r("g/15"),
@@ -765,7 +765,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, u.normalizePathTrailingSlash)(e)
               : "".concat(e).concat("/" === P(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -798,14 +798,14 @@
               r = a[t],
               o = r.repeat,
               s = r.optional,
-              c = "[".concat(o ? "..." : "").concat(t, "]");
+              u = "[".concat(o ? "..." : "").concat(t, "]");
             return (
-              s && (c = "".concat(e ? "" : "/", "[").concat(c, "]")),
+              s && (u = "".concat(e ? "" : "/", "[").concat(u, "]")),
               o && !Array.isArray(e) && (e = [e]),
               (s || t in i) &&
                 (n =
                   n.replace(
-                    c,
+                    u,
                     o
                       ? e
                           .map(function(t) {
@@ -834,13 +834,13 @@
         if (!R(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, u.normalizePathTrailingSlash)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var s = (0, v.searchParamsToUrlQuery)(a.searchParams),
-              u = L(a.pathname, a.pathname, s),
-              l = u.result,
-              f = u.params;
+              c = L(a.pathname, a.pathname, s),
+              l = c.result,
+              f = c.params;
             l &&
               (i = (0, h.formatWithValidation)({
                 pathname: l,
@@ -864,16 +864,16 @@
           o = s(n, 2),
           a = o[0],
           i = o[1],
-          c = (0, h.getLocationOrigin)(),
-          u = a.startsWith(c),
-          l = i && i.startsWith(c);
+          u = (0, h.getLocationOrigin)(),
+          c = a.startsWith(u),
+          l = i && i.startsWith(u);
         (a = I(a)), (i = i ? I(i) : i);
-        var f = u ? a : S(a),
+        var f = c ? a : S(a),
           p = r ? I(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
       function j(t, e) {
-        var r = (0, c.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
+        var r = (0, u.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
         return "/404" === r || "/_error" === r
           ? t
           : (e.includes(r) ||
@@ -884,7 +884,7 @@
                 )
                   return (t = e), !0;
               }),
-            (0, c.removePathTrailingSlash)(t));
+            (0, u.removePathTrailingSlash)(t));
       }
       var A = Symbol("SSG_DATA_NOT_FOUND");
       function D(t, e) {
@@ -903,22 +903,22 @@
       }
       function M(t, e) {
         return D(t, e ? 3 : 1).catch(function(t) {
-          throw (e || (0, u.markAssetError)(t), t);
+          throw (e || (0, c.markAssetError)(t), t);
         });
       }
       var N = (function() {
         function t(e, r, n, o) {
           var i = this,
             s = o.initialProps,
-            u = o.pageLoader,
+            c = o.pageLoader,
             l = o.App,
-            f = o.wrapApp,
-            v = o.Component,
-            y = o.err,
-            m = o.subscription,
-            g = o.isFallback,
-            w = o.locale,
-            b = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
+            v = o.wrapApp,
+            y = o.Component,
+            m = o.err,
+            g = o.subscription,
+            w = o.isFallback,
+            b = o.locale,
+            _ = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
           a(this, t),
             (this.route = void 0),
             (this.pathname = void 0),
@@ -932,7 +932,7 @@
             (this.clc = void 0),
             (this.pageLoader = void 0),
             (this._bps = void 0),
-            (this.events = void 0),
+            (this.events = (0, f.default)()),
             (this._wrapApp = void 0),
             (this.isSsr = void 0),
             (this.isFallback = void 0),
@@ -970,52 +970,52 @@
                     );
                 }
               } else {
-                var c = i.pathname,
-                  u = i.query;
+                var u = i.pathname,
+                  c = i.query;
                 i.changeState(
                   "replaceState",
-                  (0, h.formatWithValidation)({ pathname: S(c), query: u }),
+                  (0, h.formatWithValidation)({ pathname: S(u), query: c }),
                   (0, h.getURL)()
                 );
               }
             }),
-            (this.route = (0, c.removePathTrailingSlash)(e)),
+            (this.route = (0, u.removePathTrailingSlash)(e)),
             (this.components = {}),
             "/_error" !== e &&
               (this.components[this.route] = {
-                Component: v,
+                Component: y,
                 initial: !0,
                 props: s,
-                err: y,
+                err: m,
                 __N_SSG: s && s.__N_SSG,
                 __N_SSP: s && s.__N_SSP
               }),
             (this.components["/_app"] = { Component: l, styleSheets: [] }),
             (this.events = t.events),
-            (this.pageLoader = u),
+            (this.pageLoader = c),
             (this.pathname = e),
             (this.query = r);
-          var _ = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
-          (this.asPath = _ ? e : n),
+          var x = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
+          (this.asPath = x ? e : n),
             (this.basePath = ""),
-            (this.sub = m),
+            (this.sub = g),
             (this.clc = null),
-            (this._wrapApp = f),
+            (this._wrapApp = v),
             (this.isSsr = !0),
-            (this.isFallback = g),
+            (this.isFallback = w),
             (this.isReady = !(
               !self.__NEXT_DATA__.gssp &&
               !self.__NEXT_DATA__.gip &&
-              (_ || self.location.search)
+              (x || self.location.search)
             )),
-            (this.isPreview = !!b),
+            (this.isPreview = !!_),
             (this.isLocaleDomain = !1),
             "//" !== n.substr(0, 2) &&
               this.changeState(
                 "replaceState",
                 (0, h.formatWithValidation)({ pathname: S(e), query: r }),
                 (0, h.getURL)(),
-                { locale: w }
+                { locale: b }
               ),
             window.addEventListener("popstate", this.onPopState);
         }
@@ -1164,7 +1164,7 @@
                               return (
                                 (I = e.sent),
                                 (e.next = 42),
-                                (0, u.getClientBuildManifest)()
+                                (0, c.getClientBuildManifest)()
                               );
                             case 42:
                               (D = e.sent), D.__rewrites, (e.next = 50);
@@ -1182,13 +1182,13 @@
                                 (M = a),
                                 "/_error" !==
                                   (P = P
-                                    ? (0, c.removePathTrailingSlash)(E(P))
+                                    ? (0, u.removePathTrailingSlash)(E(P))
                                     : P) &&
                                   ((b.pathname = j(P, I)),
                                   b.pathname !== P &&
                                     ((P = b.pathname),
                                     (o = (0, h.formatWithValidation)(b)))),
-                                (N = (0, c.removePathTrailingSlash)(P)),
+                                (N = (0, u.removePathTrailingSlash)(P)),
                                 R(a))
                               ) {
                                 e.next = 60;
@@ -1444,7 +1444,7 @@
               key: "handleRouteInfoError",
               value: (function() {
                 var e = o(
-                  n.mark(function e(r, o, a, i, s, c) {
+                  n.mark(function e(r, o, a, i, s, u) {
                     var l, f, h, p;
                     return n.wrap(
                       function(e) {
@@ -1457,7 +1457,7 @@
                               }
                               throw r;
                             case 2:
-                              if (!(0, u.isAssetError)(r) && !c) {
+                              if (!(0, c.isAssetError)(r) && !u) {
                                 e.next = 6;
                                 break;
                               }
@@ -1553,8 +1553,8 @@
               value: (function() {
                 var t = o(
                   n.mark(function t(e, r, o, a, i, s) {
-                    var c,
-                      u,
+                    var u,
+                      c,
                       l,
                       f,
                       p,
@@ -1569,19 +1569,19 @@
                             case 0:
                               if (
                                 ((t.prev = 0),
-                                (c = this.components[e]),
-                                !s.shallow || !c || this.route !== e)
+                                (u = this.components[e]),
+                                !s.shallow || !u || this.route !== e)
                               ) {
                                 t.next = 4;
                                 break;
                               }
-                              return t.abrupt("return", c);
+                              return t.abrupt("return", u);
                             case 4:
-                              if (!(u = c && "initial" in c ? void 0 : c)) {
+                              if (!(c = u && "initial" in u ? void 0 : u)) {
                                 t.next = 9;
                                 break;
                               }
-                              (t.t0 = u), (t.next = 12);
+                              (t.t0 = c), (t.next = 12);
                               break;
                             case 9:
                               return (
@@ -1690,9 +1690,9 @@
                   o = r[1],
                   a = t.split("#"),
                   i = s(a, 2),
-                  c = i[0],
-                  u = i[1];
-                return !(!u || n !== c || o !== u) || (n === c && o !== u);
+                  u = i[0],
+                  c = i[1];
+                return !(!c || n !== u || o !== c) || (n === u && o !== c);
               }
             },
             {
@@ -1726,7 +1726,7 @@
                       a,
                       i,
                       s,
-                      u,
+                      c,
                       l,
                       f,
                       p,
@@ -1749,7 +1749,7 @@
                                 this.pageLoader.getPageList()
                               );
                             case 7:
-                              (s = t.sent), (u = r), (t.next = 19);
+                              (s = t.sent), (c = r), (t.next = 19);
                               break;
                             case 12:
                               (f = t.sent),
@@ -1764,7 +1764,7 @@
                                   },
                                   this.locales
                                 )),
-                                (u = x(E(p.asPath), this.locale)),
+                                (c = x(E(p.asPath), this.locale)),
                                 p.matchedPage &&
                                   p.resolvedHref &&
                                   ((i = p.resolvedHref),
@@ -1778,7 +1778,7 @@
                                   ((i = a.pathname),
                                   (e = (0, h.formatWithValidation)(a)));
                             case 21:
-                              (v = (0, c.removePathTrailingSlash)(i)),
+                              (v = (0, u.removePathTrailingSlash)(i)),
                                 (t.next = 24);
                               break;
                             case 24:
@@ -1791,7 +1791,7 @@
                                       m._getStaticData(
                                         m.pageLoader.getDataHref(
                                           e,
-                                          u,
+                                          c,
                                           !0,
                                           "undefined" !== typeof o.locale
                                             ? o.locale
@@ -1975,8 +1975,8 @@
           return t.substring(e.length);
         }),
         (e.getDisplayName = s),
-        (e.isResSent = c),
-        (e.loadGetInitialProps = u),
+        (e.isResSent = u),
+        (e.loadGetInitialProps = c),
         (e.formatWithValidation = function(t) {
           0;
           return (0, a.formatUrl)(t);
@@ -1996,10 +1996,10 @@
       function s(t) {
         return "string" === typeof t ? t : t.displayName || t.name || "Unknown";
       }
-      function c(t) {
+      function u(t) {
         return t.finished || t.headersSent;
       }
-      function u(t, e) {
+      function c(t, e) {
         return l.apply(this, arguments);
       }
       function l() {
@@ -2023,7 +2023,7 @@
                       t.next = 11;
                       break;
                     }
-                    return (t.next = 9), u(r.Component, r.ctx);
+                    return (t.next = 9), c(r.Component, r.ctx);
                   case 9:
                     return (
                       (t.t0 = t.sent), t.abrupt("return", { pageProps: t.t0 })
@@ -2033,7 +2033,7 @@
                   case 12:
                     return (t.next = 14), e.getInitialProps(r);
                   case 14:
-                    if (((a = t.sent), !o || !c(o))) {
+                    if (((a = t.sent), !o || !u(o))) {
                       t.next = 17;
                       break;
                     }
@@ -2126,8 +2126,8 @@
             a = e ? new URL(e, r) : r,
             i = new URL(t, a),
             s = i.pathname,
-            c = i.searchParams,
-            u = i.search,
+            u = i.searchParams,
+            c = i.search,
             l = i.hash,
             f = i.href;
           if (i.origin !== r.origin)
@@ -2136,8 +2136,8 @@
             );
           return {
             pathname: s,
-            query: (0, o.searchParamsToUrlQuery)(c),
-            search: u,
+            query: (0, o.searchParamsToUrlQuery)(u),
+            search: c,
             hash: l,
             href: f.slice(r.origin.length)
           };
@@ -2155,7 +2155,7 @@
           a = o.iterator || "@@iterator",
           i = o.asyncIterator || "@@asyncIterator",
           s = o.toStringTag || "@@toStringTag";
-        function c(t, e, r) {
+        function u(t, e, r) {
           return (
             Object.defineProperty(t, e, {
               value: r,
@@ -2167,13 +2167,13 @@
           );
         }
         try {
-          c({}, "");
+          u({}, "");
         } catch (I) {
-          c = function(t, e, r) {
+          u = function(t, e, r) {
             return (t[e] = r);
           };
         }
-        function u(t, e, r, n) {
+        function c(t, e, r, n) {
           var o = e && e.prototype instanceof y ? e : y,
             a = Object.create(o.prototype),
             i = new L(n || []);
@@ -2201,13 +2201,13 @@
                     r.dispatchException(r.arg);
                   } else "return" === r.method && r.abrupt("return", r.arg);
                   n = p;
-                  var c = l(t, e, r);
-                  if ("normal" === c.type) {
-                    if (((n = r.done ? d : h), c.arg === v)) continue;
-                    return { value: c.arg, done: r.done };
+                  var u = l(t, e, r);
+                  if ("normal" === u.type) {
+                    if (((n = r.done ? d : h), u.arg === v)) continue;
+                    return { value: u.arg, done: r.done };
                   }
-                  "throw" === c.type &&
-                    ((n = d), (r.method = "throw"), (r.arg = c.arg));
+                  "throw" === u.type &&
+                    ((n = d), (r.method = "throw"), (r.arg = u.arg));
                 }
               };
             })(t, r, i)),
@@ -2221,7 +2221,7 @@
             return { type: "throw", arg: I };
           }
         }
-        t.wrap = u;
+        t.wrap = c;
         var f = "suspendedStart",
           h = "suspendedYield",
           p = "executing",
@@ -2240,17 +2240,17 @@
         var x = (g.prototype = y.prototype = Object.create(w));
         function P(t) {
           ["next", "throw", "return"].forEach(function(e) {
-            c(t, e, function(t) {
+            u(t, e, function(t) {
               return this._invoke(e, t);
             });
           });
         }
         function k(t, e) {
           function r(o, a, i, s) {
-            var c = l(t[o], t, a);
-            if ("throw" !== c.type) {
-              var u = c.arg,
-                f = u.value;
+            var u = l(t[o], t, a);
+            if ("throw" !== u.type) {
+              var c = u.arg,
+                f = c.value;
               return f && "object" === typeof f && n.call(f, "__await")
                 ? e.resolve(f.__await).then(
                     function(t) {
@@ -2262,14 +2262,14 @@
                   )
                 : e.resolve(f).then(
                     function(t) {
-                      (u.value = t), i(u);
+                      (c.value = t), i(c);
                     },
                     function(t) {
                       return r("throw", t, i, s);
                     }
                   );
             }
-            s(c.arg);
+            s(u.arg);
           }
           var o;
           this._invoke = function(t, n) {
@@ -2357,7 +2357,7 @@
         return (
           (m.prototype = x.constructor = g),
           (g.constructor = m),
-          (m.displayName = c(g, s, "GeneratorFunction")),
+          (m.displayName = u(g, s, "GeneratorFunction")),
           (t.isGeneratorFunction = function(t) {
             var e = "function" === typeof t && t.constructor;
             return (
@@ -2369,7 +2369,7 @@
             return (
               Object.setPrototypeOf
                 ? Object.setPrototypeOf(t, g)
-                : ((t.__proto__ = g), c(t, s, "GeneratorFunction")),
+                : ((t.__proto__ = g), u(t, s, "GeneratorFunction")),
               (t.prototype = Object.create(x)),
               t
             );
@@ -2384,7 +2384,7 @@
           (t.AsyncIterator = k),
           (t.async = function(e, r, n, o, a) {
             void 0 === a && (a = Promise);
-            var i = new k(u(e, r, n, o), a);
+            var i = new k(c(e, r, n, o), a);
             return t.isGeneratorFunction(r)
               ? i
               : i.next().then(function(t) {
@@ -2392,7 +2392,7 @@
                 });
           }),
           P(x),
-          c(x, s, "Generator"),
+          u(x, s, "Generator"),
           (x[a] = function() {
             return this;
           }),
@@ -2457,15 +2457,15 @@
                   s = i.completion;
                 if ("root" === i.tryLoc) return o("end");
                 if (i.tryLoc <= this.prev) {
-                  var c = n.call(i, "catchLoc"),
-                    u = n.call(i, "finallyLoc");
-                  if (c && u) {
+                  var u = n.call(i, "catchLoc"),
+                    c = n.call(i, "finallyLoc");
+                  if (u && c) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
-                  } else if (c) {
+                  } else if (u) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                   } else {
-                    if (!u)
+                    if (!c)
                       throw new Error("try statement without catch or finally");
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
                   }
@@ -2569,8 +2569,8 @@
               (r.push(i.value), !e || r.length !== e);
               n = !0
             );
-          } catch (c) {
-            (o = !0), (a = c);
+          } catch (u) {
+            (o = !0), (a = u);
           } finally {
             try {
               n || null == s.return || s.return();
@@ -2626,7 +2626,7 @@
         }
         var i,
           s = !0,
-          c = !1;
+          u = !1;
         return {
           s: function() {
             r = t[Symbol.iterator]();
@@ -2636,13 +2636,13 @@
             return (s = t.done), t;
           },
           e: function(t) {
-            (c = !0), (i = t);
+            (u = !0), (i = t);
           },
           f: function() {
             try {
               s || null == r.return || r.return();
             } finally {
-              if (c) throw i;
+              if (u) throw i;
             }
           }
         };
@@ -2656,7 +2656,7 @@
         s = r("TqRt");
       (e.__esModule = !0),
         (e.useRouter = function() {
-          return c.default.useContext(l.RouterContext);
+          return u.default.useContext(l.RouterContext);
         }),
         (e.makePublicRouterInstance = function(t) {
           var e,
@@ -2676,7 +2676,7 @@
             a.f();
           }
           return (
-            (n.events = u.default.events),
+            (n.events = c.default.events),
             d.forEach(function(t) {
               n[t] = function() {
                 return r[t].apply(r, arguments);
@@ -2686,9 +2686,9 @@
           );
         }),
         (e.createRouter = e.withRouter = e.default = void 0);
-      var c = s(r("q1tI")),
-        u = i(r("elyg"));
-      (e.Router = u.default), (e.NextRouter = u.NextRouter);
+      var u = s(r("q1tI")),
+        c = i(r("elyg"));
+      (e.Router = c.default), (e.NextRouter = c.NextRouter);
       var l = r("qOIg"),
         f = s(r("0Bsm"));
       e.withRouter = f.default;
@@ -2726,7 +2726,7 @@
       }
       Object.defineProperty(h, "events", {
         get: function() {
-          return u.default.events;
+          return c.default.events;
         }
       }),
         p.forEach(function(t) {
@@ -2751,7 +2751,7 @@
           "hashChangeComplete"
         ].forEach(function(t) {
           h.ready(function() {
-            u.default.events.on(t, function() {
+            c.default.events.on(t, function() {
               var e = "on"
                   .concat(t.charAt(0).toUpperCase())
                   .concat(t.substring(1)),
@@ -2774,7 +2774,7 @@
         for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
           e[r] = arguments[r];
         return (
-          (h.router = n(u.default, e)),
+          (h.router = n(c.default, e)),
           h.readyCallbacks.forEach(function(t) {
             return t();
           }),
@@ -2844,11 +2844,11 @@
       function r(t, e, r, n, o, a, i) {
         try {
           var s = t[a](i),
-            c = s.value;
-        } catch (u) {
-          return void r(u);
+            u = s.value;
+        } catch (c) {
+          return void r(c);
         }
-        s.done ? e(c) : Promise.resolve(c).then(n, o);
+        s.done ? e(u) : Promise.resolve(u).then(n, o);
       }
       t.exports = function(t) {
         return function() {
@@ -2857,10 +2857,10 @@
           return new Promise(function(o, a) {
             var i = t.apply(e, n);
             function s(t) {
-              r(i, o, a, s, c, "next", t);
+              r(i, o, a, s, u, "next", t);
             }
-            function c(t) {
-              r(i, o, a, s, c, "throw", t);
+            function u(t) {
+              r(i, o, a, s, u, "throw", t);
             }
             s(void 0);
           });
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "gCbbUAx0IO2QJ_bZLQWKs",
+        "buildId": "i1dxdNIv3GHzMn4Opfgxy",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_buildManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_ssgManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "gCbbUAx0IO2QJ_bZLQWKs",
+        "buildId": "i1dxdNIv3GHzMn4Opfgxy",
         "isFallback": false,
         "gip": true
       }
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_buildManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_ssgManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "gCbbUAx0IO2QJ_bZLQWKs",
+        "buildId": "i1dxdNIv3GHzMn4Opfgxy",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_buildManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/gCbbUAx0IO2QJ_bZLQWKs/_ssgManifest.js"
+      src="/_next/static/i1dxdNIv3GHzMn4Opfgxy/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: ea4a19f

@ijjk
Copy link
Member

ijjk commented Apr 6, 2021

Failing test suites

Commit: ea4a19f

test/integration/typescript/test/index.test.js

  • TypeScript Features > should build the app
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error
Expand output

● TypeScript Features › should build the app

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

   97 |   it('should build the app', async () => {
   98 |     const output = await nextBuild(appDir, [], { stdout: true })
>  99 |     expect(output.stdout).toMatch(/Compiled successfully/)
      |                           ^
  100 |     expect(output.code).toBe(0)
  101 |   })
  102 |

  at Object.<anonymous> (integration/typescript/test/index.test.js:99:27)

● TypeScript Features › should compile with different types › should compile async getInitialProps for _error

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

  107 |         errorPage.replace('static ', 'static async ')
  108 |         const output = await nextBuild(appDir, [], { stdout: true })
> 109 |         expect(output.stdout).toMatch(/Compiled successfully/)
      |                               ^
  110 |       } finally {
  111 |         errorPage.restore()
  112 |       }

  at Object.<anonymous> (integration/typescript/test/index.test.js:109:31)

@ijjk
Copy link
Member

ijjk commented Apr 7, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 12.4s 12.6s ⚠️ +173ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.683 2.678 0
/ avg req/sec 931.87 933.62 +1.75
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.607 1.559 -0.05
/error-in-render avg req/sec 1556.06 1603.72 +47.66
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 613 B 614 B ⚠️ +1 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB ⚠️ +1 B

Diffs

Diff for 677f882d2ed8..68ee0afbc.js
@@ -1617,7 +1617,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this.clc = void 0;
           this.pageLoader = void 0;
           this._bps = void 0;
-          this.events = void 0;
+          this.events = (0, _mitt["default"])();
           this._wrapApp = void 0;
           this.isSsr = void 0;
           this.isFallback = void 0;
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       as="script"
     />
     <link
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9435f13b64c68ee0afbc.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.de3baf189f2793bb51a6.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 14.5s 14.8s ⚠️ +246ms
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary lbwa/next.js router-evts-type Change
677f882d2ed8..e6c6.js gzip 13.4 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..32e2.js gzip N/A 13.4 kB N/A
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB ⚠️ +14 B
routerDirect.js 1.42 MB 1.42 MB ⚠️ +14 B
withRouter.js 1.42 MB 1.42 MB ⚠️ +14 B
Overall change 7.01 MB 7.01 MB ⚠️ +42 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary lbwa/next.js router-evts-type Change
buildDuration 16.6s 15.5s -1.1s
nodeModulesSize 45.9 MB 45.9 MB ⚠️ +1.33 kB
Page Load Tests Overall increase ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
/ failed reqs 0 0
/ total time (seconds) 2.737 2.826 ⚠️ +0.09
/ avg req/sec 913.57 884.65 ⚠️ -28.92
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.652 1.53 -0.12
/error-in-render avg req/sec 1513.01 1633.82 +120.81
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB -2 B
778-5cc798ac..5c25.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB -2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary lbwa/next.js router-evts-type Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary lbwa/next.js router-evts-type Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary lbwa/next.js router-evts-type Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary lbwa/next.js router-evts-type Change
index.html gzip 610 B 610 B
link.html gzip 617 B 615 B -2 B
withRouter.html gzip 605 B 604 B -1 B
Overall change 1.83 kB 1.83 kB -3 B

Diffs

Diff for 677f882d2ed8..2520de6c6.js
@@ -169,22 +169,22 @@
             o = t.protocol || "",
             i = t.pathname || "",
             s = t.hash || "",
-            c = t.query || "",
-            u = !1;
+            u = t.query || "",
+            c = !1;
           (e = e ? encodeURIComponent(e).replace(/%3A/i, ":") + "@" : ""),
             t.host
-              ? (u = e + t.host)
+              ? (c = e + t.host)
               : r &&
-                ((u = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
-                t.port && (u += ":" + t.port));
-          c &&
-            "object" === typeof c &&
-            (c = String(n.urlQueryToSearchParams(c)));
-          var l = t.search || (c && "?".concat(c)) || "";
+                ((c = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
+                t.port && (c += ":" + t.port));
+          u &&
+            "object" === typeof u &&
+            (u = String(n.urlQueryToSearchParams(u)));
+          var l = t.search || (u && "?".concat(u)) || "";
           o && ":" !== o.substr(-1) && (o += ":");
-          t.slashes || ((!o || a.test(o)) && !1 !== u)
-            ? ((u = "//" + (u || "")), i && "/" !== i[0] && (i = "/" + i))
-            : u || (u = "");
+          t.slashes || ((!o || a.test(o)) && !1 !== c)
+            ? ((c = "//" + (c || "")), i && "/" !== i[0] && (i = "/" + i))
+            : c || (c = "");
           s && "#" !== s[0] && (s = "#" + s);
           l && "?" !== l[0] && (l = "?" + l);
           return (
@@ -192,7 +192,7 @@
             (l = l.replace("#", "%23")),
             ""
               .concat(o)
-              .concat(u)
+              .concat(c)
               .concat(i)
               .concat(l)
               .concat(s)
@@ -273,7 +273,7 @@
         (e.default = void 0);
       i(r("Lab5"));
       var s = r("0G5g");
-      function c(t, e, r) {
+      function u(t, e, r) {
         var n,
           o = e.get(t);
         if (o) return "future" in o ? o.future : Promise.resolve(o);
@@ -289,7 +289,7 @@
             : a
         );
       }
-      var u = (function(t) {
+      var c = (function(t) {
         try {
           return (
             (t = document.createElement("link")),
@@ -403,7 +403,7 @@
         }
         return {
           whenEntrypoint: function(t) {
-            return c(t, e);
+            return u(t, e);
           },
           onEntrypoint: function(t, r) {
             Promise.resolve(r)
@@ -425,12 +425,12 @@
           },
           loadRoute: function(r) {
             var i = this;
-            return c(
+            return u(
               r,
               l,
               a(
                 n.mark(function a() {
-                  var s, c, u, l, y, m, g, w;
+                  var s, u, c, l, y, m, g, w;
                   return n.wrap(
                     function(n) {
                       for (;;)
@@ -440,12 +440,12 @@
                           case 3:
                             return (
                               (s = n.sent),
-                              (c = s.scripts),
-                              (u = s.css),
+                              (u = s.scripts),
+                              (c = s.css),
                               (n.next = 8),
                               Promise.all([
-                                e.has(r) ? [] : Promise.all(c.map(p)),
-                                Promise.all(u.map(v))
+                                e.has(r) ? [] : Promise.all(u.map(p)),
+                                Promise.all(c.map(v))
                               ])
                             );
                           case 8:
@@ -498,7 +498,7 @@
               : d(t, e)
                   .then(function(t) {
                     return Promise.all(
-                      u
+                      c
                         ? t.scripts.map(function(t) {
                             return (
                               (e = t),
@@ -730,8 +730,8 @@
         (e.interpolateAs = L),
         (e.resolveHref = O),
         (e.default = void 0);
-      var c = r("X24+"),
-        u = r("Nh2W"),
+      var u = r("X24+"),
+        c = r("Nh2W"),
         l = r("wkBG"),
         f = (r("3wub"), w(r("dZ6Y"))),
         h = r("g/15"),
@@ -765,7 +765,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, u.normalizePathTrailingSlash)(e)
               : "".concat(e).concat("/" === P(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -798,14 +798,14 @@
               r = a[t],
               o = r.repeat,
               s = r.optional,
-              c = "[".concat(o ? "..." : "").concat(t, "]");
+              u = "[".concat(o ? "..." : "").concat(t, "]");
             return (
-              s && (c = "".concat(e ? "" : "/", "[").concat(c, "]")),
+              s && (u = "".concat(e ? "" : "/", "[").concat(u, "]")),
               o && !Array.isArray(e) && (e = [e]),
               (s || t in i) &&
                 (n =
                   n.replace(
-                    c,
+                    u,
                     o
                       ? e
                           .map(function(t) {
@@ -834,13 +834,13 @@
         if (!R(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, u.normalizePathTrailingSlash)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var s = (0, v.searchParamsToUrlQuery)(a.searchParams),
-              u = L(a.pathname, a.pathname, s),
-              l = u.result,
-              f = u.params;
+              c = L(a.pathname, a.pathname, s),
+              l = c.result,
+              f = c.params;
             l &&
               (i = (0, h.formatWithValidation)({
                 pathname: l,
@@ -864,16 +864,16 @@
           o = s(n, 2),
           a = o[0],
           i = o[1],
-          c = (0, h.getLocationOrigin)(),
-          u = a.startsWith(c),
-          l = i && i.startsWith(c);
+          u = (0, h.getLocationOrigin)(),
+          c = a.startsWith(u),
+          l = i && i.startsWith(u);
         (a = I(a)), (i = i ? I(i) : i);
-        var f = u ? a : S(a),
+        var f = c ? a : S(a),
           p = r ? I(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
       function j(t, e) {
-        var r = (0, c.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
+        var r = (0, u.removePathTrailingSlash)((0, l.denormalizePagePath)(t));
         return "/404" === r || "/_error" === r
           ? t
           : (e.includes(r) ||
@@ -884,7 +884,7 @@
                 )
                   return (t = e), !0;
               }),
-            (0, c.removePathTrailingSlash)(t));
+            (0, u.removePathTrailingSlash)(t));
       }
       var A = Symbol("SSG_DATA_NOT_FOUND");
       function D(t, e) {
@@ -903,22 +903,22 @@
       }
       function M(t, e) {
         return D(t, e ? 3 : 1).catch(function(t) {
-          throw (e || (0, u.markAssetError)(t), t);
+          throw (e || (0, c.markAssetError)(t), t);
         });
       }
       var N = (function() {
         function t(e, r, n, o) {
           var i = this,
             s = o.initialProps,
-            u = o.pageLoader,
+            c = o.pageLoader,
             l = o.App,
-            f = o.wrapApp,
-            v = o.Component,
-            y = o.err,
-            m = o.subscription,
-            g = o.isFallback,
-            w = o.locale,
-            b = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
+            v = o.wrapApp,
+            y = o.Component,
+            m = o.err,
+            g = o.subscription,
+            w = o.isFallback,
+            b = o.locale,
+            _ = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
           a(this, t),
             (this.route = void 0),
             (this.pathname = void 0),
@@ -932,7 +932,7 @@
             (this.clc = void 0),
             (this.pageLoader = void 0),
             (this._bps = void 0),
-            (this.events = void 0),
+            (this.events = (0, f.default)()),
             (this._wrapApp = void 0),
             (this.isSsr = void 0),
             (this.isFallback = void 0),
@@ -970,52 +970,52 @@
                     );
                 }
               } else {
-                var c = i.pathname,
-                  u = i.query;
+                var u = i.pathname,
+                  c = i.query;
                 i.changeState(
                   "replaceState",
-                  (0, h.formatWithValidation)({ pathname: S(c), query: u }),
+                  (0, h.formatWithValidation)({ pathname: S(u), query: c }),
                   (0, h.getURL)()
                 );
               }
             }),
-            (this.route = (0, c.removePathTrailingSlash)(e)),
+            (this.route = (0, u.removePathTrailingSlash)(e)),
             (this.components = {}),
             "/_error" !== e &&
               (this.components[this.route] = {
-                Component: v,
+                Component: y,
                 initial: !0,
                 props: s,
-                err: y,
+                err: m,
                 __N_SSG: s && s.__N_SSG,
                 __N_SSP: s && s.__N_SSP
               }),
             (this.components["/_app"] = { Component: l, styleSheets: [] }),
             (this.events = t.events),
-            (this.pageLoader = u),
+            (this.pageLoader = c),
             (this.pathname = e),
             (this.query = r);
-          var _ = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
-          (this.asPath = _ ? e : n),
+          var x = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
+          (this.asPath = x ? e : n),
             (this.basePath = ""),
-            (this.sub = m),
+            (this.sub = g),
             (this.clc = null),
-            (this._wrapApp = f),
+            (this._wrapApp = v),
             (this.isSsr = !0),
-            (this.isFallback = g),
+            (this.isFallback = w),
             (this.isReady = !(
               !self.__NEXT_DATA__.gssp &&
               !self.__NEXT_DATA__.gip &&
-              (_ || self.location.search)
+              (x || self.location.search)
             )),
-            (this.isPreview = !!b),
+            (this.isPreview = !!_),
             (this.isLocaleDomain = !1),
             "//" !== n.substr(0, 2) &&
               this.changeState(
                 "replaceState",
                 (0, h.formatWithValidation)({ pathname: S(e), query: r }),
                 (0, h.getURL)(),
-                { locale: w }
+                { locale: b }
               ),
             window.addEventListener("popstate", this.onPopState);
         }
@@ -1164,7 +1164,7 @@
                               return (
                                 (I = e.sent),
                                 (e.next = 42),
-                                (0, u.getClientBuildManifest)()
+                                (0, c.getClientBuildManifest)()
                               );
                             case 42:
                               (D = e.sent), D.__rewrites, (e.next = 50);
@@ -1182,13 +1182,13 @@
                                 (M = a),
                                 "/_error" !==
                                   (P = P
-                                    ? (0, c.removePathTrailingSlash)(E(P))
+                                    ? (0, u.removePathTrailingSlash)(E(P))
                                     : P) &&
                                   ((b.pathname = j(P, I)),
                                   b.pathname !== P &&
                                     ((P = b.pathname),
                                     (o = (0, h.formatWithValidation)(b)))),
-                                (N = (0, c.removePathTrailingSlash)(P)),
+                                (N = (0, u.removePathTrailingSlash)(P)),
                                 R(a))
                               ) {
                                 e.next = 60;
@@ -1444,7 +1444,7 @@
               key: "handleRouteInfoError",
               value: (function() {
                 var e = o(
-                  n.mark(function e(r, o, a, i, s, c) {
+                  n.mark(function e(r, o, a, i, s, u) {
                     var l, f, h, p;
                     return n.wrap(
                       function(e) {
@@ -1457,7 +1457,7 @@
                               }
                               throw r;
                             case 2:
-                              if (!(0, u.isAssetError)(r) && !c) {
+                              if (!(0, c.isAssetError)(r) && !u) {
                                 e.next = 6;
                                 break;
                               }
@@ -1553,8 +1553,8 @@
               value: (function() {
                 var t = o(
                   n.mark(function t(e, r, o, a, i, s) {
-                    var c,
-                      u,
+                    var u,
+                      c,
                       l,
                       f,
                       p,
@@ -1569,19 +1569,19 @@
                             case 0:
                               if (
                                 ((t.prev = 0),
-                                (c = this.components[e]),
-                                !s.shallow || !c || this.route !== e)
+                                (u = this.components[e]),
+                                !s.shallow || !u || this.route !== e)
                               ) {
                                 t.next = 4;
                                 break;
                               }
-                              return t.abrupt("return", c);
+                              return t.abrupt("return", u);
                             case 4:
-                              if (!(u = c && "initial" in c ? void 0 : c)) {
+                              if (!(c = u && "initial" in u ? void 0 : u)) {
                                 t.next = 9;
                                 break;
                               }
-                              (t.t0 = u), (t.next = 12);
+                              (t.t0 = c), (t.next = 12);
                               break;
                             case 9:
                               return (
@@ -1690,9 +1690,9 @@
                   o = r[1],
                   a = t.split("#"),
                   i = s(a, 2),
-                  c = i[0],
-                  u = i[1];
-                return !(!u || n !== c || o !== u) || (n === c && o !== u);
+                  u = i[0],
+                  c = i[1];
+                return !(!c || n !== u || o !== c) || (n === u && o !== c);
               }
             },
             {
@@ -1726,7 +1726,7 @@
                       a,
                       i,
                       s,
-                      u,
+                      c,
                       l,
                       f,
                       p,
@@ -1749,7 +1749,7 @@
                                 this.pageLoader.getPageList()
                               );
                             case 7:
-                              (s = t.sent), (u = r), (t.next = 19);
+                              (s = t.sent), (c = r), (t.next = 19);
                               break;
                             case 12:
                               (f = t.sent),
@@ -1764,7 +1764,7 @@
                                   },
                                   this.locales
                                 )),
-                                (u = x(E(p.asPath), this.locale)),
+                                (c = x(E(p.asPath), this.locale)),
                                 p.matchedPage &&
                                   p.resolvedHref &&
                                   ((i = p.resolvedHref),
@@ -1778,7 +1778,7 @@
                                   ((i = a.pathname),
                                   (e = (0, h.formatWithValidation)(a)));
                             case 21:
-                              (v = (0, c.removePathTrailingSlash)(i)),
+                              (v = (0, u.removePathTrailingSlash)(i)),
                                 (t.next = 24);
                               break;
                             case 24:
@@ -1791,7 +1791,7 @@
                                       m._getStaticData(
                                         m.pageLoader.getDataHref(
                                           e,
-                                          u,
+                                          c,
                                           !0,
                                           "undefined" !== typeof o.locale
                                             ? o.locale
@@ -1975,8 +1975,8 @@
           return t.substring(e.length);
         }),
         (e.getDisplayName = s),
-        (e.isResSent = c),
-        (e.loadGetInitialProps = u),
+        (e.isResSent = u),
+        (e.loadGetInitialProps = c),
         (e.formatWithValidation = function(t) {
           0;
           return (0, a.formatUrl)(t);
@@ -1996,10 +1996,10 @@
       function s(t) {
         return "string" === typeof t ? t : t.displayName || t.name || "Unknown";
       }
-      function c(t) {
+      function u(t) {
         return t.finished || t.headersSent;
       }
-      function u(t, e) {
+      function c(t, e) {
         return l.apply(this, arguments);
       }
       function l() {
@@ -2023,7 +2023,7 @@
                       t.next = 11;
                       break;
                     }
-                    return (t.next = 9), u(r.Component, r.ctx);
+                    return (t.next = 9), c(r.Component, r.ctx);
                   case 9:
                     return (
                       (t.t0 = t.sent), t.abrupt("return", { pageProps: t.t0 })
@@ -2033,7 +2033,7 @@
                   case 12:
                     return (t.next = 14), e.getInitialProps(r);
                   case 14:
-                    if (((a = t.sent), !o || !c(o))) {
+                    if (((a = t.sent), !o || !u(o))) {
                       t.next = 17;
                       break;
                     }
@@ -2126,8 +2126,8 @@
             a = e ? new URL(e, r) : r,
             i = new URL(t, a),
             s = i.pathname,
-            c = i.searchParams,
-            u = i.search,
+            u = i.searchParams,
+            c = i.search,
             l = i.hash,
             f = i.href;
           if (i.origin !== r.origin)
@@ -2136,8 +2136,8 @@
             );
           return {
             pathname: s,
-            query: (0, o.searchParamsToUrlQuery)(c),
-            search: u,
+            query: (0, o.searchParamsToUrlQuery)(u),
+            search: c,
             hash: l,
             href: f.slice(r.origin.length)
           };
@@ -2155,7 +2155,7 @@
           a = o.iterator || "@@iterator",
           i = o.asyncIterator || "@@asyncIterator",
           s = o.toStringTag || "@@toStringTag";
-        function c(t, e, r) {
+        function u(t, e, r) {
           return (
             Object.defineProperty(t, e, {
               value: r,
@@ -2167,13 +2167,13 @@
           );
         }
         try {
-          c({}, "");
+          u({}, "");
         } catch (I) {
-          c = function(t, e, r) {
+          u = function(t, e, r) {
             return (t[e] = r);
           };
         }
-        function u(t, e, r, n) {
+        function c(t, e, r, n) {
           var o = e && e.prototype instanceof y ? e : y,
             a = Object.create(o.prototype),
             i = new L(n || []);
@@ -2201,13 +2201,13 @@
                     r.dispatchException(r.arg);
                   } else "return" === r.method && r.abrupt("return", r.arg);
                   n = p;
-                  var c = l(t, e, r);
-                  if ("normal" === c.type) {
-                    if (((n = r.done ? d : h), c.arg === v)) continue;
-                    return { value: c.arg, done: r.done };
+                  var u = l(t, e, r);
+                  if ("normal" === u.type) {
+                    if (((n = r.done ? d : h), u.arg === v)) continue;
+                    return { value: u.arg, done: r.done };
                   }
-                  "throw" === c.type &&
-                    ((n = d), (r.method = "throw"), (r.arg = c.arg));
+                  "throw" === u.type &&
+                    ((n = d), (r.method = "throw"), (r.arg = u.arg));
                 }
               };
             })(t, r, i)),
@@ -2221,7 +2221,7 @@
             return { type: "throw", arg: I };
           }
         }
-        t.wrap = u;
+        t.wrap = c;
         var f = "suspendedStart",
           h = "suspendedYield",
           p = "executing",
@@ -2240,17 +2240,17 @@
         var x = (g.prototype = y.prototype = Object.create(w));
         function P(t) {
           ["next", "throw", "return"].forEach(function(e) {
-            c(t, e, function(t) {
+            u(t, e, function(t) {
               return this._invoke(e, t);
             });
           });
         }
         function k(t, e) {
           function r(o, a, i, s) {
-            var c = l(t[o], t, a);
-            if ("throw" !== c.type) {
-              var u = c.arg,
-                f = u.value;
+            var u = l(t[o], t, a);
+            if ("throw" !== u.type) {
+              var c = u.arg,
+                f = c.value;
               return f && "object" === typeof f && n.call(f, "__await")
                 ? e.resolve(f.__await).then(
                     function(t) {
@@ -2262,14 +2262,14 @@
                   )
                 : e.resolve(f).then(
                     function(t) {
-                      (u.value = t), i(u);
+                      (c.value = t), i(c);
                     },
                     function(t) {
                       return r("throw", t, i, s);
                     }
                   );
             }
-            s(c.arg);
+            s(u.arg);
           }
           var o;
           this._invoke = function(t, n) {
@@ -2357,7 +2357,7 @@
         return (
           (m.prototype = x.constructor = g),
           (g.constructor = m),
-          (m.displayName = c(g, s, "GeneratorFunction")),
+          (m.displayName = u(g, s, "GeneratorFunction")),
           (t.isGeneratorFunction = function(t) {
             var e = "function" === typeof t && t.constructor;
             return (
@@ -2369,7 +2369,7 @@
             return (
               Object.setPrototypeOf
                 ? Object.setPrototypeOf(t, g)
-                : ((t.__proto__ = g), c(t, s, "GeneratorFunction")),
+                : ((t.__proto__ = g), u(t, s, "GeneratorFunction")),
               (t.prototype = Object.create(x)),
               t
             );
@@ -2384,7 +2384,7 @@
           (t.AsyncIterator = k),
           (t.async = function(e, r, n, o, a) {
             void 0 === a && (a = Promise);
-            var i = new k(u(e, r, n, o), a);
+            var i = new k(c(e, r, n, o), a);
             return t.isGeneratorFunction(r)
               ? i
               : i.next().then(function(t) {
@@ -2392,7 +2392,7 @@
                 });
           }),
           P(x),
-          c(x, s, "Generator"),
+          u(x, s, "Generator"),
           (x[a] = function() {
             return this;
           }),
@@ -2457,15 +2457,15 @@
                   s = i.completion;
                 if ("root" === i.tryLoc) return o("end");
                 if (i.tryLoc <= this.prev) {
-                  var c = n.call(i, "catchLoc"),
-                    u = n.call(i, "finallyLoc");
-                  if (c && u) {
+                  var u = n.call(i, "catchLoc"),
+                    c = n.call(i, "finallyLoc");
+                  if (u && c) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
-                  } else if (c) {
+                  } else if (u) {
                     if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                   } else {
-                    if (!u)
+                    if (!c)
                       throw new Error("try statement without catch or finally");
                     if (this.prev < i.finallyLoc) return o(i.finallyLoc);
                   }
@@ -2569,8 +2569,8 @@
               (r.push(i.value), !e || r.length !== e);
               n = !0
             );
-          } catch (c) {
-            (o = !0), (a = c);
+          } catch (u) {
+            (o = !0), (a = u);
           } finally {
             try {
               n || null == s.return || s.return();
@@ -2626,7 +2626,7 @@
         }
         var i,
           s = !0,
-          c = !1;
+          u = !1;
         return {
           s: function() {
             r = t[Symbol.iterator]();
@@ -2636,13 +2636,13 @@
             return (s = t.done), t;
           },
           e: function(t) {
-            (c = !0), (i = t);
+            (u = !0), (i = t);
           },
           f: function() {
             try {
               s || null == r.return || r.return();
             } finally {
-              if (c) throw i;
+              if (u) throw i;
             }
           }
         };
@@ -2656,7 +2656,7 @@
         s = r("TqRt");
       (e.__esModule = !0),
         (e.useRouter = function() {
-          return c.default.useContext(l.RouterContext);
+          return u.default.useContext(l.RouterContext);
         }),
         (e.makePublicRouterInstance = function(t) {
           var e,
@@ -2676,7 +2676,7 @@
             a.f();
           }
           return (
-            (n.events = u.default.events),
+            (n.events = c.default.events),
             d.forEach(function(t) {
               n[t] = function() {
                 return r[t].apply(r, arguments);
@@ -2686,9 +2686,9 @@
           );
         }),
         (e.createRouter = e.withRouter = e.default = void 0);
-      var c = s(r("q1tI")),
-        u = i(r("elyg"));
-      (e.Router = u.default), (e.NextRouter = u.NextRouter);
+      var u = s(r("q1tI")),
+        c = i(r("elyg"));
+      (e.Router = c.default), (e.NextRouter = c.NextRouter);
       var l = r("qOIg"),
         f = s(r("0Bsm"));
       e.withRouter = f.default;
@@ -2726,7 +2726,7 @@
       }
       Object.defineProperty(h, "events", {
         get: function() {
-          return u.default.events;
+          return c.default.events;
         }
       }),
         p.forEach(function(t) {
@@ -2751,7 +2751,7 @@
           "hashChangeComplete"
         ].forEach(function(t) {
           h.ready(function() {
-            u.default.events.on(t, function() {
+            c.default.events.on(t, function() {
               var e = "on"
                   .concat(t.charAt(0).toUpperCase())
                   .concat(t.substring(1)),
@@ -2774,7 +2774,7 @@
         for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
           e[r] = arguments[r];
         return (
-          (h.router = n(u.default, e)),
+          (h.router = n(c.default, e)),
           h.readyCallbacks.forEach(function(t) {
             return t();
           }),
@@ -2844,11 +2844,11 @@
       function r(t, e, r, n, o, a, i) {
         try {
           var s = t[a](i),
-            c = s.value;
-        } catch (u) {
-          return void r(u);
+            u = s.value;
+        } catch (c) {
+          return void r(c);
         }
-        s.done ? e(c) : Promise.resolve(c).then(n, o);
+        s.done ? e(u) : Promise.resolve(u).then(n, o);
       }
       t.exports = function(t) {
         return function() {
@@ -2857,10 +2857,10 @@
           return new Promise(function(o, a) {
             var i = t.apply(e, n);
             function s(t) {
-              r(i, o, a, s, c, "next", t);
+              r(i, o, a, s, u, "next", t);
             }
-            function c(t) {
-              r(i, o, a, s, c, "throw", t);
+            function u(t) {
+              r(i, o, a, s, u, "throw", t);
             }
             s(void 0);
           });
Diff for index.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "OTakuNgMPYXtw6Q49aGTF",
+        "buildId": "JoXgxmhYG1HNbeXSm60Y_",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_buildManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_ssgManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "OTakuNgMPYXtw6Q49aGTF",
+        "buildId": "JoXgxmhYG1HNbeXSm60Y_",
         "isFallback": false,
         "gip": true
       }
@@ -66,7 +66,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_buildManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_ssgManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -17,7 +17,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "OTakuNgMPYXtw6Q49aGTF",
+        "buildId": "JoXgxmhYG1HNbeXSm60Y_",
         "isFallback": false,
         "gip": true
       }
@@ -61,7 +61,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c7d6c13de152520de6c6.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abc9eaf216d20a2332e2.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_buildManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/OTakuNgMPYXtw6Q49aGTF/_ssgManifest.js"
+      src="/_next/static/JoXgxmhYG1HNbeXSm60Y_/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 937507e

@ijjk
Copy link
Member

ijjk commented Apr 7, 2021

Failing test suites

Commit: 937507e

test/integration/typescript/test/index.test.js

  • TypeScript Features > should build the app
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error
Expand output

● TypeScript Features › should build the app

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

   97 |   it('should build the app', async () => {
   98 |     const output = await nextBuild(appDir, [], { stdout: true })
>  99 |     expect(output.stdout).toMatch(/Compiled successfully/)
      |                           ^
  100 |     expect(output.code).toBe(0)
  101 |   })
  102 |

  at Object.<anonymous> (integration/typescript/test/index.test.js:99:27)

● TypeScript Features › should compile with different types › should compile async getInitialProps for _error

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...
"

  107 |         errorPage.replace('static ', 'static async ')
  108 |         const output = await nextBuild(appDir, [], { stdout: true })
> 109 |         expect(output.stdout).toMatch(/Compiled successfully/)
      |                               ^
  110 |       } finally {
  111 |         errorPage.restore()
  112 |       }

  at Object.<anonymous> (integration/typescript/test/index.test.js:109:31)

@lbwa
Copy link
Author

lbwa commented Apr 7, 2021

Failing test suites

Commit: 937507e

test/integration/typescript/test/index.test.js

  • TypeScript Features > should build the app
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error

Expand output

Integration test was failed due to pending type checking

info  - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types...

but it couldn't be reproduced in local env.

  • TypeScript Features > should build the app
> yarn testonly --testPathPattern typescript -t "should build the app"
yarn run v1.22.10
$ jest --runInBand --testPathPattern typescript -t 'should build the app'
  console.log
    Running command "next build //<PRIVATE_LOCAL_PATH>/next.js/test/integration/typescript"

      at lib/next-test-utils.js:108:13

 PASS  test/integration/typescript/test/index.test.js (7.434 s)
  TypeScript Features
    ✓ should build the app (7277 ms)
    default behavior
      ○ skipped should render the page
      ○ skipped should render the cookies page
      ○ skipped should resolve files in correct order
      ○ skipped should report type checking to stdout
      ○ skipped should respond to sync API route correctly
      ○ skipped should respond to async API route correctly
      ○ skipped should not fail to render when an inactive page has an error
    should compile with different types
      ○ skipped should compile async getInitialProps for _error

Test Suites: 10 skipped, 1 passed, 1 of 11 total
Tests:       34 skipped, 1 passed, 35 total
Snapshots:   0 total
Time:        12.396 s, estimated 116 s
Ran all test suites matching /typescript/i with tests matching "should build the app".
✨  Done in 15.03s.
  • TypeScript Features > should compile with different types > should compile async getInitialProps for _error
> yarn testonly --testPathPattern typescript -t "should compile with different types"
yarn run v1.22.10
$ jest --runInBand --testPathPattern typescript -t 'should compile with different types'
  console.log
    Running command "next build /<PRIVATE_LOCAL_PATH>/next.js/test/integration/typescript"

      at lib/next-test-utils.js:108:13

 PASS  test/integration/typescript/test/index.test.js (7.532 s)
  TypeScript Features
    ○ skipped should build the app
    default behavior
      ○ skipped should render the page
      ○ skipped should render the cookies page
      ○ skipped should resolve files in correct order
      ○ skipped should report type checking to stdout
      ○ skipped should respond to sync API route correctly
      ○ skipped should respond to async API route correctly
      ○ skipped should not fail to render when an inactive page has an error
    should compile with different types
      ✓ should compile async getInitialProps for _error (7372 ms)

Test Suites: 10 skipped, 1 passed, 1 of 11 total
Tests:       34 skipped, 1 passed, 35 total
Snapshots:   0 total
Time:        11.918 s, estimated 115 s
Ran all test suites matching /typescript/i with tests matching "should compile with different types".
✨  Done in 13.60s.

I appreciate if someone provide solution or advice.

@kodiakhq kodiakhq bot closed this in #26456 Jun 22, 2021
kodiakhq bot pushed a commit that referenced this pull request Jun 22, 2021
This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`


## Bug

- ~[ ] Related issues linked using `fixes #number`~
- [x] Integration tests added

Closes #25679
Closes #23753
Closes #15497
@lbwa lbwa deleted the router-evts-type branch June 23, 2021 01:51
flybayer added a commit to blitz-js/next.js that referenced this pull request Jun 24, 2021
This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`


## Bug

- ~[ ] Related issues linked using `fixes #number`~
- [x] Integration tests added

Closes vercel#25679
Closes vercel#23753
Closes vercel#15497
leimonio added a commit to leimonio/next.js that referenced this pull request Jul 6, 2021
* [WIP] Add cms notion integration example - index page

* Add cover images for pages

* Add post page

* Remove preview functionality

* Add module.exports to security headers documentation (vercel#26466)

Without `module.exports`, the provided code won't work if just pasted into `next.config.js`

## Documentation / Examples

- [x] Make sure the linting passes

* fix: ignore invalid accept-language header (vercel#26476)



Fixes vercel#22329

## Bug

- [x] Related issues linked using fixes vercel#22329
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* chore: Add Alex to lint documentation (vercel#26354)

This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing. 

The original PR (vercel#25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.

## More Information on Alex:
https://alexjs.com/
https://github.com/get-alex/alex

## Documentation / Examples

- [x] Make sure the linting passes

* Fix domain locales not available on client (vercel#26083)

* bug: Fix domain locales not available on client

* Add test case

* update tests

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update to only add image import types when enabled (vercel#26485)

* Update to only add image import types when enabled

* add type check to test

* Update i18n fields in docs (vercel#26492)



Closes: vercel#24991

## Documentation / Examples

- [x] Make sure the linting passes

* v11.0.1-canary.7

* Strongly type `Router.events.on` and `Router.events.off` (vercel#26456)

This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`


## Bug

- ~[ ] Related issues linked using `fixes #number`~
- [x] Integration tests added

Closes vercel#25679
Closes vercel#23753
Closes vercel#15497

* Update next Link & Image components

* Ensure image-types file is included (vercel#26495)

* Update react & react-dom to v17

* Update tailwind to use jit

* v11.0.1-canary.8

* v11.0.1

* Don't test image domains in test env (vercel#26502)

fixes vercel#21549

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* docs: updated minimum Node.js version (vercel#26528)

## Documentation / Examples

- [x] Make sure the linting passes


According to new requirements in `package.json` minimum Node.js version for now is 12.0

* Update next-env note in docs (vercel#26536)

This ensures we don't recommend editing the `next-env` file since we need to be able to tweak it to accept future types we add in Next.js


## Documentation / Examples

- [x] Make sure the linting passes

Closes: vercel#26533

* [examples] Fix ssr-caching example. (vercel#26540)

Closes vercel#12019 with a better example of proper SSR caching.

* Fix props not updating when changing the locale and keeping hash (vercel#26205)



Currently, there is only a `hashChangeStart` and subsequent `hashChangeComplete` event and no props update (which would be used to get translations, etc.).
Happy for any feedback

fixes vercel#23467

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add note about adding additional types (vercel#26545)

* Add note about adding additional types

* Update to bold edit also

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Allow user to override next-image-loader (vercel#26548)

In PR vercel#26281, we solved one use case but broke another.

This PR will allow the user to [override the built-in loader](vercel#26281 (comment)) via custom webpack config.

* v11.0.2-canary.0

* chore: Enable Alex documentation linting for error pages (vercel#26526)

* Update SWR example to include fetcher function. (vercel#26520)

* Previous example doesn't work

* Apply suggestions from code review

* Update docs/basic-features/data-fetching.md

* lint-fix

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>

* tailwind examps upgraded to v2.2 (vercel#26549)



## Documentation / Examples

- [x] Make sure the linting passes

* doc: prettify docs for next script (vercel#26572)



x-ref: vercel#26518 (comment)

## Documentation / Examples

- [x] Make sure the linting passes

* Add logging when a custom babelrc is loaded (vercel#26570)

Partially solves vercel#26539 by adding back the log output when a config file is used



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add comment to not edit in next-env file (vercel#26573)

This adds a comment to the generated `next-env.d.ts` to mention it should not be edited pointing to the documentation which contains an example of adding custom types separately. 

x-ref: vercel#26560

## Documentation / Examples

- [x] Make sure the linting passes

* Separate node polyfill test from basic suite (vercel#26550)

* Separate node polyfill test from basic suite

* update test

* fix with-loading example for next 11 (vercel#26569)

## Documentation / Examples

- [X] Make sure the linting passes

This PR updates the with-loading example to follow the documentation of router events for next 11

* v11.0.2-canary.1

* Add trace url on bootup (vercel#26594)

* Add trace url on bootup

* Update whitelist -> accesslist

* Add name to webpack-invalidated

* v11.0.2-canary.2

* Add check for ObjectExpression when iterating on <link> tags for font optimization (vercel#26608)

Fixes vercel#26547



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Enable Alex documentation linting for docs (vercel#26598)

* Add link to live demo already hosted (vercel#25718)

* Add link to live demo already hosted

To make it easier for people to simply see the live example without having to deploy a whole new project

* update link


Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update next/image docs for relative parent with layout=fill. (vercel#26615)

vercel#18739 (reply in thread)

* Fix GSP redirect cache error (vercel#26627)

This makes sure we don't attempt flushing cache info to disk for `getStaticProps` `redirect` items with `revalidate`

Fixes: vercel#20816

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* Correct statusCode when visiting _error directly (vercel#26610)

This fixes non-stop reloading when visiting `_error` directly in development caused by the `statusCode` being 200 unexpectedly while HMR returns the page as `invalid` which triggers `on-demand-entries` to reload the page. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: vercel#8036
x-ref: vercel#8033

* fix: next dynamic with jest (vercel#26614)



Fixes vercel#19862

Avoid executing `webpack` property on `loadableGenerated` of loadable component compiled from `next/dynamic` when `require.resolveWeak` is unavailable due to jest runtime missing `require.resolveWeak`.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] unit tests added

* Ensure API routes are not available under the locale (vercel#26629)

This ensures API routes are not available under the locale path since API routes don't need to be localized and we don't provide the locale to the API in any way currently so the user wouldn't be aware if the localized API route was visited instead of the non-localized. 

Fixes: vercel#25790

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* v11.0.2-canary.3

* Fix image content type octet stream 400 (vercel#26705)

Fixes vercel#23523 by adding image content type detection

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

* Update layouts example to persist state across client-side transitions. (vercel#26706)

* Update layouts example

* Update examples/layout-component/components/layout.js

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Fix typo on "occured" to "occurred" (vercel#26709)

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* lint-fix


Co-authored-by: JJ Kasper <jj@jjsweb.site>

* [ESLint] Adds --max-warnings flag to `next lint` (vercel#26697)

Adds `--max-warnings` flag to `next lint` to enable setting of a maximum warning threshold.

Fixes vercel#26671

* update with-redux-toolkit-typescript (vercel#26714)



## Bug

- [X] Related issues linked using `fixes vercel#26713 `

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [X] Make sure the linting passes

## Screenshots

After this small change the warning disappears.
![image](https://user-images.githubusercontent.com/47717492/123749377-fd56fb80-d8d2-11eb-8b70-dbb7f6f16050.png)

* Simplify `next-dev-server` implementation (vercel#26230)

`next-dev-server` having its own implementations of `renderToHTML` and `renderErrorToHTML` has historically made reasoning about streaming hard, as it adds additional places where status codes are explicitly set and the full HTML is blocked on.

Instead, this PR simplifies things considerably by moving the majority of the custom logic for e.g. hot reloading and on-demand compilation to when we're resolving the page to be loaded, rather than upfront when handling the request. It also cleans up a few other details (e.g. default error page rendering) that managed to creep into the base implementation over time.

One unfortunate side effect is that this makes compilation errors slightly more difficult. Previously, we'd render them directly. Now, we have to rethrow them. But since they've already been logged (by the watch pipeline), we have to make sure they don't get logged again.

* Update PR labeler action

* Simplify stats action (vercel#26751)

* Move code shared between server/client to "shared" folder (vercel#26734)

* Move next-server directory files to server directory (vercel#26756)

* Move next-server directory files to server directory

* Update tests

* Update paths in other places

* Support new hydrate API in latest react 18 alpha release (vercel#26664)

* fix: react 18 new hydration API

* support react 18

* compat latest react only, fix resolved version

* fix tests

* Some changes based on reactwg/react-18#5

* fix test

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Disable build-output size specific tests (vercel#26769)

* Disable build-output size specific tests

* remove size-limit test

* lint-fix

* Add upstream `max-age` to optimized image (vercel#26739)

This solves the main use case from Issue vercel#19914.

Previously, we would set the `Cache-Control` header to a constant and rely on the server cache. This would mean the browser would always request the image and the server could response with 304 Not Modified to omit the response body.

This PR changes the behavior such that the `max-age` will propagate from the upstream server to the Next.js Image Optimization Server and allow browser caching. ("upstream" meaning external server or just an internal route to an image)

This PR does not change the `max-age` for static imports which will remain `public, max-age=315360000, immutable`.

#### Pros:
- Fewer HTTP requests after initial browser visit
- User configurable `max-age` via the upstream image `Cache-Control` header

#### Cons:
- ~~Might be annoying for `next dev` when modifying a source image~~ (solved: use `max-age=0` for dev)
- Might cause browser to cache longer than expected (up to 2x longer than the server cache if requested in the last second before expiration)

## Bug

- [x] Related issues linked using `fixes #number`

* Fix blurred image position when using objectPosition (vercel#26590)



## Bug

fixes vercel#26309

## Documentation / Examples

see vercel#26309

- [ ] Make sure the linting passes

* Update azure tests (vercel#26779)

* Stabilize relay-analytics test (vercel#26782)

* Leverage blocked page for _error (vercel#26748)



## Enhance

simplify detection for visiting `_error`

x-ref: vercel#26610

* Update codeowners to add new maintainers (vercel#26770)

* examples: fix typo `lunix` → `linux` (vercel#26796)



## Bug

- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~

## Feature

- [ ] ~~Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.~~
- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~
- [ ] ~~Documentation added~~
- [ ] ~~Telemetry added. In case of a feature if it's used or not.~~

## Documentation / Examples

- [x] Make sure the linting passes

* Update repo scripts to separate folder (vercel#26787)

* fix: detect loop in client error page (vercel#26567)

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>

* Update snapshot for font-optimization test (vercel#26823)

This fixes the `font-optimization` test failing from the links/content changing slightly in the snapshot. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

* Add `onLoadingComplete()` prop to Image component (vercel#26824)

This adds a new prop, `onLoadingComplete()`, to handle the most common use case of `ref`.

I also added docs and a warning when using `ref` so we recommend the new prop instead.
 
- Fixes vercel#18398 
- Fixes vercel#22482

* Add "Vary: Accept" header to /_next/image responses (vercel#26788)

This pull request adds "Vary: Accept" header to responses from the image optimizer (i.e. the /_next/image endpoint).

The image optimizer prefers re-encoding JPG files to WebP, but some browsers (such as Safari 14 on Catalina) do not yet support WebP. In such cases the optimizer uses the Accept header sent by the browser to send out a JPG response. Thus the optimizer's response may depend on the Accept header.

Potential caching proxies can be informed of this fact by adding "Vary: Accept" to the response headers. Otherwise WebP data may be served to browsers that do not support it, for example in the following scenario:
 * A browser that supports WebP requests the JPG. The optimizer re-encodes it to WebP. The proxy caches the WebP data.
 * After this another browser that doesn't support WebP requests the JPG. The proxy sends the WebP data to the browser.

- [x] Integration tests added
- [x] Make sure the linting passes

* Fix using-preact example deps (vercel#26821)

Fix after vercel#26133

* Add additional tests for image type detection (vercel#26832)

Adding additional tests. Follow up to vercel#26705

* Fix immutable header for image with static import & unoptimized (vercel#26836)

Fixes vercel#26587

* Update `publish-canary` script to include checkout (vercel#26840)

* Update `publish-canary` script to include checkout

* Update contrib with publishing section

* v11.0.2-canary.4

* Make sure 404 pages do not get cached by a CDN when using next start (vercel#24983)

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update to environment-variable.md (vercel#26863)



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes

## Why the change
I lost quite a few hours figuring out why my environment variable was `undefined` in the browser.
I read about the built-in support and was like: "Oh nice" and didn't read much further. I missed the part about how you need to prefix your variables with `NEXT_PUBLIC_` in order to expose them to the browser.
I think a hint to this in the anchor link to that section will make it more discoverable as it's then mentioned near the top and will save people who are like me some time and a headache.

* Don't emit duplicate image files (vercel#26843)

fixes vercel#26607

This change makes it so the image loader plugin only emits a file while processing an image import for the client. The final generated image URL was already the same in SSR and CSR anyway, so this change doesn't have any functional impact.

I also changed the name of the static page in the image component tests, since it was causing some conflicts with the static assets folder.

* Add instructions on how to add nextjs.org/docs/messages urls (vercel#26865)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Rename example folder to with-notion

* Update references of example

* Reorder docs manifest and rename to Script Optimization. (vercel#26874)

So there's _conformance_ between the other docs / optimizations.

* Fix typo on "occured" to "occurred" (vercel#26876)

- Fix typo on "occured" to "occurred"

* Update README

Co-authored-by: Sam Robbins <samrobbinsgb@gmail.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Peter Mekhaeil <4616064+petermekhaeil@users.noreply.github.com>
Co-authored-by: Rob Vermeer <rob@vermeertech.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Alex Castle <atcastle@gmail.com>
Co-authored-by: Vitaly Baev <ping@baev.dev>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: destruc7i0n <6181960+destruc7i0n@users.noreply.github.com>
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Joshua Byrd <phocks@gmail.com>
Co-authored-by: Pranav P <pranavkp.me@outlook.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: John <john@rackles.io>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Vadorequest <ambroise.dhenain@gmail.com>
Co-authored-by: hiro <hiro0218@gmail.com>
Co-authored-by: Houssein Djirdeh <houssein@google.com>
Co-authored-by: Soham Shah <47717492+sohamsshah@users.noreply.github.com>
Co-authored-by: Gerald Monaco <gbmonaco@google.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Nils Schönwald <nils@schoen.world>
Co-authored-by: D. Kasi Pavan Kumar <44864604+kasipavankumar@users.noreply.github.com>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Joachim Viide <jviide@iki.fi>
Co-authored-by: Artur Sedlukha <sedlukha@icloud.com>
Co-authored-by: Paul van den Dool <paulvddool@msn.com>
Co-authored-by: hiro <hiroyuki.kikuchi@zozo.com>
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 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.

None yet

2 participants