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

Repeated slash redirect #15171

Closed
wants to merge 22 commits into from
Closed

Repeated slash redirect #15171

wants to merge 22 commits into from

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Jul 14, 2020

Fix #13011

to do

  • rewrite links with repeated slashes client side

@Janpot Janpot changed the title Repeated slash Repeated slash redirect Jul 14, 2020
@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.3s 12.5s ⚠️ +123ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.57 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.006 1.993 -0.01
/ avg req/sec 1246.16 1254.63 +8.47
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.255 1.21 -0.04
/error-in-render avg req/sec 1992.37 2065.43 +73.06
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.8 kB ⚠️ +27 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.2 kB ⚠️ +34 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 954 B 953 B -1 B
link.html gzip 960 B 960 B
withRouter.html gzip 947 B 945 B -2 B
Overall change 2.86 kB 2.86 kB -3 B

Diffs

Diff for 19b7e98f51cc..48.module.js
@@ -329,6 +329,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -337,6 +338,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for 19b7e98f51cc..2ee983bad.js
@@ -408,6 +408,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -416,6 +417,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 13s 13.6s ⚠️ +537ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.57 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..d73f.js gzip N/A 9.8 kB N/A
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.2 kB N/A
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 882 kB 882 kB -123 B
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB -123 B
link.js 924 kB 924 kB ⚠️ +146 B
routerDirect.js 918 kB 918 kB ⚠️ +146 B
withRouter.js 918 kB 918 kB ⚠️ +146 B
Overall change 4.53 MB 4.53 MB ⚠️ +192 B
Commit: c6019c2

@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Failing test suites

Commit: c6019c2

test/integration/custom-routes/test/index.test.js

  • Custom routes > server mode > should output routes-manifest successfully
  • Custom routes > serverless mode > should output routes-manifest successfully
Expand output

● Custom routes › server mode › should output routes-manifest successfully

expect(received).toEqual(expected) // deep equality

- Expected  - 6
+ Received  + 0

@@ -143,16 +143,10 @@
      },
    ],
    "pages404": true,
    "redirects": Array [
      Object {
-       "destination": "/:path+",
-       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$",
-       "source": "/:path+/",
-       "statusCode": 308,
-     },
-     Object {
        "destination": "/:lang/about",
        "regex": "^\\/redirect\\/me\\/to-about(?:\\/([^\\/]+?))$",
        "source": "/redirect/me/to-about/:lang",
        "statusCode": 307,
      },

  491 |       }
  492 | 
> 493 |       expect(manifest).toEqual({
      |                        ^
  494 |         version: 3,
  495 |         pages404: true,
  496 |         basePath: '',

  at Object.<anonymous> (integration/custom-routes/test/index.test.js:493:24)

● Custom routes › serverless mode › should output routes-manifest successfully

expect(received).toEqual(expected) // deep equality

- Expected  - 6
+ Received  + 0

@@ -143,16 +143,10 @@
      },
    ],
    "pages404": true,
    "redirects": Array [
      Object {
-       "destination": "/:path+",
-       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$",
-       "source": "/:path+/",
-       "statusCode": 308,
-     },
-     Object {
        "destination": "/:lang/about",
        "regex": "^\\/redirect\\/me\\/to-about(?:\\/([^\\/]+?))$",
        "source": "/redirect/me/to-about/:lang",
        "statusCode": 307,
      },

  491 |       }
  492 | 
> 493 |       expect(manifest).toEqual({
      |                        ^
  494 |         version: 3,
  495 |         pages404: true,
  496 |         basePath: '',

  at Object.<anonymous> (integration/custom-routes/test/index.test.js:493:24)

test/integration/production/test/index.test.js

  • Production Usage > should handle failed param decoding
Expand output

● Production Usage › should handle failed param decoding

expect(received).toMatch(expected)

Expected pattern: /400/
Received string:  "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width\"/><meta charSet=\"utf-8\"/><title>404: This page could not be found</title><meta name=\"next-head-count\" content=\"3\"/><link rel=\"preload\" href=\"/_next/static/runtime/main-d033ba5a98d6beddc3df.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/runtime/webpack-3c049dffc03dcbea891e.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/framework.23d034d2e45186665d5a.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/6a01d9d96d562a53c1da236fe1b14b268cb6faee.0d8f855cdf04f92b544a.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/af5013d8432c9b962679fd84631ccb4ecf72d505.ed1c098ce9f89f84e90b.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/pages/_app-df17e810508035902736.js\" as=\"script\"/></head><body><div id=\"__next\"><div style=\"color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center\"><div><style>body { margin: 0 }</style><h1 style=\"display:inline-block;border-right:1px solid rgba(0, 0, 0,.3);margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top\">404</h1><div style=\"display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle\"><h2 style=\"font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0\">This page could not be found<!-- -->.</h2></div></div></div></div><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":404}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"iEFmHcDPsIwSkDS4p7w29\",\"nextExport\":true,\"isFallback\":false,\"gip\":true}</script><script nomodule=\"\" src=\"/_next/static/runtime/polyfills-64ac107965d20b211b18.js\"></script><script src=\"/_next/static/runtime/main-d033ba5a98d6beddc3df.js\" async=\"\"></script><script src=\"/_next/static/runtime/webpack-3c049dffc03dcbea891e.js\" async=\"\"></script><script src=\"/_next/static/chunks/framework.23d034d2e45186665d5a.js\" async=\"\"></script><script src=\"/_next/static/chunks/6a01d9d96d562a53c1da236fe1b14b268cb6faee.0d8f855cdf04f92b544a.js\" async=\"\"></script><script src=\"/_next/static/chunks/af5013d8432c9b962679fd84631ccb4ecf72d505.ed1c098ce9f89f84e90b.js\" async=\"\"></script><script src=\"/_next/static/pages/_app-df17e810508035902736.js\" async=\"\"></script><script src=\"/_next/static/iEFmHcDPsIwSkDS4p7w29/_buildManifest.js\" async=\"\"></script><script src=\"/_next/static/iEFmHcDPsIwSkDS4p7w29/_ssgManifest.js\" async=\"\"></script></body></html>"

  652 |   it('should handle failed param decoding', async () => {
  653 |     const html = await renderViaHTTP(appPort, '/%DE~%C7%1fY/')
> 654 |     expect(html).toMatch(/400/)
      |                  ^
  655 |     expect(html).toMatch(/Bad Request/)
  656 |   })
  657 | 

  at Object.<anonymous> (integration/production/test/index.test.js:654:18)

test/integration/size-limit/test/index.test.js

  • Production response size > should not increase the overall response size of default build
Expand output

● Production response size › should not increase the overall response size of default build

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 1024
Received:    1084

  82 |     // These numbers are without gzip compression!
  83 |     const delta = responseSizesBytes - 261 * 1024
> 84 |     expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb
     |                   ^
  85 |     expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target
  86 |   })
  87 | 

  at Object.<anonymous> (integration/size-limit/test/index.test.js:84:19)
      at runMicrotasks (<anonymous>)

@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.3s 13.1s ⚠️ +747ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.57 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.052 2.073 ⚠️ +0.02
/ avg req/sec 1218.44 1205.91 ⚠️ -12.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.268 1.185 -0.08
/error-in-render avg req/sec 1970.87 2108.94 +138.07
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.8 kB ⚠️ +27 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.2 kB ⚠️ +34 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 954 B 953 B -1 B
link.html gzip 960 B 960 B
withRouter.html gzip 947 B 945 B -2 B
Overall change 2.86 kB 2.86 kB -3 B

Diffs

Diff for 19b7e98f51cc..48.module.js
@@ -329,6 +329,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -337,6 +338,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for 19b7e98f51cc..2ee983bad.js
@@ -408,6 +408,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -416,6 +417,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 13.7s 13.8s ⚠️ +83ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.57 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..d73f.js gzip N/A 9.8 kB N/A
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.2 kB N/A
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 882 kB 882 kB -123 B
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB -123 B
link.js 924 kB 924 kB ⚠️ +146 B
routerDirect.js 918 kB 918 kB ⚠️ +146 B
withRouter.js 918 kB 918 kB ⚠️ +146 B
Overall change 4.53 MB 4.53 MB ⚠️ +192 B
Commit: 68077a9

@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Failing test suites

Commit: 68077a9

test/integration/size-limit/test/index.test.js

  • Production response size > should not increase the overall response size of default build
Expand output

● Production response size › should not increase the overall response size of default build

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 1024
Received:    1084

  82 |     // These numbers are without gzip compression!
  83 |     const delta = responseSizesBytes - 261 * 1024
> 84 |     expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb
     |                   ^
  85 |     expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target
  86 |   })
  87 | 

  at Object.<anonymous> (integration/size-limit/test/index.test.js:84:19)
      at runMicrotasks (<anonymous>)

test/integration/production/test/index.test.js

  • Production Usage > should handle failed param decoding
Expand output

● Production Usage › should handle failed param decoding

expect(received).toMatch(expected)

Expected pattern: /400/
Received string:  "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width\"/><meta charSet=\"utf-8\"/><title>404: This page could not be found</title><meta name=\"next-head-count\" content=\"3\"/><link rel=\"preload\" href=\"/_next/static/runtime/main-d033ba5a98d6beddc3df.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/runtime/webpack-3c049dffc03dcbea891e.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/framework.23d034d2e45186665d5a.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/6a01d9d96d562a53c1da236fe1b14b268cb6faee.0d8f855cdf04f92b544a.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/chunks/af5013d8432c9b962679fd84631ccb4ecf72d505.ed1c098ce9f89f84e90b.js\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/pages/_app-df17e810508035902736.js\" as=\"script\"/></head><body><div id=\"__next\"><div style=\"color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center\"><div><style>body { margin: 0 }</style><h1 style=\"display:inline-block;border-right:1px solid rgba(0, 0, 0,.3);margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top\">404</h1><div style=\"display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle\"><h2 style=\"font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0\">This page could not be found<!-- -->.</h2></div></div></div></div><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":404}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"rgMLM8ZRDxo5y80RkqEK9\",\"nextExport\":true,\"isFallback\":false,\"gip\":true}</script><script nomodule=\"\" src=\"/_next/static/runtime/polyfills-64ac107965d20b211b18.js\"></script><script src=\"/_next/static/runtime/main-d033ba5a98d6beddc3df.js\" async=\"\"></script><script src=\"/_next/static/runtime/webpack-3c049dffc03dcbea891e.js\" async=\"\"></script><script src=\"/_next/static/chunks/framework.23d034d2e45186665d5a.js\" async=\"\"></script><script src=\"/_next/static/chunks/6a01d9d96d562a53c1da236fe1b14b268cb6faee.0d8f855cdf04f92b544a.js\" async=\"\"></script><script src=\"/_next/static/chunks/af5013d8432c9b962679fd84631ccb4ecf72d505.ed1c098ce9f89f84e90b.js\" async=\"\"></script><script src=\"/_next/static/pages/_app-df17e810508035902736.js\" async=\"\"></script><script src=\"/_next/static/rgMLM8ZRDxo5y80RkqEK9/_buildManifest.js\" async=\"\"></script><script src=\"/_next/static/rgMLM8ZRDxo5y80RkqEK9/_ssgManifest.js\" async=\"\"></script></body></html>"

  652 |   it('should handle failed param decoding', async () => {
  653 |     const html = await renderViaHTTP(appPort, '/%DE~%C7%1fY/')
> 654 |     expect(html).toMatch(/400/)
      |                  ^
  655 |     expect(html).toMatch(/Bad Request/)
  656 |   })
  657 | 

  at Object.<anonymous> (integration/production/test/index.test.js:654:18)

@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 10.9s 11s ⚠️ +36ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.49 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.785 1.841 ⚠️ +0.06
/ avg req/sec 1400.65 1358.32 ⚠️ -42.33
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.068 1.053 -0.02
/error-in-render avg req/sec 2340.48 2374.21 +33.73
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.8 kB ⚠️ +27 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.2 kB ⚠️ +34 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 954 B 953 B -1 B
link.html gzip 960 B 960 B
withRouter.html gzip 947 B 945 B -2 B
Overall change 2.86 kB 2.86 kB -3 B

Diffs

Diff for 19b7e98f51cc..48.module.js
@@ -329,6 +329,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -337,6 +338,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for 19b7e98f51cc..2ee983bad.js
@@ -408,6 +408,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizeTrailingSlash = normalizeTrailingSlash;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -416,6 +417,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.b5c2b9fbb9c2ee983bad.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.e9042bb14400409fec1b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.5bca75f3a87d540d7c48.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.40c65ab753c544820c75.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.4s 12.3s -85ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.49 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..d73f.js gzip N/A 9.8 kB N/A
Overall change 56.4 kB 56.4 kB ⚠️ +27 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.2 kB N/A
Overall change 51.9 kB 51.9 kB ⚠️ +34 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 882 kB 882 kB -123 B
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB -123 B
link.js 924 kB 924 kB ⚠️ +146 B
routerDirect.js 918 kB 918 kB ⚠️ +146 B
withRouter.js 918 kB 918 kB ⚠️ +146 B
Overall change 4.53 MB 4.53 MB ⚠️ +192 B
Commit: ef47453

@ijjk
Copy link
Member

ijjk commented Jul 14, 2020

Failing test suites

Commit: ef47453

test/integration/size-limit/test/index.test.js

  • Production response size > should not increase the overall response size of default build
Expand output

● Production response size › should not increase the overall response size of default build

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 1024
Received:    1084

  82 |     // These numbers are without gzip compression!
  83 |     const delta = responseSizesBytes - 261 * 1024
> 84 |     expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb
     |                   ^
  85 |     expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target
  86 |   })
  87 | 

  at Object.<anonymous> (integration/size-limit/test/index.test.js:84:19)
      at runMicrotasks (<anonymous>)

@ijjk
Copy link
Member

ijjk commented Jul 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.9s 12.8s -96ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.5 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.03 2.103 ⚠️ +0.07
/ avg req/sec 1231.3 1188.85 ⚠️ -42.45
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.238 1.303 ⚠️ +0.06
/error-in-render avg req/sec 2018.71 1918.02 ⚠️ -100.69
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.75 kB ⚠️ +30 B
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB ⚠️ +30 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.16 kB ⚠️ +34 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.7 kB ⚠️ +34 B
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 947 B 945 B -2 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 939 B -1 B
Overall change 2.84 kB 2.84 kB -3 B

Diffs

Diff for 677f882d2ed8..2e.module.js
@@ -329,6 +329,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -337,6 +338,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for 677f882d2ed8..d633124e2.js
@@ -408,6 +408,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.ensurePathTrailingSlash = ensurePathTrailingSlash;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -416,6 +417,16 @@
       function removePathTrailingSlash(path) {
         return path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
       }
+
+      function ensurePathTrailingSlash(path) {
+        if (/\.[^/]+\/?$/.test(path)) {
+          return removePathTrailingSlash(path);
+        } else if (path.endsWith("/")) {
+          return path;
+        } else {
+          return path + "/";
+        }
+      }
       /**
        * Normalizes the trailing slash of a path according to the `trailingSlash` option
        * in `next.config.js`.
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f3d7eff62a4d633124e2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.06c9d9a5dc27ad9966c1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f3d7eff62a4d633124e2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.06c9d9a5dc27ad9966c1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.f3d7eff62a4d633124e2.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.06c9d9a5dc27ad9966c1.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.9f7b106df0e647b8e12e.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.354afe886b3b9e3582b1.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 14.1s 14s -53ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +1.5 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
677f882d2ed8..0f53.js gzip N/A 9.75 kB N/A
Overall change 87.2 kB 87.2 kB ⚠️ +30 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.16 kB N/A
Overall change 82.6 kB 82.7 kB ⚠️ +34 B
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 881 kB 881 kB -123 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 882 kB 882 kB -123 B
link.js 923 kB 923 kB ⚠️ +146 B
routerDirect.js 917 kB 917 kB ⚠️ +146 B
withRouter.js 917 kB 917 kB ⚠️ +146 B
Overall change 4.53 MB 4.53 MB ⚠️ +192 B
Commit: f2f7956

@ijjk
Copy link
Member

ijjk commented Jul 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 11.4s 11.3s -120ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +407 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.935 1.892 -0.04
/ avg req/sec 1292.28 1321.63 +29.35
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.121 1.113 -0.01
/error-in-render avg req/sec 2229.48 2245.45 +15.97
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 940 B
Overall change 2.84 kB 2.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.5s 12.4s -70ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +407 B
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 881 kB 882 kB ⚠️ +160 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 882 kB 882 kB ⚠️ +160 B
link.js 923 kB 923 kB ⚠️ +160 B
routerDirect.js 917 kB 917 kB ⚠️ +160 B
withRouter.js 917 kB 917 kB ⚠️ +160 B
Overall change 4.53 MB 4.53 MB ⚠️ +800 B
Commit: 124fcc1

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jul 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 13.3s 13.2s -95ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +437 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.164 2.212 ⚠️ +0.05
/ avg req/sec 1155.51 1130.19 ⚠️ -25.32
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.519 1.441 -0.08
/error-in-render avg req/sec 1646.1 1735.06 +88.96
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 940 B
Overall change 2.84 kB 2.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 14.1s 14.4s ⚠️ +285ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +437 B
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 881 kB 882 kB ⚠️ +190 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 882 kB 882 kB ⚠️ +190 B
link.js 923 kB 923 kB ⚠️ +190 B
routerDirect.js 917 kB 917 kB ⚠️ +190 B
withRouter.js 917 kB 917 kB ⚠️ +190 B
Overall change 4.53 MB 4.53 MB ⚠️ +950 B
Commit: 23b0aed

@ijjk
Copy link
Member

ijjk commented Jul 18, 2020

Failing test suites

Commit: 23b0aed

test/integration/custom-routes/test/index.test.js

  • Custom routes > server mode > should output routes-manifest successfully
  • Custom routes > serverless mode > should output routes-manifest successfully
Expand output

● Custom routes › server mode › should output routes-manifest successfully

expect(received).toEqual(expected) // deep equality

- Expected  - 2
+ Received  + 2

@@ -144,12 +144,12 @@
    ],
    "pages404": true,
    "redirects": Array [
      Object {
        "destination": "/:before*/:after",
-       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?\\/(\\/+)(.*)$",
-       "source": "/:before*/{(/+)}:after(.*)",
+       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?\\/(\\/+)(|.*\\/[^\\/.]+|[^\\/.]+)$",
+       "source": "/:before*/{(/+)}:after(|.*/[^/.]+|[^/.]+)",
        "statusCode": 308,
      },
      Object {
        "destination": "/:path+",
        "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$",

  491 |       }
  492 | 
> 493 |       expect(manifest).toEqual({
      |                        ^
  494 |         version: 3,
  495 |         pages404: true,
  496 |         basePath: '',

  at Object.<anonymous> (integration/custom-routes/test/index.test.js:493:24)

● Custom routes › serverless mode › should output routes-manifest successfully

expect(received).toEqual(expected) // deep equality

- Expected  - 2
+ Received  + 2

@@ -144,12 +144,12 @@
    ],
    "pages404": true,
    "redirects": Array [
      Object {
        "destination": "/:before*/:after",
-       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?\\/(\\/+)(.*)$",
-       "source": "/:before*/{(/+)}:after(.*)",
+       "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?\\/(\\/+)(|.*\\/[^\\/.]+|[^\\/.]+)$",
+       "source": "/:before*/{(/+)}:after(|.*/[^/.]+|[^/.]+)",
        "statusCode": 308,
      },
      Object {
        "destination": "/:path+",
        "regex": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$",

  491 |       }
  492 | 
> 493 |       expect(manifest).toEqual({
      |                        ^
  494 |         version: 3,
  495 |         pages404: true,
  496 |         basePath: '',

  at Object.<anonymous> (integration/custom-routes/test/index.test.js:493:24)

@ijjk
Copy link
Member

ijjk commented Jul 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 11.4s 12s ⚠️ +545ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +437 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.851 1.899 ⚠️ +0.05
/ avg req/sec 1350.36 1316.43 ⚠️ -33.93
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.189 1.054 -0.13
/error-in-render avg req/sec 2102.03 2371.1 +269.07
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 940 B
Overall change 2.84 kB 2.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 11.8s 12.6s ⚠️ +723ms
nodeModulesSize 66.5 MB 66.5 MB ⚠️ +437 B
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..e4c5.js gzip 9.72 kB 9.72 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-b036624..8f8e.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.2 kB 87.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.12 kB 6.12 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0054fa6..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 881 kB 882 kB ⚠️ +190 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 882 kB 882 kB ⚠️ +190 B
link.js 923 kB 923 kB ⚠️ +190 B
routerDirect.js 917 kB 917 kB ⚠️ +190 B
withRouter.js 917 kB 917 kB ⚠️ +190 B
Overall change 4.53 MB 4.53 MB ⚠️ +950 B
Commit: a18cbb0

@ijjk
Copy link
Member

ijjk commented Jul 22, 2020

Failing test suites

Commit: 16681d5

test/integration/build-output/test/index.test.js

  • Build Output > Basic Application Output > should not deviate from snapshot
Expand output

● Build Output › Basic Application Output › should not deviate from snapshot

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 0
Received:    0.09999999999999432

  105 |       expect(err404FirstLoad.endsWith('kB')).toBe(true)
  106 | 
> 107 |       expect(parseFloat(sharedByAll) - 59.2).toBeLessThanOrEqual(0)
      |                                              ^
  108 |       expect(sharedByAll.endsWith('kB')).toBe(true)
  109 | 
  110 |       if (_appSize.endsWith('kB')) {

  at Object.<anonymous> (integration/build-output/test/index.test.js:107:46)

@ijjk
Copy link
Member

ijjk commented Jul 22, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 11.9s 12.2s ⚠️ +287ms
nodeModulesSize 66.4 MB 66.4 MB ⚠️ +920 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.142 2.054 -0.09
/ avg req/sec 1167.11 1217.28 +50.17
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.435 1.349 -0.09
/error-in-render avg req/sec 1742.34 1852.95 +110.61
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..d2f7.js gzip 10.1 kB 10.2 kB ⚠️ +21 B
framework.HASH.js gzip 39.1 kB 39.1 kB
main-8da3811..3b61.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 87.6 kB 87.6 kB ⚠️ +21 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.1 kB 6.12 kB ⚠️ +21 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-43a8e8b..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 82.6 kB 82.6 kB ⚠️ +21 B
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 946 B 949 B ⚠️ +3 B
link.html gzip 952 B 954 B ⚠️ +2 B
withRouter.html gzip 938 B 940 B ⚠️ +2 B
Overall change 2.84 kB 2.84 kB ⚠️ +7 B

Diffs

Diff for 677f882d2ed8..4a3abb4ea.js
@@ -408,6 +408,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -426,6 +427,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -709,7 +714,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addBasePath(path) {
         return basePath
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(basePath)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(basePath)
             : basePath + path
           : path;
       }
@@ -730,8 +735,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             ? href
             : (0, _utils.formatWithValidation)(href);
         var finalUrl = new URL(urlAsString, base);
-        finalUrl.pathname = (0,
-        _normalizeTrailingSlash.normalizePathTrailingSlash)(finalUrl.pathname); // if the origin didn't change, it means we received a relative href
+        finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
+          finalUrl.pathname
+        ); // if the origin didn't change, it means we received a relative href
 
         return finalUrl.origin === base.origin
           ? finalUrl.href.slice(finalUrl.origin.length)
Diff for 677f882d2ed8..bf.module.js
@@ -329,6 +329,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -347,6 +348,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -578,7 +583,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addBasePath(path) {
         return basePath
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(basePath)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(basePath)
             : basePath + path
           : path;
       }
@@ -599,8 +604,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             ? href
             : (0, _utils.formatWithValidation)(href);
         var finalUrl = new URL(urlAsString, base);
-        finalUrl.pathname = (0,
-        _normalizeTrailingSlash.normalizePathTrailingSlash)(finalUrl.pathname); // if the origin didn't change, it means we received a relative href
+        finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
+          finalUrl.pathname
+        ); // if the origin didn't change, it means we received a relative href
 
         return finalUrl.origin === base.origin
           ? finalUrl.href.slice(finalUrl.origin.length)
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.43489c70a4a4a3abb4ea.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8323845d5f11e9379507.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.43489c70a4a4a3abb4ea.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8323845d5f11e9379507.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.43489c70a4a4a3abb4ea.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8323845d5f11e9379507.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.e4bbe09db901476be27e.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.7s 13.6s ⚠️ +833ms
nodeModulesSize 66.4 MB 66.4 MB ⚠️ +920 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..d2f7.js gzip 10.1 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
main-8da3811..3b61.js gzip 6.72 kB 6.72 kB
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
webpack-488d..c0e7.js gzip 751 B 751 B
677f882d2ed8..3032.js gzip N/A 10.2 kB N/A
Overall change 87.6 kB 87.6 kB ⚠️ +21 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 6.1 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-43a8e8b..dule.js gzip 5.79 kB 5.79 kB
polyfills-05..dule.js gzip 30.8 kB 30.8 kB
webpack-4f62..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.12 kB N/A
Overall change 82.6 kB 82.6 kB ⚠️ +21 B
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-8e69b..8695.js gzip 3.41 kB 3.41 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-ddd176e..5566.js gzip 1.29 kB 1.29 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.66 kB 7.66 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-663e6..dule.js gzip 2.24 kB 2.24 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-69bc264..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.29 kB 5.29 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 275 B 275 B
_buildManife..dule.js gzip 281 B 281 B
Overall change 556 B 556 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 881 kB 881 kB ⚠️ +190 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 881 kB 882 kB ⚠️ +190 B
link.js 922 kB 922 kB ⚠️ +338 B
routerDirect.js 916 kB 916 kB ⚠️ +338 B
withRouter.js 916 kB 916 kB ⚠️ +338 B
Overall change 4.52 MB 4.53 MB ⚠️ +1.39 kB
Commit: 16681d5

@ijjk
Copy link
Member

ijjk commented Aug 6, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.6s 12.7s ⚠️ +40ms
nodeModulesSize 65.9 MB 65.9 MB ⚠️ +920 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.367 2.29 -0.08
/ avg req/sec 1056.33 1091.63 +35.3
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.427 1.416 -0.01
/error-in-render avg req/sec 1752.23 1766.02 +13.79
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..795d.js gzip 9.99 kB 10 kB ⚠️ +22 B
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c30ac70..0d39.js gzip 6.74 kB 6.74 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB ⚠️ +22 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 5.89 kB 5.91 kB ⚠️ +22 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-61da9c7..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB ⚠️ +22 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 946 B 948 B ⚠️ +2 B
link.html gzip 953 B 954 B ⚠️ +1 B
withRouter.html gzip 940 B 940 B
Overall change 2.84 kB 2.84 kB ⚠️ +3 B

Diffs

Diff for 677f882d2ed8..53.module.js
@@ -348,6 +348,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -366,6 +367,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -581,7 +586,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         // we only add the basepath on relative urls
         return basePath && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(basePath)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(basePath)
             : basePath + path
           : path;
       }
@@ -622,8 +627,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         try {
           var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           ); // if the origin didn't change, it means we received a relative href
Diff for 677f882d2ed8..f09d2c87c.js
@@ -437,6 +437,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -455,6 +456,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -722,7 +727,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         // we only add the basepath on relative urls
         return basePath && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(basePath)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(basePath)
             : basePath + path
           : path;
       }
@@ -763,8 +768,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         try {
           var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           ); // if the origin didn't change, it means we received a relative href
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ccd9e85644ff09d2c87c.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7e4afa41c0753fc500ab.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ccd9e85644ff09d2c87c.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7e4afa41c0753fc500ab.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ccd9e85644ff09d2c87c.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7e4afa41c0753fc500ab.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.abab298279f1577d0b53.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.54fe32e51848bbe74211.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 13.9s 13.9s -2ms
nodeModulesSize 65.9 MB 65.9 MB ⚠️ +920 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..795d.js gzip 9.99 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c30ac70..0d39.js gzip 6.74 kB 6.74 kB
webpack-ccf5..276a.js gzip 751 B 751 B
677f882d2ed8..0cb2.js gzip N/A 10 kB N/A
Overall change 56.6 kB 56.6 kB ⚠️ +22 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..dule.js gzip 5.89 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-61da9c7..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 5.91 kB N/A
Overall change 51.6 kB 51.6 kB ⚠️ +22 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 1.03 MB 1.03 MB ⚠️ +190 B
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB ⚠️ +190 B
link.js 1.07 MB 1.07 MB ⚠️ +338 B
routerDirect.js 1.06 MB 1.06 MB ⚠️ +338 B
withRouter.js 1.06 MB 1.06 MB ⚠️ +338 B
Overall change 5.26 MB 5.26 MB ⚠️ +1.39 kB
Commit: 0c2dd7b

@minlare
Copy link

minlare commented Dec 4, 2020

@Janpot thanks for taking this upon yourself! Do you have any update on this?

@Janpot
Copy link
Contributor Author

Janpot commented Dec 4, 2020

@minlare This PR started failing after i18n support was merged. There are issues around links with hash fragments that need to be sorted out. At the moment I don't have the bandwidth left to continue with this. For my personal use cases this has no priority at all so it's on the backburner for me. Feel free to take a stab at it until I have some more free time to look into it.

@timneutkens
Copy link
Member

@Janpot could you fix the merge conflict? A whole bunch of fixes were made to the router since the last branch update on this PR 👍

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jan 23, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 8.8s 8.7s -125ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +943 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.755 1.767 ⚠️ +0.01
/ avg req/sec 1424.56 1414.84 ⚠️ -9.72
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.089 1.136 ⚠️ +0.05
/error-in-render avg req/sec 2294.89 2200.65 ⚠️ -94.24
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB 13.1 kB ⚠️ +17 B
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 614 B 613 B -1 B
link.html gzip 620 B 618 B -2 B
withRouter.html gzip 608 B 606 B -2 B
Overall change 1.84 kB 1.84 kB -5 B

Diffs

Diff for 677f882d2ed8..dde534236.js
@@ -947,6 +947,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -965,6 +966,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -1245,7 +1250,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addPathPrefix(path, prefix) {
         return prefix && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(prefix)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(prefix)
             : ""
                 .concat(prefix)
                 .concat(
@@ -1413,8 +1418,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         try {
           var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           );
           var interpolatedAs = "";
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 10.5s 10.4s -66ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +943 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..fdf6.js gzip N/A 13.1 kB N/A
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 1 MB 1 MB ⚠️ +337 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1.01 MB ⚠️ +337 B
link.js 1.06 MB 1.06 MB ⚠️ +485 B
routerDirect.js 1.05 MB 1.06 MB ⚠️ +485 B
withRouter.js 1.05 MB 1.06 MB ⚠️ +485 B
Overall change 5.19 MB 5.19 MB ⚠️ +2.13 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 10.6s 10.8s ⚠️ +139ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +943 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.728 1.728
/ avg req/sec 1446.55 1446.82 +0.27
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.091 1.127 ⚠️ +0.04
/error-in-render avg req/sec 2291.22 2219.03 ⚠️ -72.19
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
597-c48889ef..1870.js gzip 13 kB 13 kB ⚠️ +13 B
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.58 kB 6.58 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.9 kB ⚠️ +13 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 588 B 587 B -1 B
link.html gzip 593 B 593 B
withRouter.html gzip 581 B 582 B ⚠️ +1 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for 677f882d2ed8..c23f838ed.js
@@ -581,6 +581,9 @@
       }
       (e.__esModule = !0),
         (e.removePathTrailingSlash = n),
+        (e.normalizePathSlashes = function(t) {
+          return o(t.replace(/\/\/+/g, "/"));
+        }),
         (e.normalizePathTrailingSlash = void 0);
       var o = n;
       e.normalizePathTrailingSlash = o;
@@ -755,7 +758,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, c.normalizePathSlashes)(e)
               : "".concat(e).concat("/" === x(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -824,7 +827,7 @@
         if (!E(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, c.normalizePathSlashes)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var u = (0, v.searchParamsToUrlQuery)(a.searchParams),
@@ -862,14 +865,14 @@
           p = r ? C(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
-      var T = Symbol("SSG_DATA_NOT_FOUND");
-      function I(t, e) {
+      var I = Symbol("SSG_DATA_NOT_FOUND");
+      function T(t, e) {
         return fetch(t, { credentials: "same-origin" }).then(function(r) {
           if (!r.ok) {
-            if (e > 1 && r.status >= 500) return I(t, e - 1);
+            if (e > 1 && r.status >= 500) return T(t, e - 1);
             if (404 === r.status)
               return r.json().then(function(t) {
-                if (t.notFound) return { notFound: T };
+                if (t.notFound) return { notFound: I };
                 throw new Error("Failed to load static props");
               });
             throw new Error("Failed to load static props");
@@ -878,7 +881,7 @@
         });
       }
       function A(t, e) {
-        return I(t, e ? 3 : 1).catch(function(t) {
+        return T(t, e ? 3 : 1).catch(function(t) {
           throw (e || (0, s.markAssetError)(t), t);
         });
       }
@@ -1043,7 +1046,7 @@
                       x,
                       O,
                       C,
-                      I,
+                      T,
                       A,
                       M,
                       D,
@@ -1055,9 +1058,9 @@
                       G,
                       B,
                       H,
+                      z,
                       V,
                       X,
-                      z,
                       J,
                       $,
                       Y,
@@ -1125,7 +1128,7 @@
                               return (
                                 (x = (0, d.parseRelativeUrl)(o)),
                                 (C = (O = x).pathname),
-                                (I = O.query),
+                                (T = O.query),
                                 (e.prev = 36),
                                 (e.next = 39),
                                 this.pageLoader.getPageList()
@@ -1182,7 +1185,7 @@
                                 (W = U.pathname),
                                 (F = (0, m.getRouteRegex)(D)),
                                 (q = (0, y.getRouteMatcher)(F)(W)),
-                                (B = (G = D === W) ? R(D, W, I) : {}),
+                                (B = (G = D === W) ? R(D, W, T) : {}),
                                 q && (!G || B.result))
                               ) {
                                 e.next = 77;
@@ -1193,7 +1196,7 @@
                                   (H = Object.keys(F.groups).filter(function(
                                     t
                                   ) {
-                                    return !I[t];
+                                    return !T[t];
                                   })).length > 0
                                 )
                               ) {
@@ -1231,24 +1234,24 @@
                                 ? (a = (0, h.formatWithValidation)(
                                     Object.assign({}, U, {
                                       pathname: B.result,
-                                      query: L(I, B.params)
+                                      query: L(T, B.params)
                                     })
                                   ))
-                                : Object.assign(I, q);
+                                : Object.assign(T, q);
                             case 78:
                               return (
                                 t.events.emit("routeChangeStart", a, g),
                                 (e.prev = 79),
                                 (e.next = 82),
-                                this.getRouteInfo(D, C, I, a, N, g)
+                                this.getRouteInfo(D, C, T, a, N, g)
                               );
                             case 82:
                               if (
-                                ((V = e.sent),
-                                (z = (X = V).error),
-                                (J = X.props),
-                                ($ = X.__N_SSG),
-                                (Y = X.__N_SSP),
+                                ((z = e.sent),
+                                (X = (V = z).error),
+                                (J = V.props),
+                                ($ = V.__N_SSG),
+                                (Y = V.__N_SSP),
                                 (!$ && !Y) || !J)
                               ) {
                                 e.next = 108;
@@ -1284,7 +1287,7 @@
                                 e.abrupt("return", new Promise(function() {}))
                               );
                             case 95:
-                              if (J.notFound !== T) {
+                              if (J.notFound !== I) {
                                 e.next = 108;
                                 break;
                               }
@@ -1303,12 +1306,12 @@
                             case 105:
                               return (
                                 (e.next = 107),
-                                this.getRouteInfo(rt, rt, I, a, N, {
+                                this.getRouteInfo(rt, rt, T, a, N, {
                                   shallow: !1
                                 })
                               );
                             case 107:
-                              V = e.sent;
+                              z = e.sent;
                             case 108:
                               return (
                                 t.events.emit("beforeHistoryChange", a, g),
@@ -1318,22 +1321,22 @@
                                 this.set(
                                   D,
                                   C,
-                                  I,
+                                  T,
                                   w,
-                                  V,
+                                  z,
                                   u || (nt || !i.scroll ? null : { x: 0, y: 0 })
                                 ).catch(function(t) {
                                   if (!t.cancelled) throw t;
-                                  z = z || t;
+                                  X = X || t;
                                 })
                               );
                             case 114:
-                              if (!z) {
+                              if (!X) {
                                 e.next = 117;
                                 break;
                               }
-                              throw (t.events.emit("routeChangeError", z, w, g),
-                              z);
+                              throw (t.events.emit("routeChangeError", X, w, g),
+                              X);
                             case 117:
                               return (
                                 t.events.emit("routeChangeComplete", a, g),
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "0lqAVxeQ80BLY19RuStcP",
+        "buildId": "8XnAhFiOQ57ihlBM7VFgW",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_buildManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_ssgManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "0lqAVxeQ80BLY19RuStcP",
+        "buildId": "8XnAhFiOQ57ihlBM7VFgW",
         "isFallback": false,
         "gip": true
       }
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_buildManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_ssgManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "0lqAVxeQ80BLY19RuStcP",
+        "buildId": "8XnAhFiOQ57ihlBM7VFgW",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_buildManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/0lqAVxeQ80BLY19RuStcP/_ssgManifest.js"
+      src="/_next/static/8XnAhFiOQ57ihlBM7VFgW/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 2c235d8

@Janpot
Copy link
Contributor Author

Janpot commented Jan 23, 2021

@timneutkens Done

Co-authored-by: JJ Kasper <jj@jjsweb.site>
@ijjk
Copy link
Member

ijjk commented Jan 24, 2021

Failing test suites

Commit: d6c6abb

test/integration/dist-dir/test/index.test.js

  • distDir > should handle null/undefined distDir
Expand output

● distDir › should handle null/undefined distDir

expect(received).toBe(expected) // Object.is equality

Expected: 0
Received: 88

  63 |     await fs.writeFile(nextConfig, origNextConfig)
  64 | 
> 65 |     expect(stderr.length).toBe(0)
     |                           ^
  66 |   })
  67 | })
  68 | 

  at Object.<anonymous> (integration/dist-dir/test/index.test.js:65:27)

test/integration/production-build-dir/test/index.test.js

  • Production Custom Build Directory > With basic usage > should render the page
Expand output

● Production Custom Build Directory › With basic usage › should render the page

expect(received).toBe(expected) // Object.is equality

Expected: ""
Received: "Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
"

  20 |         stderr: true,
  21 |       })
> 22 |       expect(result.stderr).toBe('')
     |                             ^
  23 | 
  24 |       const app = nextServer({
  25 |         dir: join(__dirname, '../build'),

  at Object.<anonymous> (integration/production-build-dir/test/index.test.js:22:29)

test/integration/cli/test/index.test.js

  • CLI Usage > build > should warn when unknown argument provided
Expand output

● CLI Usage › build › should warn when unknown argument provided

expect(received).toEqual(expected) // deep equality

- Expected  - 0
+ Received  + 2

+ Browserslist: caniuse-lite is outdated. Please run:
+ npx browserslist@latest --update-db
  Unknown or unexpected option: --random
  ↵

  79 |         stderr: true,
  80 |       })
> 81 |       expect(stderr).toEqual('Unknown or unexpected option: --random\n')
     |                      ^
  82 |     })
  83 |     test('should not throw UnhandledPromiseRejectionWarning', async () => {
  84 |       const { stderr } = await runNextCommand(['build', '--random'], {

  at Object.<anonymous> (integration/cli/test/index.test.js:81:22)

@ijjk
Copy link
Member

ijjk commented Jan 24, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 10.4s 10.1s -280ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +1.08 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.998 2 0
/ avg req/sec 1251.3 1250.25 ⚠️ -1.05
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.214 1.311 ⚠️ +0.1
/error-in-render avg req/sec 2059.8 1906.35 ⚠️ -153.45
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB 13.1 kB ⚠️ +17 B
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 614 B 613 B -1 B
link.html gzip 620 B 618 B -2 B
withRouter.html gzip 608 B 606 B -2 B
Overall change 1.84 kB 1.84 kB -5 B

Diffs

Diff for 677f882d2ed8..dde534236.js
@@ -947,6 +947,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -965,6 +966,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -1245,7 +1250,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addPathPrefix(path, prefix) {
         return prefix && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(prefix)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(prefix)
             : ""
                 .concat(prefix)
                 .concat(
@@ -1413,8 +1418,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         try {
           var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           );
           var interpolatedAs = "";
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.6s 12.2s -347ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +1.08 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..fdf6.js gzip N/A 13.1 kB N/A
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 1 MB 1 MB ⚠️ +372 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1.01 MB ⚠️ +372 B
link.js 1.06 MB 1.06 MB ⚠️ +520 B
routerDirect.js 1.05 MB 1.06 MB ⚠️ +520 B
withRouter.js 1.05 MB 1.06 MB ⚠️ +520 B
Overall change 5.19 MB 5.19 MB ⚠️ +2.3 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.5s 12.5s -33ms
nodeModulesSize 73.3 MB 73.3 MB ⚠️ +1.08 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 2.07 2.016 -0.05
/ avg req/sec 1207.98 1240.22 +32.24
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.265 1.305 ⚠️ +0.04
/error-in-render avg req/sec 1976.26 1916.01 ⚠️ -60.25
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
597-c48889ef..1870.js gzip 13 kB 13 kB ⚠️ +13 B
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.58 kB 6.58 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.9 kB ⚠️ +13 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 588 B 587 B -1 B
link.html gzip 593 B 593 B
withRouter.html gzip 581 B 582 B ⚠️ +1 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for 677f882d2ed8..c23f838ed.js
@@ -581,6 +581,9 @@
       }
       (e.__esModule = !0),
         (e.removePathTrailingSlash = n),
+        (e.normalizePathSlashes = function(t) {
+          return o(t.replace(/\/\/+/g, "/"));
+        }),
         (e.normalizePathTrailingSlash = void 0);
       var o = n;
       e.normalizePathTrailingSlash = o;
@@ -755,7 +758,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, c.normalizePathSlashes)(e)
               : "".concat(e).concat("/" === x(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -824,7 +827,7 @@
         if (!E(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, c.normalizePathSlashes)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var u = (0, v.searchParamsToUrlQuery)(a.searchParams),
@@ -862,14 +865,14 @@
           p = r ? C(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
-      var T = Symbol("SSG_DATA_NOT_FOUND");
-      function I(t, e) {
+      var I = Symbol("SSG_DATA_NOT_FOUND");
+      function T(t, e) {
         return fetch(t, { credentials: "same-origin" }).then(function(r) {
           if (!r.ok) {
-            if (e > 1 && r.status >= 500) return I(t, e - 1);
+            if (e > 1 && r.status >= 500) return T(t, e - 1);
             if (404 === r.status)
               return r.json().then(function(t) {
-                if (t.notFound) return { notFound: T };
+                if (t.notFound) return { notFound: I };
                 throw new Error("Failed to load static props");
               });
             throw new Error("Failed to load static props");
@@ -878,7 +881,7 @@
         });
       }
       function A(t, e) {
-        return I(t, e ? 3 : 1).catch(function(t) {
+        return T(t, e ? 3 : 1).catch(function(t) {
           throw (e || (0, s.markAssetError)(t), t);
         });
       }
@@ -1043,7 +1046,7 @@
                       x,
                       O,
                       C,
-                      I,
+                      T,
                       A,
                       M,
                       D,
@@ -1055,9 +1058,9 @@
                       G,
                       B,
                       H,
+                      z,
                       V,
                       X,
-                      z,
                       J,
                       $,
                       Y,
@@ -1125,7 +1128,7 @@
                               return (
                                 (x = (0, d.parseRelativeUrl)(o)),
                                 (C = (O = x).pathname),
-                                (I = O.query),
+                                (T = O.query),
                                 (e.prev = 36),
                                 (e.next = 39),
                                 this.pageLoader.getPageList()
@@ -1182,7 +1185,7 @@
                                 (W = U.pathname),
                                 (F = (0, m.getRouteRegex)(D)),
                                 (q = (0, y.getRouteMatcher)(F)(W)),
-                                (B = (G = D === W) ? R(D, W, I) : {}),
+                                (B = (G = D === W) ? R(D, W, T) : {}),
                                 q && (!G || B.result))
                               ) {
                                 e.next = 77;
@@ -1193,7 +1196,7 @@
                                   (H = Object.keys(F.groups).filter(function(
                                     t
                                   ) {
-                                    return !I[t];
+                                    return !T[t];
                                   })).length > 0
                                 )
                               ) {
@@ -1231,24 +1234,24 @@
                                 ? (a = (0, h.formatWithValidation)(
                                     Object.assign({}, U, {
                                       pathname: B.result,
-                                      query: L(I, B.params)
+                                      query: L(T, B.params)
                                     })
                                   ))
-                                : Object.assign(I, q);
+                                : Object.assign(T, q);
                             case 78:
                               return (
                                 t.events.emit("routeChangeStart", a, g),
                                 (e.prev = 79),
                                 (e.next = 82),
-                                this.getRouteInfo(D, C, I, a, N, g)
+                                this.getRouteInfo(D, C, T, a, N, g)
                               );
                             case 82:
                               if (
-                                ((V = e.sent),
-                                (z = (X = V).error),
-                                (J = X.props),
-                                ($ = X.__N_SSG),
-                                (Y = X.__N_SSP),
+                                ((z = e.sent),
+                                (X = (V = z).error),
+                                (J = V.props),
+                                ($ = V.__N_SSG),
+                                (Y = V.__N_SSP),
                                 (!$ && !Y) || !J)
                               ) {
                                 e.next = 108;
@@ -1284,7 +1287,7 @@
                                 e.abrupt("return", new Promise(function() {}))
                               );
                             case 95:
-                              if (J.notFound !== T) {
+                              if (J.notFound !== I) {
                                 e.next = 108;
                                 break;
                               }
@@ -1303,12 +1306,12 @@
                             case 105:
                               return (
                                 (e.next = 107),
-                                this.getRouteInfo(rt, rt, I, a, N, {
+                                this.getRouteInfo(rt, rt, T, a, N, {
                                   shallow: !1
                                 })
                               );
                             case 107:
-                              V = e.sent;
+                              z = e.sent;
                             case 108:
                               return (
                                 t.events.emit("beforeHistoryChange", a, g),
@@ -1318,22 +1321,22 @@
                                 this.set(
                                   D,
                                   C,
-                                  I,
+                                  T,
                                   w,
-                                  V,
+                                  z,
                                   u || (nt || !i.scroll ? null : { x: 0, y: 0 })
                                 ).catch(function(t) {
                                   if (!t.cancelled) throw t;
-                                  z = z || t;
+                                  X = X || t;
                                 })
                               );
                             case 114:
-                              if (!z) {
+                              if (!X) {
                                 e.next = 117;
                                 break;
                               }
-                              throw (t.events.emit("routeChangeError", z, w, g),
-                              z);
+                              throw (t.events.emit("routeChangeError", X, w, g),
+                              X);
                             case 117:
                               return (
                                 t.events.emit("routeChangeComplete", a, g),
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "kIpixyllrlj_sGLqM0f2L",
+        "buildId": "kb0Iw1kjltU-gbRiWiFwm",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_buildManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_ssgManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "kIpixyllrlj_sGLqM0f2L",
+        "buildId": "kb0Iw1kjltU-gbRiWiFwm",
         "isFallback": false,
         "gip": true
       }
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_buildManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_ssgManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "kIpixyllrlj_sGLqM0f2L",
+        "buildId": "kb0Iw1kjltU-gbRiWiFwm",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_buildManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kIpixyllrlj_sGLqM0f2L/_ssgManifest.js"
+      src="/_next/static/kb0Iw1kjltU-gbRiWiFwm/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: d6c6abb

@Janpot

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jan 25, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 9.9s 10.2s ⚠️ +333ms
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +90.8 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.996 2.071 ⚠️ +0.08
/ avg req/sec 1252.74 1207.19 ⚠️ -45.55
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.215 1.263 ⚠️ +0.05
/error-in-render avg req/sec 2057.43 1979.05 ⚠️ -78.38
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB 13.1 kB ⚠️ +17 B
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 614 B 612 B -2 B
link.html gzip 620 B 618 B -2 B
withRouter.html gzip 607 B 605 B -2 B
Overall change 1.84 kB 1.83 kB -6 B

Diffs

Diff for 677f882d2ed8..dde534236.js
@@ -947,6 +947,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -965,6 +966,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -1245,7 +1250,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addPathPrefix(path, prefix) {
         return prefix && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(prefix)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(prefix)
             : ""
                 .concat(prefix)
                 .concat(
@@ -1413,8 +1418,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
         try {
           var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           );
           var interpolatedAs = "";
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.196e838be0add4f4d952.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 11.9s 11.9s -86ms
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +90.8 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..fdf6.js gzip N/A 13.1 kB N/A
Overall change 59.4 kB 59.5 kB ⚠️ +17 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 1 MB 1 MB ⚠️ +372 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1.01 MB ⚠️ +372 B
link.js 1.06 MB 1.06 MB ⚠️ +520 B
routerDirect.js 1.05 MB 1.06 MB ⚠️ +520 B
withRouter.js 1.05 MB 1.06 MB ⚠️ +520 B
Overall change 5.19 MB 5.19 MB ⚠️ +2.3 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12s 12.2s ⚠️ +259ms
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +90.8 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.979 1.959 -0.02
/ avg req/sec 1263.36 1276.37 +13.01
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.245 1.235 -0.01
/error-in-render avg req/sec 2007.86 2024.18 +16.32
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
597-c48889ef..1870.js gzip 13 kB 13 kB ⚠️ +13 B
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.58 kB 6.58 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.9 kB ⚠️ +13 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 587 B 586 B -1 B
link.html gzip 591 B 592 B ⚠️ +1 B
withRouter.html gzip 580 B 580 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for 677f882d2ed8..c23f838ed.js
@@ -581,6 +581,9 @@
       }
       (e.__esModule = !0),
         (e.removePathTrailingSlash = n),
+        (e.normalizePathSlashes = function(t) {
+          return o(t.replace(/\/\/+/g, "/"));
+        }),
         (e.normalizePathTrailingSlash = void 0);
       var o = n;
       e.normalizePathTrailingSlash = o;
@@ -755,7 +758,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, c.normalizePathSlashes)(e)
               : "".concat(e).concat("/" === x(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -824,7 +827,7 @@
         if (!E(o)) return r ? [o] : o;
         try {
           var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          a.pathname = (0, c.normalizePathSlashes)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var u = (0, v.searchParamsToUrlQuery)(a.searchParams),
@@ -862,14 +865,14 @@
           p = r ? C(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
-      var T = Symbol("SSG_DATA_NOT_FOUND");
-      function I(t, e) {
+      var I = Symbol("SSG_DATA_NOT_FOUND");
+      function T(t, e) {
         return fetch(t, { credentials: "same-origin" }).then(function(r) {
           if (!r.ok) {
-            if (e > 1 && r.status >= 500) return I(t, e - 1);
+            if (e > 1 && r.status >= 500) return T(t, e - 1);
             if (404 === r.status)
               return r.json().then(function(t) {
-                if (t.notFound) return { notFound: T };
+                if (t.notFound) return { notFound: I };
                 throw new Error("Failed to load static props");
               });
             throw new Error("Failed to load static props");
@@ -878,7 +881,7 @@
         });
       }
       function A(t, e) {
-        return I(t, e ? 3 : 1).catch(function(t) {
+        return T(t, e ? 3 : 1).catch(function(t) {
           throw (e || (0, s.markAssetError)(t), t);
         });
       }
@@ -1043,7 +1046,7 @@
                       x,
                       O,
                       C,
-                      I,
+                      T,
                       A,
                       M,
                       D,
@@ -1055,9 +1058,9 @@
                       G,
                       B,
                       H,
+                      z,
                       V,
                       X,
-                      z,
                       J,
                       $,
                       Y,
@@ -1125,7 +1128,7 @@
                               return (
                                 (x = (0, d.parseRelativeUrl)(o)),
                                 (C = (O = x).pathname),
-                                (I = O.query),
+                                (T = O.query),
                                 (e.prev = 36),
                                 (e.next = 39),
                                 this.pageLoader.getPageList()
@@ -1182,7 +1185,7 @@
                                 (W = U.pathname),
                                 (F = (0, m.getRouteRegex)(D)),
                                 (q = (0, y.getRouteMatcher)(F)(W)),
-                                (B = (G = D === W) ? R(D, W, I) : {}),
+                                (B = (G = D === W) ? R(D, W, T) : {}),
                                 q && (!G || B.result))
                               ) {
                                 e.next = 77;
@@ -1193,7 +1196,7 @@
                                   (H = Object.keys(F.groups).filter(function(
                                     t
                                   ) {
-                                    return !I[t];
+                                    return !T[t];
                                   })).length > 0
                                 )
                               ) {
@@ -1231,24 +1234,24 @@
                                 ? (a = (0, h.formatWithValidation)(
                                     Object.assign({}, U, {
                                       pathname: B.result,
-                                      query: L(I, B.params)
+                                      query: L(T, B.params)
                                     })
                                   ))
-                                : Object.assign(I, q);
+                                : Object.assign(T, q);
                             case 78:
                               return (
                                 t.events.emit("routeChangeStart", a, g),
                                 (e.prev = 79),
                                 (e.next = 82),
-                                this.getRouteInfo(D, C, I, a, N, g)
+                                this.getRouteInfo(D, C, T, a, N, g)
                               );
                             case 82:
                               if (
-                                ((V = e.sent),
-                                (z = (X = V).error),
-                                (J = X.props),
-                                ($ = X.__N_SSG),
-                                (Y = X.__N_SSP),
+                                ((z = e.sent),
+                                (X = (V = z).error),
+                                (J = V.props),
+                                ($ = V.__N_SSG),
+                                (Y = V.__N_SSP),
                                 (!$ && !Y) || !J)
                               ) {
                                 e.next = 108;
@@ -1284,7 +1287,7 @@
                                 e.abrupt("return", new Promise(function() {}))
                               );
                             case 95:
-                              if (J.notFound !== T) {
+                              if (J.notFound !== I) {
                                 e.next = 108;
                                 break;
                               }
@@ -1303,12 +1306,12 @@
                             case 105:
                               return (
                                 (e.next = 107),
-                                this.getRouteInfo(rt, rt, I, a, N, {
+                                this.getRouteInfo(rt, rt, T, a, N, {
                                   shallow: !1
                                 })
                               );
                             case 107:
-                              V = e.sent;
+                              z = e.sent;
                             case 108:
                               return (
                                 t.events.emit("beforeHistoryChange", a, g),
@@ -1318,22 +1321,22 @@
                                 this.set(
                                   D,
                                   C,
-                                  I,
+                                  T,
                                   w,
-                                  V,
+                                  z,
                                   u || (nt || !i.scroll ? null : { x: 0, y: 0 })
                                 ).catch(function(t) {
                                   if (!t.cancelled) throw t;
-                                  z = z || t;
+                                  X = X || t;
                                 })
                               );
                             case 114:
-                              if (!z) {
+                              if (!X) {
                                 e.next = 117;
                                 break;
                               }
-                              throw (t.events.emit("routeChangeError", z, w, g),
-                              z);
+                              throw (t.events.emit("routeChangeError", X, w, g),
+                              X);
                             case 117:
                               return (
                                 t.events.emit("routeChangeComplete", a, g),
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "O58sye2T5PSKbfeyc4bXC",
+        "buildId": "78B7k4PT0sgCKFH1BjX56",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_buildManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_ssgManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "O58sye2T5PSKbfeyc4bXC",
+        "buildId": "78B7k4PT0sgCKFH1BjX56",
         "isFallback": false,
         "gip": true
       }
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_buildManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_ssgManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "O58sye2T5PSKbfeyc4bXC",
+        "buildId": "78B7k4PT0sgCKFH1BjX56",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.bca47fd746ca2386fdf6.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_buildManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/O58sye2T5PSKbfeyc4bXC/_ssgManifest.js"
+      src="/_next/static/78B7k4PT0sgCKFH1BjX56/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 1d6f836

@ijjk
Copy link
Member

ijjk commented Jan 25, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 9.9s 9.9s ⚠️ +30ms
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +1.17 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.979 1.976 0
/ avg req/sec 1263.57 1264.89 +1.32
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.262 1.21 -0.05
/error-in-render avg req/sec 1981.29 2066.81 +85.52
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB 13.1 kB ⚠️ +25 B
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.5 kB ⚠️ +25 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 614 B 612 B -2 B
link.html gzip 620 B 619 B -1 B
withRouter.html gzip 607 B 606 B -1 B
Overall change 1.84 kB 1.84 kB -4 B

Diffs

Diff for 677f882d2ed8..dde534236.js
@@ -947,6 +947,7 @@
 
       exports.__esModule = true;
       exports.removePathTrailingSlash = removePathTrailingSlash;
+      exports.normalizePathSlashes = normalizePathSlashes;
       exports.normalizePathTrailingSlash = void 0;
       /**
        * Removes the trailing slash of a path if there is one. Preserves the root path `/`.
@@ -965,6 +966,10 @@
         : removePathTrailingSlash;
       exports.normalizePathTrailingSlash = normalizePathTrailingSlash;
 
+      function normalizePathSlashes(path) {
+        return normalizePathTrailingSlash(path.replace(/\/\/+/g, "/"));
+      }
+
       /***/
     },
 
@@ -1245,7 +1250,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       function addPathPrefix(path, prefix) {
         return prefix && path.startsWith("/")
           ? path === "/"
-            ? (0, _normalizeTrailingSlash.normalizePathTrailingSlash)(prefix)
+            ? (0, _normalizeTrailingSlash.normalizePathSlashes)(prefix)
             : ""
                 .concat(prefix)
                 .concat(
@@ -1412,9 +1417,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         }
 
         try {
-          var finalUrl = new URL(urlAsString, base);
-          finalUrl.pathname = (0,
-          _normalizeTrailingSlash.normalizePathTrailingSlash)(
+          var finalUrl = new URL(urlAsString.replace(/^\/+/, "/"), base);
+          finalUrl.pathname = (0, _normalizeTrailingSlash.normalizePathSlashes)(
             finalUrl.pathname
           );
           var interpolatedAs = "";
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       as="script"
     />
     <link
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       as="script"
     />
     <link
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.aba91d9886388d06047b.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 10s 12.3s ⚠️ +2.3s
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +1.17 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
677f882d2ed8..38ed.js gzip 13.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..a520.js gzip N/A 13.1 kB N/A
Overall change 59.4 kB 59.5 kB ⚠️ +25 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
_error.js 1 MB 1 MB ⚠️ +372 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1.01 MB ⚠️ +372 B
link.js 1.06 MB 1.06 MB ⚠️ +541 B
routerDirect.js 1.05 MB 1.06 MB ⚠️ +541 B
withRouter.js 1.05 MB 1.06 MB ⚠️ +541 B
Overall change 5.19 MB 5.19 MB ⚠️ +2.37 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
buildDuration 12.1s 12.3s ⚠️ +155ms
nodeModulesSize 74.9 MB 74.9 MB ⚠️ +1.17 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
/ failed reqs 0 0
/ total time (seconds) 1.997 2.032 ⚠️ +0.03
/ avg req/sec 1251.72 1230.61 ⚠️ -21.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.292 1.329 ⚠️ +0.04
/error-in-render avg req/sec 1934.84 1881.24 ⚠️ -53.6
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
597-c48889ef..1870.js gzip 13 kB 13.1 kB ⚠️ +21 B
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.58 kB 6.58 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.9 kB ⚠️ +21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js repeated-slash Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary Janpot/next.js repeated-slash Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js repeated-slash Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js repeated-slash Change
index.html gzip 587 B 588 B ⚠️ +1 B
link.html gzip 591 B 593 B ⚠️ +2 B
withRouter.html gzip 580 B 581 B ⚠️ +1 B
Overall change 1.76 kB 1.76 kB ⚠️ +4 B

Diffs

Diff for 677f882d2ed8..c23f838ed.js
@@ -581,6 +581,9 @@
       }
       (e.__esModule = !0),
         (e.removePathTrailingSlash = n),
+        (e.normalizePathSlashes = function(t) {
+          return o(t.replace(/\/\/+/g, "/"));
+        }),
         (e.normalizePathTrailingSlash = void 0);
       var o = n;
       e.normalizePathTrailingSlash = o;
@@ -755,7 +758,7 @@
         return (function(t, e) {
           return e && t.startsWith("/")
             ? "/" === t
-              ? (0, c.normalizePathTrailingSlash)(e)
+              ? (0, c.normalizePathSlashes)(e)
               : "".concat(e).concat("/" === x(t) ? t.substring(1) : t)
             : t;
         })(t, "");
@@ -823,8 +826,8 @@
           o = "string" === typeof e ? e : (0, h.formatWithValidation)(e);
         if (!E(o)) return r ? [o] : o;
         try {
-          var a = new URL(o, n);
-          a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+          var a = new URL(o.replace(/^\/+/, "/"), n);
+          a.pathname = (0, c.normalizePathSlashes)(a.pathname);
           var i = "";
           if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
             var u = (0, v.searchParamsToUrlQuery)(a.searchParams),
@@ -862,14 +865,14 @@
           p = r ? C(O(t.pathname, r)) : i || a;
         return { url: f, as: l ? p : S(p) };
       }
-      var T = Symbol("SSG_DATA_NOT_FOUND");
-      function I(t, e) {
+      var I = Symbol("SSG_DATA_NOT_FOUND");
+      function T(t, e) {
         return fetch(t, { credentials: "same-origin" }).then(function(r) {
           if (!r.ok) {
-            if (e > 1 && r.status >= 500) return I(t, e - 1);
+            if (e > 1 && r.status >= 500) return T(t, e - 1);
             if (404 === r.status)
               return r.json().then(function(t) {
-                if (t.notFound) return { notFound: T };
+                if (t.notFound) return { notFound: I };
                 throw new Error("Failed to load static props");
               });
             throw new Error("Failed to load static props");
@@ -878,7 +881,7 @@
         });
       }
       function A(t, e) {
-        return I(t, e ? 3 : 1).catch(function(t) {
+        return T(t, e ? 3 : 1).catch(function(t) {
           throw (e || (0, s.markAssetError)(t), t);
         });
       }
@@ -1043,7 +1046,7 @@
                       x,
                       O,
                       C,
-                      I,
+                      T,
                       A,
                       M,
                       D,
@@ -1055,9 +1058,9 @@
                       G,
                       B,
                       H,
+                      z,
                       V,
                       X,
-                      z,
                       J,
                       $,
                       Y,
@@ -1125,7 +1128,7 @@
                               return (
                                 (x = (0, d.parseRelativeUrl)(o)),
                                 (C = (O = x).pathname),
-                                (I = O.query),
+                                (T = O.query),
                                 (e.prev = 36),
                                 (e.next = 39),
                                 this.pageLoader.getPageList()
@@ -1182,7 +1185,7 @@
                                 (W = U.pathname),
                                 (F = (0, m.getRouteRegex)(D)),
                                 (q = (0, y.getRouteMatcher)(F)(W)),
-                                (B = (G = D === W) ? R(D, W, I) : {}),
+                                (B = (G = D === W) ? R(D, W, T) : {}),
                                 q && (!G || B.result))
                               ) {
                                 e.next = 77;
@@ -1193,7 +1196,7 @@
                                   (H = Object.keys(F.groups).filter(function(
                                     t
                                   ) {
-                                    return !I[t];
+                                    return !T[t];
                                   })).length > 0
                                 )
                               ) {
@@ -1231,24 +1234,24 @@
                                 ? (a = (0, h.formatWithValidation)(
                                     Object.assign({}, U, {
                                       pathname: B.result,
-                                      query: L(I, B.params)
+                                      query: L(T, B.params)
                                     })
                                   ))
-                                : Object.assign(I, q);
+                                : Object.assign(T, q);
                             case 78:
                               return (
                                 t.events.emit("routeChangeStart", a, g),
                                 (e.prev = 79),
                                 (e.next = 82),
-                                this.getRouteInfo(D, C, I, a, N, g)
+                                this.getRouteInfo(D, C, T, a, N, g)
                               );
                             case 82:
                               if (
-                                ((V = e.sent),
-                                (z = (X = V).error),
-                                (J = X.props),
-                                ($ = X.__N_SSG),
-                                (Y = X.__N_SSP),
+                                ((z = e.sent),
+                                (X = (V = z).error),
+                                (J = V.props),
+                                ($ = V.__N_SSG),
+                                (Y = V.__N_SSP),
                                 (!$ && !Y) || !J)
                               ) {
                                 e.next = 108;
@@ -1284,7 +1287,7 @@
                                 e.abrupt("return", new Promise(function() {}))
                               );
                             case 95:
-                              if (J.notFound !== T) {
+                              if (J.notFound !== I) {
                                 e.next = 108;
                                 break;
                               }
@@ -1303,12 +1306,12 @@
                             case 105:
                               return (
                                 (e.next = 107),
-                                this.getRouteInfo(rt, rt, I, a, N, {
+                                this.getRouteInfo(rt, rt, T, a, N, {
                                   shallow: !1
                                 })
                               );
                             case 107:
-                              V = e.sent;
+                              z = e.sent;
                             case 108:
                               return (
                                 t.events.emit("beforeHistoryChange", a, g),
@@ -1318,22 +1321,22 @@
                                 this.set(
                                   D,
                                   C,
-                                  I,
+                                  T,
                                   w,
-                                  V,
+                                  z,
                                   u || (nt || !i.scroll ? null : { x: 0, y: 0 })
                                 ).catch(function(t) {
                                   if (!t.cancelled) throw t;
-                                  z = z || t;
+                                  X = X || t;
                                 })
                               );
                             case 114:
-                              if (!z) {
+                              if (!X) {
                                 e.next = 117;
                                 break;
                               }
-                              throw (t.events.emit("routeChangeError", z, w, g),
-                              z);
+                              throw (t.events.emit("routeChangeError", X, w, g),
+                              X);
                             case 117:
                               return (
                                 t.events.emit("routeChangeComplete", a, g),
Diff for index.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "WPoWvVp2f7w6z1G0UuVtD",
+        "buildId": "YLTnPvO85kxcKSUnBVrN5",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_buildManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_ssgManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       as="script"
     />
     <link
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "WPoWvVp2f7w6z1G0UuVtD",
+        "buildId": "YLTnPvO85kxcKSUnBVrN5",
         "isFallback": false,
         "gip": true
       }
@@ -70,7 +70,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       async=""
     ></script>
     <script
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_buildManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_ssgManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       as="script"
     />
     <link
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "WPoWvVp2f7w6z1G0UuVtD",
+        "buildId": "YLTnPvO85kxcKSUnBVrN5",
         "isFallback": false,
         "gip": true
       }
@@ -65,7 +65,7 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ece6084e72bffdaaa520.js"
       async=""
     ></script>
     <script
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_buildManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/WPoWvVp2f7w6z1G0UuVtD/_ssgManifest.js"
+      src="/_next/static/YLTnPvO85kxcKSUnBVrN5/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 84a2447

@dalfriedrice
Copy link

@Janpot @Timer @timneutkens Any update when we are planning to incorporate this change and with what version.?

@kodiakhq kodiakhq bot closed this in #27738 Aug 3, 2021
kodiakhq bot pushed a commit that referenced this pull request Aug 3, 2021
This adds handling for repeated forward/back slashes in Next.js, when these slashes are detected in a request to Next.js we will automatically remove the additional slashes redirecting with a 308 status code which prevents duplicate content when being crawled by search engines. 

Fixes: #13011
Fixes: #23772
Closes: #15171
Closes: #25745
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Aug 19, 2021
This adds handling for repeated forward/back slashes in Next.js, when these slashes are detected in a request to Next.js we will automatically remove the additional slashes redirecting with a 308 status code which prevents duplicate content when being crawled by search engines. 

Fixes: vercel#13011
Fixes: vercel#23772
Closes: vercel#15171
Closes: vercel#25745
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catch-all dynamic route doesn't catch a path with undefined path parameter
6 participants