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

make parseRelativeUrl return a UrlObject #16809

Merged
merged 5 commits into from
Sep 3, 2020
Merged

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Sep 3, 2020

Alternative to #16798

@ijjk ijjk added the type: next label Sep 3, 2020
@ijjk
Copy link
Member

ijjk commented Sep 3, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 12.8s 12.7s -140ms
nodeModulesSize 55.9 MB 55.9 MB -580 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js fix-warning Change
/ failed reqs 0 0
/ total time (seconds) 2.427 2.386 -0.04
/ avg req/sec 1030.02 1047.69 +17.67
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.46 1.444 -0.02
/error-in-render avg req/sec 1712.27 1730.8 +18.53
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB 10.5 kB -8 B
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB 7.08 kB -21 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB 6.4 kB ⚠️ +7 B
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB 6.14 kB -18 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
index.html gzip 972 B 971 B -1 B
link.html gzip 978 B 976 B -2 B
withRouter.html gzip 964 B 963 B -1 B
Overall change 2.91 kB 2.91 kB -4 B

Diffs

Diff for 677f882d2ed8..9f2822af2.js
@@ -1176,7 +1176,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     parsed,
                     _parsed,
                     pathname,
-                    searchParams,
                     query,
                     route,
                     _options$shallow,
@@ -1257,17 +1256,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
-                              (searchParams = _parsed.searchParams);
+                              (query = _parsed.query);
                             parsed = this._resolveHref(parsed, pages);
 
                             if (parsed.pathname !== pathname) {
                               pathname = parsed.pathname;
                               url = (0, _utils.formatWithValidation)(parsed);
-                            }
-
-                            query = (0, _querystring.searchParamsToUrlQuery)(
-                              searchParams
-                            ); // url and as should always be prefixed with basePath by this
+                            } // url and as should always be prefixed with basePath by this
                             // point by either next/link or router.push/replace so strip the
                             // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1305,7 +1300,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             resolvedAs = delBasePath(resolvedAs);
 
                             if (!(0, _isDynamic.isDynamicRoute)(route)) {
-                              _context.next = 47;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1319,7 +1314,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 46;
+                              _context.next = 45;
                               break;
                             }
 
@@ -1330,7 +1325,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 44;
+                              _context.next = 43;
                               break;
                             }
 
@@ -1347,11 +1342,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 "Read more: https://err.sh/vercel/next.js/incompatible-href-as"
                             );
 
-                          case 44:
-                            _context.next = 47;
+                          case 43:
+                            _context.next = 46;
                             break;
 
-                          case 46:
+                          case 45:
                             if (route === asPathname) {
                               as = interpolateAs(route, asPathname, query);
                             } else {
@@ -1359,10 +1354,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               Object.assign(query, routeMatch);
                             }
 
-                          case 47:
+                          case 46:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 48;
-                            _context.next = 51;
+                            _context.prev = 47;
+                            _context.next = 50;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1371,7 +1366,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 51:
+                          case 50:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1380,7 +1375,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 58;
+                            _context.next = 57;
                             return this.set(
                               route,
                               pathname,
@@ -1392,9 +1387,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 58:
+                          case 57:
                             if (!error) {
-                              _context.next = 61;
+                              _context.next = 60;
                               break;
                             }
 
@@ -1405,28 +1400,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 61:
+                          case 60:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 66:
-                            _context.prev = 66;
-                            _context.t0 = _context["catch"](48);
+                          case 65:
+                            _context.prev = 65;
+                            _context.t0 = _context["catch"](47);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 70;
+                              _context.next = 69;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 70:
+                          case 69:
                             throw _context.t0;
 
-                          case 71:
+                          case 70:
                           case "end":
                             return _context.stop();
                         }
@@ -1434,7 +1429,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[48, 66]]
+                    [[47, 65]]
                   );
                 })
               );
@@ -2408,6 +2403,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -2439,7 +2436,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname: pathname,
-          searchParams: searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search: search,
           hash: hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for 677f882d2ed8..da.module.js
@@ -1029,15 +1029,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
           var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
-          var { pathname, searchParams } = parsed;
+          var { pathname, query } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
           if (parsed.pathname !== pathname) {
             pathname = parsed.pathname;
             url = (0, _utils.formatWithValidation)(parsed);
-          }
-
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams); // url and as should always be prefixed with basePath by this
+          } // url and as should always be prefixed with basePath by this
           // point by either next/link or router.push/replace so strip the
           // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1711,6 +1709,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -1742,7 +1742,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname,
-          searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search,
           hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for main-7a454bf..8850624a9.js
@@ -1543,8 +1543,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = function looseToArray(input) {
         return [].slice.call(input);
       };
@@ -1729,13 +1727,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
-                searchParams = _ref.searchParams,
+                query = _ref.query,
                 search = _ref.search;
 
-              var query = (0, _querystring.searchParamsToUrlQuery)(
-                searchParams
-              );
-
               var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(asPath),
                 asPathname = _ref2.pathname;
Diff for main-8dc84ac..f7.module.js
@@ -1209,8 +1209,6 @@
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = input => [].slice.call(input);
 
       exports.looseToArray = looseToArray;
@@ -1369,9 +1367,8 @@
          */
 
         getDataHref(href, asPath, ssg) {
-          var { pathname: hrefPathname, searchParams, search } = (0,
+          var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams);
           var { pathname: asPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(asPath);
           var route = normalizeRoute(hrefPathname);
Diff for index.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -87,13 +87,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 14s 14.5s ⚠️ +475ms
nodeModulesSize 55.9 MB 55.9 MB -580 B
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..b5de.js gzip N/A 10.5 kB N/A
main-ec49a3f..d437.js gzip N/A 7.08 kB N/A
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.4 kB N/A
main-b3aecf0..dule.js gzip N/A 6.14 kB N/A
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
_error.js 1.03 MB 1.03 MB ⚠️ +2 B
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB ⚠️ +2 B
link.js 1.08 MB 1.08 MB -79 B
routerDirect.js 1.07 MB 1.07 MB -79 B
withRouter.js 1.07 MB 1.07 MB -79 B
Overall change 5.29 MB 5.29 MB -233 B
Commit: 5633f63

@Janpot Janpot marked this pull request as ready for review September 3, 2020 06:15
@ijjk
Copy link
Member

ijjk commented Sep 3, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 12.4s 12.5s ⚠️ +35ms
nodeModulesSize 55.9 MB 55.9 MB -580 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js fix-warning Change
/ failed reqs 0 0
/ total time (seconds) 2.2 2.183 -0.02
/ avg req/sec 1136.47 1145.08 +8.61
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.209 1.208 0
/error-in-render avg req/sec 2067.62 2069.3 +1.68
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB 10.5 kB -8 B
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB 7.08 kB -21 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB 6.4 kB ⚠️ +7 B
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB 6.14 kB -18 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
index.html gzip 972 B 971 B -1 B
link.html gzip 978 B 976 B -2 B
withRouter.html gzip 964 B 963 B -1 B
Overall change 2.91 kB 2.91 kB -4 B

Diffs

Diff for 677f882d2ed8..9f2822af2.js
@@ -1176,7 +1176,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     parsed,
                     _parsed,
                     pathname,
-                    searchParams,
                     query,
                     route,
                     _options$shallow,
@@ -1257,17 +1256,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
-                              (searchParams = _parsed.searchParams);
+                              (query = _parsed.query);
                             parsed = this._resolveHref(parsed, pages);
 
                             if (parsed.pathname !== pathname) {
                               pathname = parsed.pathname;
                               url = (0, _utils.formatWithValidation)(parsed);
-                            }
-
-                            query = (0, _querystring.searchParamsToUrlQuery)(
-                              searchParams
-                            ); // url and as should always be prefixed with basePath by this
+                            } // url and as should always be prefixed with basePath by this
                             // point by either next/link or router.push/replace so strip the
                             // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1305,7 +1300,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             resolvedAs = delBasePath(resolvedAs);
 
                             if (!(0, _isDynamic.isDynamicRoute)(route)) {
-                              _context.next = 47;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1319,7 +1314,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 46;
+                              _context.next = 45;
                               break;
                             }
 
@@ -1330,7 +1325,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 44;
+                              _context.next = 43;
                               break;
                             }
 
@@ -1347,11 +1342,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 "Read more: https://err.sh/vercel/next.js/incompatible-href-as"
                             );
 
-                          case 44:
-                            _context.next = 47;
+                          case 43:
+                            _context.next = 46;
                             break;
 
-                          case 46:
+                          case 45:
                             if (route === asPathname) {
                               as = interpolateAs(route, asPathname, query);
                             } else {
@@ -1359,10 +1354,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               Object.assign(query, routeMatch);
                             }
 
-                          case 47:
+                          case 46:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 48;
-                            _context.next = 51;
+                            _context.prev = 47;
+                            _context.next = 50;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1371,7 +1366,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 51:
+                          case 50:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1380,7 +1375,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 58;
+                            _context.next = 57;
                             return this.set(
                               route,
                               pathname,
@@ -1392,9 +1387,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 58:
+                          case 57:
                             if (!error) {
-                              _context.next = 61;
+                              _context.next = 60;
                               break;
                             }
 
@@ -1405,28 +1400,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 61:
+                          case 60:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 66:
-                            _context.prev = 66;
-                            _context.t0 = _context["catch"](48);
+                          case 65:
+                            _context.prev = 65;
+                            _context.t0 = _context["catch"](47);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 70;
+                              _context.next = 69;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 70:
+                          case 69:
                             throw _context.t0;
 
-                          case 71:
+                          case 70:
                           case "end":
                             return _context.stop();
                         }
@@ -1434,7 +1429,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[48, 66]]
+                    [[47, 65]]
                   );
                 })
               );
@@ -2408,6 +2403,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -2439,7 +2436,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname: pathname,
-          searchParams: searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search: search,
           hash: hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for 677f882d2ed8..da.module.js
@@ -1029,15 +1029,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
           var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
-          var { pathname, searchParams } = parsed;
+          var { pathname, query } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
           if (parsed.pathname !== pathname) {
             pathname = parsed.pathname;
             url = (0, _utils.formatWithValidation)(parsed);
-          }
-
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams); // url and as should always be prefixed with basePath by this
+          } // url and as should always be prefixed with basePath by this
           // point by either next/link or router.push/replace so strip the
           // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1711,6 +1709,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -1742,7 +1742,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname,
-          searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search,
           hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for main-7a454bf..8850624a9.js
@@ -1543,8 +1543,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = function looseToArray(input) {
         return [].slice.call(input);
       };
@@ -1729,13 +1727,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
-                searchParams = _ref.searchParams,
+                query = _ref.query,
                 search = _ref.search;
 
-              var query = (0, _querystring.searchParamsToUrlQuery)(
-                searchParams
-              );
-
               var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(asPath),
                 asPathname = _ref2.pathname;
Diff for main-8dc84ac..f7.module.js
@@ -1209,8 +1209,6 @@
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = input => [].slice.call(input);
 
       exports.looseToArray = looseToArray;
@@ -1369,9 +1367,8 @@
          */
 
         getDataHref(href, asPath, ssg) {
-          var { pathname: hrefPathname, searchParams, search } = (0,
+          var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams);
           var { pathname: asPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(asPath);
           var route = normalizeRoute(hrefPathname);
Diff for index.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -87,13 +87,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 13.7s 13.8s ⚠️ +65ms
nodeModulesSize 55.9 MB 55.9 MB -580 B
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..b5de.js gzip N/A 10.5 kB N/A
main-ec49a3f..d437.js gzip N/A 7.08 kB N/A
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.4 kB N/A
main-b3aecf0..dule.js gzip N/A 6.14 kB N/A
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
_error.js 1.03 MB 1.03 MB ⚠️ +2 B
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB ⚠️ +2 B
link.js 1.08 MB 1.08 MB -79 B
routerDirect.js 1.07 MB 1.07 MB -79 B
withRouter.js 1.07 MB 1.07 MB -79 B
Overall change 5.29 MB 5.29 MB -233 B
Commit: 477a81a

@Janpot Janpot changed the title make parseRelativeUrl returnvalue a UrlObject make parseRelativeUrl return a UrlObject Sep 3, 2020
ztanner added a commit to ztanner/next.js that referenced this pull request Sep 3, 2020
Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

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

LGTM! Removed the tests so we can also land them from the original PR

@ijjk
Copy link
Member

ijjk commented Sep 3, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 13.4s 13.8s ⚠️ +391ms
nodeModulesSize 56.7 MB 56.7 MB -580 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js fix-warning Change
/ failed reqs 0 0
/ total time (seconds) 2.515 2.478 -0.04
/ avg req/sec 994.15 1009.06 +14.91
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.573 1.51 -0.06
/error-in-render avg req/sec 1588.89 1655.51 +66.62
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB 10.5 kB -8 B
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB 7.08 kB -21 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB 6.4 kB ⚠️ +7 B
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB 6.14 kB -18 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
index.html gzip 972 B 971 B -1 B
link.html gzip 978 B 976 B -2 B
withRouter.html gzip 964 B 963 B -1 B
Overall change 2.91 kB 2.91 kB -4 B

Diffs

Diff for 677f882d2ed8..9f2822af2.js
@@ -1176,7 +1176,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     parsed,
                     _parsed,
                     pathname,
-                    searchParams,
                     query,
                     route,
                     _options$shallow,
@@ -1257,17 +1256,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
-                              (searchParams = _parsed.searchParams);
+                              (query = _parsed.query);
                             parsed = this._resolveHref(parsed, pages);
 
                             if (parsed.pathname !== pathname) {
                               pathname = parsed.pathname;
                               url = (0, _utils.formatWithValidation)(parsed);
-                            }
-
-                            query = (0, _querystring.searchParamsToUrlQuery)(
-                              searchParams
-                            ); // url and as should always be prefixed with basePath by this
+                            } // url and as should always be prefixed with basePath by this
                             // point by either next/link or router.push/replace so strip the
                             // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1305,7 +1300,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             resolvedAs = delBasePath(resolvedAs);
 
                             if (!(0, _isDynamic.isDynamicRoute)(route)) {
-                              _context.next = 47;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1319,7 +1314,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 46;
+                              _context.next = 45;
                               break;
                             }
 
@@ -1330,7 +1325,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 44;
+                              _context.next = 43;
                               break;
                             }
 
@@ -1347,11 +1342,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 "Read more: https://err.sh/vercel/next.js/incompatible-href-as"
                             );
 
-                          case 44:
-                            _context.next = 47;
+                          case 43:
+                            _context.next = 46;
                             break;
 
-                          case 46:
+                          case 45:
                             if (route === asPathname) {
                               as = interpolateAs(route, asPathname, query);
                             } else {
@@ -1359,10 +1354,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               Object.assign(query, routeMatch);
                             }
 
-                          case 47:
+                          case 46:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 48;
-                            _context.next = 51;
+                            _context.prev = 47;
+                            _context.next = 50;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1371,7 +1366,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 51:
+                          case 50:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1380,7 +1375,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 58;
+                            _context.next = 57;
                             return this.set(
                               route,
                               pathname,
@@ -1392,9 +1387,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 58:
+                          case 57:
                             if (!error) {
-                              _context.next = 61;
+                              _context.next = 60;
                               break;
                             }
 
@@ -1405,28 +1400,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 61:
+                          case 60:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 66:
-                            _context.prev = 66;
-                            _context.t0 = _context["catch"](48);
+                          case 65:
+                            _context.prev = 65;
+                            _context.t0 = _context["catch"](47);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 70;
+                              _context.next = 69;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 70:
+                          case 69:
                             throw _context.t0;
 
-                          case 71:
+                          case 70:
                           case "end":
                             return _context.stop();
                         }
@@ -1434,7 +1429,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[48, 66]]
+                    [[47, 65]]
                   );
                 })
               );
@@ -2408,6 +2403,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -2439,7 +2436,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname: pathname,
-          searchParams: searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search: search,
           hash: hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for 677f882d2ed8..da.module.js
@@ -1029,15 +1029,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
           var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
-          var { pathname, searchParams } = parsed;
+          var { pathname, query } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
           if (parsed.pathname !== pathname) {
             pathname = parsed.pathname;
             url = (0, _utils.formatWithValidation)(parsed);
-          }
-
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams); // url and as should always be prefixed with basePath by this
+          } // url and as should always be prefixed with basePath by this
           // point by either next/link or router.push/replace so strip the
           // basePath from the pathname to match the pages dir 1-to-1
 
@@ -1711,6 +1709,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _utils = __webpack_require__("g/15");
 
+      var _querystring = __webpack_require__("3WeD");
+
       var DUMMY_BASE = new URL(
         false ? undefined : (0, _utils.getLocationOrigin)()
       );
@@ -1742,7 +1742,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         return {
           pathname,
-          searchParams,
+          query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
           search,
           hash,
           href: href.slice(DUMMY_BASE.origin.length)
Diff for main-7a454bf..8850624a9.js
@@ -1543,8 +1543,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = function looseToArray(input) {
         return [].slice.call(input);
       };
@@ -1729,13 +1727,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
-                searchParams = _ref.searchParams,
+                query = _ref.query,
                 search = _ref.search;
 
-              var query = (0, _querystring.searchParamsToUrlQuery)(
-                searchParams
-              );
-
               var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(asPath),
                 asPathname = _ref2.pathname;
Diff for main-8dc84ac..f7.module.js
@@ -1209,8 +1209,6 @@
 
       var _parseRelativeUrl = __webpack_require__("hS4m");
 
-      var _querystring = __webpack_require__("3WeD");
-
       var looseToArray = input => [].slice.call(input);
 
       exports.looseToArray = looseToArray;
@@ -1369,9 +1367,8 @@
          */
 
         getDataHref(href, asPath, ssg) {
-          var { pathname: hrefPathname, searchParams, search } = (0,
+          var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
-          var query = (0, _querystring.searchParamsToUrlQuery)(searchParams);
           var { pathname: asPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(asPath);
           var route = normalizeRoute(hrefPathname);
Diff for index.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -87,13 +87,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -7,7 +7,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      href="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -82,13 +82,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7a454bf2fbe8850624a9.js"
+      src="/_next/static/chunks/main-1504c93ed87ac258b5ea.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8dc84ac93a9cb82365f7.module.js"
+      src="/_next/static/chunks/main-3a000dfe37f3855b439f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5b5e017fd5e9f2822af2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.695ae9abdaa5c90f38d1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f4cf18108dce66b669da.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.50e586e3504862d725d1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
buildDuration 15.1s 15.2s ⚠️ +102ms
nodeModulesSize 56.7 MB 56.7 MB -580 B
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..01b7.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-f69b135..640b.js gzip 7.1 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..b5de.js gzip N/A 10.5 kB N/A
main-ec49a3f..d437.js gzip N/A 7.08 kB N/A
Overall change 57.3 kB 57.3 kB -29 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
677f882d2ed8..dule.js gzip 6.39 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-ed2fed0..dule.js gzip 6.16 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.4 kB N/A
main-b3aecf0..dule.js gzip N/A 6.14 kB N/A
Overall change 52.3 kB 52.3 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js fix-warning Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js fix-warning Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js fix-warning Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js fix-warning Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js fix-warning Change
_error.js 1.03 MB 1.03 MB ⚠️ +2 B
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB ⚠️ +2 B
link.js 1.08 MB 1.08 MB -79 B
routerDirect.js 1.07 MB 1.07 MB -79 B
withRouter.js 1.07 MB 1.07 MB -79 B
Overall change 5.29 MB 5.29 MB -233 B
Commit: 38cf21d

@kodiakhq kodiakhq bot merged commit 764b194 into vercel:canary Sep 3, 2020
@Janpot Janpot deleted the fix-warning branch September 3, 2020 18:44
HitoriSensei pushed a commit to HitoriSensei/next.js that referenced this pull request Sep 26, 2020
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 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.

2 participants