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

Use regex lexer for gathering named groups from has #23626

Merged
merged 6 commits into from Apr 13, 2021

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Apr 2, 2021

This is a follow-up to #23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this.

Closes: #23415

Bug

  • Related issues linked using fixes #number
  • Integration tests added

Documentation / Examples

  • Make sure the linting passes

@ijjk
Copy link
Member Author

ijjk commented Apr 2, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 13.4s 12.9s -432ms
nodeModulesSize 45.9 MB 46.1 MB ⚠️ +125 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.472 2.39 -0.08
/ avg req/sec 1011.14 1045.83 +34.69
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.638 1.576 -0.06
/error-in-render avg req/sec 1526.39 1586.29 +59.9
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
677f882d2ed8..7edd.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.64 kB 8.64 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 370 B 370 B
Overall change 370 B 370 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 15.5s 15.3s -156ms
nodeModulesSize 45.9 MB 46.1 MB ⚠️ +125 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
677f882d2ed8..7edd.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.64 kB 8.64 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 370 B 370 B
Overall change 370 B 370 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_error.js 1.36 MB 1.4 MB ⚠️ +33 kB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.36 MB 1.4 MB ⚠️ +33 kB
link.js 1.42 MB 1.45 MB ⚠️ +33 kB
routerDirect.js 1.41 MB 1.45 MB ⚠️ +33 kB
withRouter.js 1.41 MB 1.45 MB ⚠️ +33 kB
Overall change 6.99 MB 7.16 MB ⚠️ +165 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 15.7s 15.3s -390ms
nodeModulesSize 45.9 MB 46.1 MB ⚠️ +125 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.41 2.405 -0.01
/ avg req/sec 1037.34 1039.67 +2.33
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.59 1.523 -0.07
/error-in-render avg req/sec 1572.09 1641.32 +69.23
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-e27c5352..db8c.js gzip 13.3 kB 13.3 kB
778-c0be2426..e455.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-b58c1..9b8e.js gzip 3.4 kB 3.4 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 8.76 kB 8.76 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 609 B 609 B
link.html gzip 614 B 614 B
withRouter.html gzip 604 B 604 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "t48ICeikB_A1e4D9rUMJG",
+        "buildId": "e1sPCqV9qdPQrm5BVXfCV",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_buildManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_ssgManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "t48ICeikB_A1e4D9rUMJG",
+        "buildId": "e1sPCqV9qdPQrm5BVXfCV",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_buildManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_ssgManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "t48ICeikB_A1e4D9rUMJG",
+        "buildId": "e1sPCqV9qdPQrm5BVXfCV",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_buildManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/t48ICeikB_A1e4D9rUMJG/_ssgManifest.js"
+      src="/_next/static/e1sPCqV9qdPQrm5BVXfCV/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 6eb7890

@timneutkens timneutkens changed the title Use regex lexar for gathering named groups from has Use regex lexer for gathering named groups from has Apr 2, 2021
@ijjk
Copy link
Member Author

ijjk commented Apr 12, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 14.4s 14.2s -288ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.603 2.6 0
/ avg req/sec 960.59 961.59 +1
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.462 1.465 0
/error-in-render avg req/sec 1710.42 1705.97 ⚠️ -4.45
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 18.1s 18.2s ⚠️ +156ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_error.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
link.js 1.4 MB 1.45 MB ⚠️ +46.1 kB
routerDirect.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
withRouter.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
Overall change 6.91 MB 7.14 MB ⚠️ +230 kB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 14.4s 14.3s -169ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.679 2.646 -0.03
/ avg req/sec 933.02 944.99 +11.97
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.484 1.516 ⚠️ +0.03
/error-in-render avg req/sec 1684.93 1649.51 ⚠️ -35.42
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "wcSpK7MZWN-04f3L6hyLb",
+        "buildId": "QzNO7D5Bs8JTGLTX_Z3yM",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_buildManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_ssgManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -53,7 +53,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "wcSpK7MZWN-04f3L6hyLb",
+        "buildId": "QzNO7D5Bs8JTGLTX_Z3yM",
         "isFallback": false,
         "gip": true
       }
@@ -91,11 +91,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_buildManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_ssgManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "wcSpK7MZWN-04f3L6hyLb",
+        "buildId": "QzNO7D5Bs8JTGLTX_Z3yM",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_buildManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/wcSpK7MZWN-04f3L6hyLb/_ssgManifest.js"
+      src="/_next/static/QzNO7D5Bs8JTGLTX_Z3yM/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: e591f92

@ijjk
Copy link
Member Author

ijjk commented Apr 12, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 14.9s 14.9s -27ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.655 2.624 -0.03
/ avg req/sec 941.65 952.74 +11.09
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.511 1.494 -0.02
/error-in-render avg req/sec 1654.83 1673.56 +18.73
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 18.6s 18.8s ⚠️ +257ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_error.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
link.js 1.4 MB 1.45 MB ⚠️ +46.1 kB
routerDirect.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
withRouter.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
Overall change 6.91 MB 7.14 MB ⚠️ +230 kB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 14.8s 15s ⚠️ +138ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.597 2.638 ⚠️ +0.04
/ avg req/sec 962.73 947.85 ⚠️ -14.88
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.481 1.503 ⚠️ +0.02
/error-in-render avg req/sec 1688.44 1663.42 ⚠️ -25.02
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "ytxxLHeviTt4UyN1fDTHz",
+        "buildId": "o55Q2UJU_cdF-Ak4nVNPF",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_buildManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_ssgManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -53,7 +53,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "ytxxLHeviTt4UyN1fDTHz",
+        "buildId": "o55Q2UJU_cdF-Ak4nVNPF",
         "isFallback": false,
         "gip": true
       }
@@ -91,11 +91,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_buildManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_ssgManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "ytxxLHeviTt4UyN1fDTHz",
+        "buildId": "o55Q2UJU_cdF-Ak4nVNPF",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_buildManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/ytxxLHeviTt4UyN1fDTHz/_ssgManifest.js"
+      src="/_next/static/o55Q2UJU_cdF-Ak4nVNPF/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: ea1af04

@ijjk
Copy link
Member Author

ijjk commented Apr 13, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 14s 14s
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.373 2.419 ⚠️ +0.05
/ avg req/sec 1053.4 1033.62 ⚠️ -19.78
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.244 1.205 -0.04
/error-in-render avg req/sec 2009.43 2074.88 +65.45
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 16.8s 16.8s ⚠️ +29ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_error.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.35 MB 1.39 MB ⚠️ +46.1 kB
link.js 1.4 MB 1.45 MB ⚠️ +46.1 kB
routerDirect.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
withRouter.js 1.4 MB 1.44 MB ⚠️ +46.1 kB
Overall change 6.91 MB 7.14 MB ⚠️ +230 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js has/regex-lexar Change
buildDuration 13.5s 13.5s -8ms
nodeModulesSize 46.7 MB 46.9 MB ⚠️ +171 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js has/regex-lexar Change
/ failed reqs 0 0
/ total time (seconds) 2.329 2.344 ⚠️ +0.01
/ avg req/sec 1073.62 1066.53 ⚠️ -7.09
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.246 1.201 -0.04
/error-in-render avg req/sec 2007.01 2082.17 +75.16
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js has/regex-lexar Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-6834d41c..48a9.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js has/regex-lexar 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 ijjk/next.js has/regex-lexar Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js has/regex-lexar Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js has/regex-lexar Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "-AJtKzdeVcYg5KvqgU15j",
+        "buildId": "L8FnWZARYrPaipLrjzsJc",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_buildManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_ssgManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -53,7 +53,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "-AJtKzdeVcYg5KvqgU15j",
+        "buildId": "L8FnWZARYrPaipLrjzsJc",
         "isFallback": false,
         "gip": true
       }
@@ -91,11 +91,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_buildManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_ssgManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "-AJtKzdeVcYg5KvqgU15j",
+        "buildId": "L8FnWZARYrPaipLrjzsJc",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_buildManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/-AJtKzdeVcYg5KvqgU15j/_ssgManifest.js"
+      src="/_next/static/L8FnWZARYrPaipLrjzsJc/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 6b5ad37

@kodiakhq kodiakhq bot merged commit 4d291bd into vercel:canary Apr 13, 2021
@ijjk ijjk deleted the has/regex-lexar branch April 13, 2021 14:13
@laugharn
Copy link
Contributor

@ijjk this is so cool.

SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
This is a follow-up to vercel#23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this. 

Closes: vercel#23415

## Bug

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

## Documentation / Examples

- [x] Make sure the linting passes
@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.

has field example seems wrong in next@canary
3 participants