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

remove unneeded error #16636

Merged
merged 3 commits into from
Aug 28, 2020
Merged

remove unneeded error #16636

merged 3 commits into from
Aug 28, 2020

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Aug 27, 2020

This is not needed anymore since absolute urls are supported.
Also added an extra test for mailto: urls

@ijjk
Copy link
Member

ijjk commented Aug 27, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 12.5s 12.7s ⚠️ +210ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
/ failed reqs 0 0
/ total time (seconds) 2.205 2.27 ⚠️ +0.06
/ avg req/sec 1133.85 1101.29 ⚠️ -32.56
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.274 1.264 -0.01
/error-in-render avg req/sec 1962.52 1977.81 +15.29
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB 10.3 kB -22 B
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB 6.13 kB -21 B
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
index.html gzip 972 B 972 B
link.html gzip 978 B 978 B
withRouter.html gzip 964 B 964 B
Overall change 2.91 kB 2.91 kB

Diffs

Diff for 677f882d2ed8..6e297704b.js
@@ -804,17 +804,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -1191,16 +1180,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                           case 21:
                             _yield$this$pageLoade = _context.sent;
                             rewrites = _yield$this$pageLoade.__rewrites;
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context.next = 26;
-                              break;
-                            }
-
-                            return _context.abrupt("return", false);
-
-                          case 26:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
                               (searchParams = _parsed.searchParams);
@@ -1251,7 +1233,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 = 49;
+                              _context.next = 47;
                               break;
                             }
 
@@ -1265,7 +1247,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 48;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1276,7 +1258,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 46;
+                              _context.next = 44;
                               break;
                             }
 
@@ -1293,18 +1275,18 @@ 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 46:
-                            _context.next = 49;
+                          case 44:
+                            _context.next = 47;
                             break;
 
-                          case 48:
+                          case 46:
                             // Merge params into `query`, overwriting any specified in search
                             Object.assign(query, routeMatch);
 
-                          case 49:
+                          case 47:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 50;
-                            _context.next = 53;
+                            _context.prev = 48;
+                            _context.next = 51;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1313,7 +1295,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 53:
+                          case 51:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1322,7 +1304,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 60;
+                            _context.next = 58;
                             return this.set(
                               route,
                               pathname,
@@ -1334,9 +1316,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 60:
+                          case 58:
                             if (!error) {
-                              _context.next = 63;
+                              _context.next = 61;
                               break;
                             }
 
@@ -1347,28 +1329,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 63:
+                          case 61:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 68:
-                            _context.prev = 68;
-                            _context.t0 = _context["catch"](50);
+                          case 66:
+                            _context.prev = 66;
+                            _context.t0 = _context["catch"](48);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 72;
+                              _context.next = 70;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 72:
+                          case 70:
                             throw _context.t0;
 
-                          case 73:
+                          case 71:
                           case "end":
                             return _context.stop();
                         }
@@ -1376,7 +1358,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[50, 68]]
+                    [[48, 66]]
                   );
                 })
               );
@@ -1860,21 +1842,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               _args4.length > 2 && _args4[2] !== undefined
                                 ? _args4[2]
                                 : {};
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context4.next = 5;
-                              break;
-                            }
-
-                            return _context4.abrupt("return");
-
-                          case 5:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed2 = parsed), (pathname = _parsed2.pathname);
-                            _context4.next = 8;
+                            _context4.next = 6;
                             return this.pageLoader.getPageList();
 
-                          case 8:
+                          case 6:
                             pages = _context4.sent;
                             parsed = this._resolveHref(parsed, pages);
 
@@ -1884,18 +1859,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             } // Prefetch is not supported in development mode because it would trigger on-demand-entries
 
                             if (true) {
-                              _context4.next = 13;
+                              _context4.next = 11;
                               break;
                             }
 
                             return _context4.abrupt("return");
 
-                          case 13:
+                          case 11:
                             route = (0,
                             _normalizeTrailingSlash.removePathTrailingSlash)(
                               pathname
                             );
-                            _context4.next = 16;
+                            _context4.next = 14;
                             return Promise.all([
                               this.pageLoader.prefetchData(url, asPath),
                               this.pageLoader[
@@ -1903,7 +1878,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               ](route)
                             ]);
 
-                          case 16:
+                          case 14:
                           case "end":
                             return _context4.stop();
                         }
Diff for 677f882d2ed8..29.module.js
@@ -663,17 +663,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -969,8 +958,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var pages = await this.pageLoader.getPageList();
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return false;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname, searchParams } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
@@ -1332,8 +1320,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             arguments.length > 2 && arguments[2] !== undefined
               ? arguments[2]
               : {};
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname } = parsed;
           var pages = await this.pageLoader.getPageList();
           parsed = this._resolveHref(parsed, pages);
Diff for index.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 13.9s 14.1s ⚠️ +162ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..f20b.js gzip N/A 10.3 kB N/A
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.13 kB N/A
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB -178 B
routerDirect.js 1.07 MB 1.07 MB -178 B
withRouter.js 1.07 MB 1.07 MB -178 B
Overall change 5.28 MB 5.28 MB -534 B
Commit: 959971e

@Janpot Janpot marked this pull request as ready for review August 27, 2020 21:27
Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@Janpot I think that we should also update errors/invalid-href-passed.md to mention that it's prior Next.js 9.3

@ijjk
Copy link
Member

ijjk commented Aug 28, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 12.4s 12.7s ⚠️ +294ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
/ failed reqs 0 0
/ total time (seconds) 2.206 2.264 ⚠️ +0.06
/ avg req/sec 1133.48 1104.34 ⚠️ -29.14
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.209 1.213 0
/error-in-render avg req/sec 2068.38 2060.3 ⚠️ -8.08
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB 10.3 kB -22 B
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB 6.13 kB -21 B
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
index.html gzip 972 B 972 B
link.html gzip 978 B 978 B
withRouter.html gzip 964 B 964 B
Overall change 2.91 kB 2.91 kB

Diffs

Diff for 677f882d2ed8..6e297704b.js
@@ -804,17 +804,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -1191,16 +1180,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                           case 21:
                             _yield$this$pageLoade = _context.sent;
                             rewrites = _yield$this$pageLoade.__rewrites;
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context.next = 26;
-                              break;
-                            }
-
-                            return _context.abrupt("return", false);
-
-                          case 26:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
                               (searchParams = _parsed.searchParams);
@@ -1251,7 +1233,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 = 49;
+                              _context.next = 47;
                               break;
                             }
 
@@ -1265,7 +1247,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 48;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1276,7 +1258,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 46;
+                              _context.next = 44;
                               break;
                             }
 
@@ -1293,18 +1275,18 @@ 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 46:
-                            _context.next = 49;
+                          case 44:
+                            _context.next = 47;
                             break;
 
-                          case 48:
+                          case 46:
                             // Merge params into `query`, overwriting any specified in search
                             Object.assign(query, routeMatch);
 
-                          case 49:
+                          case 47:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 50;
-                            _context.next = 53;
+                            _context.prev = 48;
+                            _context.next = 51;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1313,7 +1295,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 53:
+                          case 51:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1322,7 +1304,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 60;
+                            _context.next = 58;
                             return this.set(
                               route,
                               pathname,
@@ -1334,9 +1316,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 60:
+                          case 58:
                             if (!error) {
-                              _context.next = 63;
+                              _context.next = 61;
                               break;
                             }
 
@@ -1347,28 +1329,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 63:
+                          case 61:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 68:
-                            _context.prev = 68;
-                            _context.t0 = _context["catch"](50);
+                          case 66:
+                            _context.prev = 66;
+                            _context.t0 = _context["catch"](48);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 72;
+                              _context.next = 70;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 72:
+                          case 70:
                             throw _context.t0;
 
-                          case 73:
+                          case 71:
                           case "end":
                             return _context.stop();
                         }
@@ -1376,7 +1358,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[50, 68]]
+                    [[48, 66]]
                   );
                 })
               );
@@ -1860,21 +1842,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               _args4.length > 2 && _args4[2] !== undefined
                                 ? _args4[2]
                                 : {};
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context4.next = 5;
-                              break;
-                            }
-
-                            return _context4.abrupt("return");
-
-                          case 5:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed2 = parsed), (pathname = _parsed2.pathname);
-                            _context4.next = 8;
+                            _context4.next = 6;
                             return this.pageLoader.getPageList();
 
-                          case 8:
+                          case 6:
                             pages = _context4.sent;
                             parsed = this._resolveHref(parsed, pages);
 
@@ -1884,18 +1859,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             } // Prefetch is not supported in development mode because it would trigger on-demand-entries
 
                             if (true) {
-                              _context4.next = 13;
+                              _context4.next = 11;
                               break;
                             }
 
                             return _context4.abrupt("return");
 
-                          case 13:
+                          case 11:
                             route = (0,
                             _normalizeTrailingSlash.removePathTrailingSlash)(
                               pathname
                             );
-                            _context4.next = 16;
+                            _context4.next = 14;
                             return Promise.all([
                               this.pageLoader.prefetchData(url, asPath),
                               this.pageLoader[
@@ -1903,7 +1878,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               ](route)
                             ]);
 
-                          case 16:
+                          case 14:
                           case "end":
                             return _context4.stop();
                         }
Diff for 677f882d2ed8..29.module.js
@@ -663,17 +663,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -969,8 +958,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var pages = await this.pageLoader.getPageList();
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return false;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname, searchParams } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
@@ -1332,8 +1320,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             arguments.length > 2 && arguments[2] !== undefined
               ? arguments[2]
               : {};
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname } = parsed;
           var pages = await this.pageLoader.getPageList();
           parsed = this._resolveHref(parsed, pages);
Diff for index.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 13.8s 13.8s -15ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..f20b.js gzip N/A 10.3 kB N/A
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.13 kB N/A
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB -178 B
routerDirect.js 1.07 MB 1.07 MB -178 B
withRouter.js 1.07 MB 1.07 MB -178 B
Overall change 5.28 MB 5.28 MB -534 B
Commit: fe9d447

@ijjk
Copy link
Member

ijjk commented Aug 28, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 12.3s 12.2s -80ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
/ failed reqs 0 0
/ total time (seconds) 2.21 2.235 ⚠️ +0.02
/ avg req/sec 1131.01 1118.54 ⚠️ -12.47
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.224 1.188 -0.04
/error-in-render avg req/sec 2042.87 2103.74 +60.87
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB 10.3 kB -22 B
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB 6.13 kB -21 B
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
index.html gzip 972 B 972 B
link.html gzip 978 B 978 B
withRouter.html gzip 964 B 964 B
Overall change 2.91 kB 2.91 kB

Diffs

Diff for 677f882d2ed8..6e297704b.js
@@ -804,17 +804,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -1191,16 +1180,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                           case 21:
                             _yield$this$pageLoade = _context.sent;
                             rewrites = _yield$this$pageLoade.__rewrites;
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context.next = 26;
-                              break;
-                            }
-
-                            return _context.abrupt("return", false);
-
-                          case 26:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed = parsed),
                               (pathname = _parsed.pathname),
                               (searchParams = _parsed.searchParams);
@@ -1251,7 +1233,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 = 49;
+                              _context.next = 47;
                               break;
                             }
 
@@ -1265,7 +1247,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             )(asPathname);
 
                             if (routeMatch) {
-                              _context.next = 48;
+                              _context.next = 46;
                               break;
                             }
 
@@ -1276,7 +1258,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 46;
+                              _context.next = 44;
                               break;
                             }
 
@@ -1293,18 +1275,18 @@ 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 46:
-                            _context.next = 49;
+                          case 44:
+                            _context.next = 47;
                             break;
 
-                          case 48:
+                          case 46:
                             // Merge params into `query`, overwriting any specified in search
                             Object.assign(query, routeMatch);
 
-                          case 49:
+                          case 47:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 50;
-                            _context.next = 53;
+                            _context.prev = 48;
+                            _context.next = 51;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1313,7 +1295,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 53:
+                          case 51:
                             routeInfo = _context.sent;
                             error = routeInfo.error;
                             Router.events.emit("beforeHistoryChange", as);
@@ -1322,7 +1304,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (false) {
                             }
 
-                            _context.next = 60;
+                            _context.next = 58;
                             return this.set(
                               route,
                               pathname,
@@ -1334,9 +1316,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 60:
+                          case 58:
                             if (!error) {
-                              _context.next = 63;
+                              _context.next = 61;
                               break;
                             }
 
@@ -1347,28 +1329,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 63:
+                          case 61:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 68:
-                            _context.prev = 68;
-                            _context.t0 = _context["catch"](50);
+                          case 66:
+                            _context.prev = 66;
+                            _context.t0 = _context["catch"](48);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 72;
+                              _context.next = 70;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 72:
+                          case 70:
                             throw _context.t0;
 
-                          case 73:
+                          case 71:
                           case "end":
                             return _context.stop();
                         }
@@ -1376,7 +1358,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[50, 68]]
+                    [[48, 66]]
                   );
                 })
               );
@@ -1860,21 +1842,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               _args4.length > 2 && _args4[2] !== undefined
                                 ? _args4[2]
                                 : {};
-                            parsed = tryParseRelativeUrl(url);
-
-                            if (parsed) {
-                              _context4.next = 5;
-                              break;
-                            }
-
-                            return _context4.abrupt("return");
-
-                          case 5:
+                            parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
+                              url
+                            );
                             (_parsed2 = parsed), (pathname = _parsed2.pathname);
-                            _context4.next = 8;
+                            _context4.next = 6;
                             return this.pageLoader.getPageList();
 
-                          case 8:
+                          case 6:
                             pages = _context4.sent;
                             parsed = this._resolveHref(parsed, pages);
 
@@ -1884,18 +1859,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             } // Prefetch is not supported in development mode because it would trigger on-demand-entries
 
                             if (true) {
-                              _context4.next = 13;
+                              _context4.next = 11;
                               break;
                             }
 
                             return _context4.abrupt("return");
 
-                          case 13:
+                          case 11:
                             route = (0,
                             _normalizeTrailingSlash.removePathTrailingSlash)(
                               pathname
                             );
-                            _context4.next = 16;
+                            _context4.next = 14;
                             return Promise.all([
                               this.pageLoader.prefetchData(url, asPath),
                               this.pageLoader[
@@ -1903,7 +1878,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               ](route)
                             ]);
 
-                          case 16:
+                          case 14:
                           case "end":
                             return _context4.stop();
                         }
Diff for 677f882d2ed8..29.module.js
@@ -663,17 +663,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         };
       }
 
-      function tryParseRelativeUrl(url) {
-        try {
-          return (0, _parseRelativeUrl.parseRelativeUrl)(url);
-        } catch (err) {
-          if (false) {
-          }
-
-          return null;
-        }
-      }
-
       var manualScrollRestoration = false && false;
 
       function fetchRetry(url, attempts) {
@@ -969,8 +958,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           var pages = await this.pageLoader.getPageList();
           var { __rewrites: rewrites } = await this.pageLoader
             .promisedBuildManifest;
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return false;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname, searchParams } = parsed;
           parsed = this._resolveHref(parsed, pages);
 
@@ -1332,8 +1320,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             arguments.length > 2 && arguments[2] !== undefined
               ? arguments[2]
               : {};
-          var parsed = tryParseRelativeUrl(url);
-          if (!parsed) return;
+          var parsed = (0, _parseRelativeUrl.parseRelativeUrl)(url);
           var { pathname } = parsed;
           var pages = await this.pageLoader.getPageList();
           parsed = this._resolveHref(parsed, pages);
Diff for index.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -123,13 +123,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -25,7 +25,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -118,13 +118,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.59cdb6da0c36e297704b.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b1af6078fa6886051899.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ff433bba6b32893b2029.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2206d208af7e83206260.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
buildDuration 13.9s 14s ⚠️ +134ms
nodeModulesSize 57.5 MB 57.5 MB -1.18 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..7f47.js gzip 10.3 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..f20b.js gzip N/A 10.3 kB N/A
Overall change 57.4 kB 57.3 kB -22 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
677f882d2ed8..dule.js gzip 6.15 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.13 kB N/A
Overall change 52.3 kB 52.3 kB -21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js remove-unneeded-error 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 remove-unneeded-error Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.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-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..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-4cfda7a..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.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js remove-unneeded-error Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB -178 B
routerDirect.js 1.07 MB 1.07 MB -178 B
withRouter.js 1.07 MB 1.07 MB -178 B
Overall change 5.28 MB 5.28 MB -534 B
Commit: bdf1e3e

@kodiakhq kodiakhq bot merged commit 20a4928 into vercel:canary Aug 28, 2020
@Janpot Janpot deleted the remove-unneeded-error branch August 28, 2020 06:27
@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.

3 participants