Skip to content

Commit

Permalink
v12.0.4-canary.14
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Nov 15, 2021
1 parent be03a1d commit 66d9b4e
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "12.0.4-canary.13"
"version": "12.0.4-canary.14"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "12.0.4-canary.13",
"@next/eslint-plugin-next": "12.0.4-canary.14",
"@rushstack/eslint-patch": "^1.0.6",
"@typescript-eslint/parser": "^4.20.0",
"eslint-import-resolver-node": "^0.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -70,10 +70,10 @@
"@babel/runtime": "7.15.4",
"@hapi/accept": "5.0.2",
"@napi-rs/triples": "1.0.3",
"@next/env": "12.0.4-canary.13",
"@next/polyfill-module": "12.0.4-canary.13",
"@next/react-dev-overlay": "12.0.4-canary.13",
"@next/react-refresh-utils": "12.0.4-canary.13",
"@next/env": "12.0.4-canary.14",
"@next/polyfill-module": "12.0.4-canary.14",
"@next/react-dev-overlay": "12.0.4-canary.14",
"@next/react-refresh-utils": "12.0.4-canary.14",
"acorn": "8.5.0",
"assert": "2.0.0",
"browserify-zlib": "0.2.0",
Expand Down Expand Up @@ -156,7 +156,7 @@
"@babel/traverse": "7.15.0",
"@babel/types": "7.15.0",
"@napi-rs/cli": "1.2.1",
"@next/polyfill-nomodule": "12.0.4-canary.13",
"@next/polyfill-nomodule": "12.0.4-canary.14",
"@peculiar/webcrypto": "1.1.7",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "12.0.4-canary.13",
"version": "12.0.4-canary.14",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down

1 comment on commit 66d9b4e

@ijjk
Copy link
Member Author

@ijjk ijjk commented on 66d9b4e Nov 15, 2021

Choose a reason for hiding this comment

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

Stats from current release

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
buildDuration 21s 20.6s -384ms
buildDurationCached 4s 4.1s ⚠️ +49ms
nodeModulesSize 335 MB 335 MB ⚠️ +138 kB
Page Load Tests Overall increase ✓
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
/ failed reqs 0 0
/ total time (seconds) 3.31 3.351 ⚠️ +0.04
/ avg req/sec 755.21 745.96 ⚠️ -9.25
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.62 1.572 -0.05
/error-in-render avg req/sec 1543.07 1590.43 +47.36
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
450.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42.2 kB 42.2 kB
main-HASH.js gzip 28.2 kB 28.3 kB ⚠️ +153 B
webpack-HASH.js gzip 1.45 kB 1.45 kB -1 B
Overall change 72 kB 72.2 kB ⚠️ +152 B
Legacy Client Bundles (polyfills)
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
_app-HASH.js gzip 1.37 kB 1.37 kB
_error-HASH.js gzip 194 B 194 B
amp-HASH.js gzip 312 B 312 B
css-HASH.js gzip 327 B 327 B
dynamic-HASH.js gzip 2.38 kB 2.38 kB
head-HASH.js gzip 350 B 350 B
hooks-HASH.js gzip 635 B 635 B
image-HASH.js gzip 4.44 kB 4.44 kB
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.87 kB 1.87 kB
routerDirect..HASH.js gzip 321 B 321 B
script-HASH.js gzip 383 B 383 B
withRouter-HASH.js gzip 318 B 318 B
334f979574ae..6f4.css gzip 106 B 107 B ⚠️ +1 B
Overall change 13.3 kB 13.3 kB ⚠️ +1 B
Client Build Manifests Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 459 B 460 B ⚠️ +1 B
Overall change 459 B 460 B ⚠️ +1 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
index.html gzip 521 B 523 B ⚠️ +2 B
link.html gzip 533 B 536 B ⚠️ +3 B
withRouter.html gzip 514 B 516 B ⚠️ +2 B
Overall change 1.57 kB 1.57 kB ⚠️ +7 B

Diffs

Diff for _buildManifest.js
@@ -4,8 +4,8 @@ self.__BUILD_MANIFEST = {
   "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-97db2c91e74bb63f.js"],
   "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-8c7b17a56b7abb6e.js"],
   "/css": [
-    "static\u002Fcss\u002F7edf9ee7c3885268.css",
-    "static\u002Fchunks\u002Fpages\u002Fcss-99ad492aad2c14e4.js"
+    "static\u002Fcss\u002F94fdbc56eafa2039.css",
+    "static\u002Fchunks\u002Fpages\u002Fcss-deb2f2a41a5bf511.js"
   ],
   "/dynamic": [
     "static\u002Fchunks\u002Fpages\u002Fdynamic-0ead1841ed0002db.js"
Diff for css-HASH.js
@@ -50,7 +50,7 @@
 
     /***/ 3350: /***/ function(module) {
       // extracted by mini-css-extract-plugin
-      module.exports = { helloWorld: "css_helloWorld__2Fhmt" };
+      module.exports = { helloWorld: "css_helloWorld__qqNwY" };
 
       /***/
     }
Diff for main-HASH.js
@@ -60,9 +60,21 @@
     /***/ 6007: /***/ function(__unused_webpack_module, exports) {
       "use strict";
 
+      function _instanceof(left, right) {
+        if (
+          right != null &&
+          typeof Symbol !== "undefined" &&
+          right[Symbol.hasInstance]
+        ) {
+          return right[Symbol.hasInstance](left);
+        } else {
+          return left instanceof right;
+        }
+      }
       Object.defineProperty(exports, "__esModule", {
         value: true
       });
+      exports.isEqualNode = isEqualNode;
       exports["default"] = initHeadManager;
       exports.DOMAttributeNames = void 0;
       var DOMAttributeNames = {
@@ -106,6 +118,23 @@
         }
         return el;
       }
+      function isEqualNode(oldTag, newTag) {
+        if (
+          _instanceof(oldTag, HTMLElement) &&
+          _instanceof(newTag, HTMLElement)
+        ) {
+          var nonce = newTag.getAttribute("nonce");
+          // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not
+          // be stripped if there is no content security policy response header that includes a nonce.
+          if (nonce && !oldTag.getAttribute("nonce")) {
+            var cloneTag = newTag.cloneNode(true);
+            cloneTag.setAttribute("nonce", "");
+            cloneTag.nonce = nonce;
+            return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag);
+          }
+        }
+        return oldTag.isEqualNode(newTag);
+      }
       function updateElements(type, components) {
         var headEl = document.getElementsByTagName("head")[0];
         var headCountEl = headEl.querySelector("meta[name=next-head-count]");
@@ -116,7 +145,11 @@
         for (
           var i = 0, j = headCountEl.previousElementSibling;
           i < headCount;
-          i++, j = j.previousElementSibling
+          i++,
+            j =
+              (j === null || j === void 0
+                ? void 0
+                : j.previousElementSibling) || null
         ) {
           var ref;
           if (
@@ -134,7 +167,7 @@
           .filter(function(newTag) {
             for (var k = 0, len = oldTags.length; k < len; k++) {
               var oldTag = oldTags[k];
-              if (oldTag.isEqualNode(newTag)) {
+              if (isEqualNode(oldTag, newTag)) {
                 oldTags.splice(k, 1);
                 return false;
               }
@@ -142,7 +175,10 @@
             return true;
           });
         oldTags.forEach(function(t) {
-          return t.parentNode.removeChild(t);
+          var ref;
+          return (ref = t.parentNode) === null || ref === void 0
+            ? void 0
+            : ref.removeChild(t);
         });
         newTags.forEach(function(t) {
           return headEl.insertBefore(t, headCountEl);
@@ -554,7 +590,7 @@
         document.getElementById("__NEXT_DATA__").textContent
       );
       window.__NEXT_DATA__ = data;
-      var version = "12.0.3";
+      var version = "12.0.4-canary.14";
       exports.version = version;
       var looseToArray = function(input) {
         return [].slice.call(input);
@@ -1867,14 +1903,17 @@
       }
       function RouteAnnouncer() {
         var asPath = (0, _router).useRouter().asPath;
-        var ref = _slicedToArray(_react.default.useState(""), 2),
-          routeAnnouncement = ref[0],
-          setRouteAnnouncement = ref[1];
-        // Only announce the path change, but not for the first load because screen reader will do that automatically.
+        var ref1 = _slicedToArray(_react.default.useState(""), 2),
+          routeAnnouncement = ref1[0],
+          setRouteAnnouncement = ref1[1];
+        // Only announce the path change, but not for the first load because screen
+        // reader will do that automatically.
         var initialPathLoaded = _react.default.useRef(false);
-        // Every time the path changes, announce the route change. The announcement will be prioritized by h1, then title
-        // (from metadata), and finally if those don't exist, then the pathName that is in the URL. This methodology is
-        // inspired by Marcy Sutton's accessible client routing user testing. More information can be found here:
+        // Every time the path changes, announce the new page’s title following this
+        // priority: first the document title (from head), otherwise the first h1, or
+        // if none of these exist, then the pathname from the URL. This methodology is
+        // inspired by Marcy Sutton’s accessible client routing user testing. More
+        // information can be found here:
         // https://www.gatsbyjs.com/blog/2019-07-11-user-testing-accessible-client-routing/
         _react.default.useEffect(
           function() {
@@ -1882,20 +1921,22 @@
               initialPathLoaded.current = true;
               return;
             }
-            var newRouteAnnouncement;
-            var pageHeader = document.querySelector("h1");
-            if (pageHeader) {
-              newRouteAnnouncement =
-                pageHeader.innerText || pageHeader.textContent;
-            }
-            if (!newRouteAnnouncement) {
-              if (document.title) {
-                newRouteAnnouncement = document.title;
-              } else {
-                newRouteAnnouncement = asPath;
-              }
+            if (document.title) {
+              setRouteAnnouncement(document.title);
+            } else {
+              var pageHeader = document.querySelector("h1");
+              var ref;
+              var content =
+                (ref =
+                  pageHeader === null || pageHeader === void 0
+                    ? void 0
+                    : pageHeader.innerText) !== null && ref !== void 0
+                  ? ref
+                  : pageHeader === null || pageHeader === void 0
+                  ? void 0
+                  : pageHeader.textContent;
+              setRouteAnnouncement(content || asPath);
             }
-            setRouteAnnouncement(newRouteAnnouncement);
           },
           [asPath]
         );
@@ -3662,7 +3703,10 @@
         // first item will be empty string from splitting at first char
         var pathnameParts = pathname.split("/");
         (locales || []).some(function(locale) {
-          if (pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
+          if (
+            pathnameParts[1] &&
+            pathnameParts[1].toLowerCase() === locale.toLowerCase()
+          ) {
             detectedLocale = locale;
             pathnameParts.splice(1, 1);
             pathname = pathnameParts.join("/") || "/";
@@ -5694,7 +5738,7 @@
                             case 24:
                               _ctx.next = 26;
                               return this._preflightRequest({
-                                as: asPath,
+                                as: addBasePath(asPath),
                                 cache: true,
                                 pages: pages,
                                 pathname: pathname,
Diff for webpack-HASH.js
@@ -171,7 +171,7 @@
     /******/ // This function allow to reference all chunks
     /******/ __webpack_require__.miniCssF = function(chunkId) {
       /******/ // return url for filenames based on template
-      /******/ return "static/css/" + "7edf9ee7c3885268" + ".css";
+      /******/ return "static/css/" + "94fdbc56eafa2039" + ".css";
       /******/
     };
     /******/
Diff for 7edf9ee7c3885268.css
@@ -1,4 +1,4 @@
-.css_helloWorld__2Fhmt {
+.css_helloWorld__qqNwY {
   color: green;
   background: url(/_next/static/media/nextjs.cae0b805.png);
 }
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script

Default Build with SWC (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
buildDuration 21.9s 22s ⚠️ +84ms
buildDurationCached 4.2s 4.1s -127ms
nodeModulesSize 335 MB 335 MB ⚠️ +138 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
/ failed reqs 0 0
/ total time (seconds) 3.282 3.328 ⚠️ +0.05
/ avg req/sec 761.73 751.29 ⚠️ -10.44
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.576 1.614 ⚠️ +0.04
/error-in-render avg req/sec 1586.6 1549.02 ⚠️ -37.58
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
450.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42.3 kB 42.3 kB
main-HASH.js gzip 28.4 kB 28.6 kB ⚠️ +142 B
webpack-HASH.js gzip 1.44 kB 1.44 kB -1 B
Overall change 72.3 kB 72.5 kB ⚠️ +141 B
Legacy Client Bundles (polyfills)
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
_app-HASH.js gzip 1.35 kB 1.35 kB
_error-HASH.js gzip 180 B 180 B
amp-HASH.js gzip 305 B 305 B
css-HASH.js gzip 321 B 321 B
dynamic-HASH.js gzip 2.38 kB 2.38 kB
head-HASH.js gzip 342 B 342 B
hooks-HASH.js gzip 622 B 622 B
image-HASH.js gzip 4.46 kB 4.46 kB
index-HASH.js gzip 256 B 256 B
link-HASH.js gzip 1.91 kB 1.91 kB
routerDirect..HASH.js gzip 314 B 314 B
script-HASH.js gzip 375 B 375 B
withRouter-HASH.js gzip 309 B 309 B
334f979574ae..6f4.css gzip 106 B 107 B ⚠️ +1 B
Overall change 13.2 kB 13.2 kB ⚠️ +1 B
Client Build Manifests
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 460 B 460 B
Overall change 460 B 460 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary v12.0.3 vercel/next.js refs/heads/canary Change
index.html gzip 523 B 524 B ⚠️ +1 B
link.html gzip 535 B 535 B
withRouter.html gzip 516 B 517 B ⚠️ +1 B
Overall change 1.57 kB 1.58 kB ⚠️ +2 B

Diffs

Diff for _buildManifest.js
@@ -4,8 +4,8 @@ self.__BUILD_MANIFEST = {
   "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-97db2c91e74bb63f.js"],
   "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-8c7b17a56b7abb6e.js"],
   "/css": [
-    "static\u002Fcss\u002F7edf9ee7c3885268.css",
-    "static\u002Fchunks\u002Fpages\u002Fcss-99ad492aad2c14e4.js"
+    "static\u002Fcss\u002F94fdbc56eafa2039.css",
+    "static\u002Fchunks\u002Fpages\u002Fcss-deb2f2a41a5bf511.js"
   ],
   "/dynamic": [
     "static\u002Fchunks\u002Fpages\u002Fdynamic-0ead1841ed0002db.js"
Diff for css-HASH.js
@@ -50,7 +50,7 @@
 
     /***/ 3350: /***/ function(module) {
       // extracted by mini-css-extract-plugin
-      module.exports = { helloWorld: "css_helloWorld__2Fhmt" };
+      module.exports = { helloWorld: "css_helloWorld__qqNwY" };
 
       /***/
     }
Diff for main-HASH.js
@@ -60,9 +60,21 @@
     /***/ 6007: /***/ function(__unused_webpack_module, exports) {
       "use strict";
 
+      function _instanceof(left, right) {
+        if (
+          right != null &&
+          typeof Symbol !== "undefined" &&
+          right[Symbol.hasInstance]
+        ) {
+          return right[Symbol.hasInstance](left);
+        } else {
+          return left instanceof right;
+        }
+      }
       Object.defineProperty(exports, "__esModule", {
         value: true
       });
+      exports.isEqualNode = isEqualNode;
       exports["default"] = initHeadManager;
       exports.DOMAttributeNames = void 0;
       var DOMAttributeNames = {
@@ -106,6 +118,23 @@
         }
         return el;
       }
+      function isEqualNode(oldTag, newTag) {
+        if (
+          _instanceof(oldTag, HTMLElement) &&
+          _instanceof(newTag, HTMLElement)
+        ) {
+          var nonce = newTag.getAttribute("nonce");
+          // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not
+          // be stripped if there is no content security policy response header that includes a nonce.
+          if (nonce && !oldTag.getAttribute("nonce")) {
+            var cloneTag = newTag.cloneNode(true);
+            cloneTag.setAttribute("nonce", "");
+            cloneTag.nonce = nonce;
+            return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag);
+          }
+        }
+        return oldTag.isEqualNode(newTag);
+      }
       function updateElements(type, components) {
         var headEl = document.getElementsByTagName("head")[0];
         var headCountEl = headEl.querySelector("meta[name=next-head-count]");
@@ -116,7 +145,11 @@
         for (
           var i = 0, j = headCountEl.previousElementSibling;
           i < headCount;
-          i++, j = j.previousElementSibling
+          i++,
+            j =
+              (j === null || j === void 0
+                ? void 0
+                : j.previousElementSibling) || null
         ) {
           var ref;
           if (
@@ -134,7 +167,7 @@
           .filter(function(newTag) {
             for (var k = 0, len = oldTags.length; k < len; k++) {
               var oldTag = oldTags[k];
-              if (oldTag.isEqualNode(newTag)) {
+              if (isEqualNode(oldTag, newTag)) {
                 oldTags.splice(k, 1);
                 return false;
               }
@@ -142,7 +175,10 @@
             return true;
           });
         oldTags.forEach(function(t) {
-          return t.parentNode.removeChild(t);
+          var ref;
+          return (ref = t.parentNode) === null || ref === void 0
+            ? void 0
+            : ref.removeChild(t);
         });
         newTags.forEach(function(t) {
           return headEl.insertBefore(t, headCountEl);
@@ -554,7 +590,7 @@
         document.getElementById("__NEXT_DATA__").textContent
       );
       window.__NEXT_DATA__ = data;
-      var version = "12.0.3";
+      var version = "12.0.4-canary.14";
       exports.version = version;
       var looseToArray = function(input) {
         return [].slice.call(input);
@@ -1867,14 +1903,17 @@
       }
       function RouteAnnouncer() {
         var asPath = (0, _router).useRouter().asPath;
-        var ref = _slicedToArray(_react.default.useState(""), 2),
-          routeAnnouncement = ref[0],
-          setRouteAnnouncement = ref[1];
-        // Only announce the path change, but not for the first load because screen reader will do that automatically.
+        var ref1 = _slicedToArray(_react.default.useState(""), 2),
+          routeAnnouncement = ref1[0],
+          setRouteAnnouncement = ref1[1];
+        // Only announce the path change, but not for the first load because screen
+        // reader will do that automatically.
         var initialPathLoaded = _react.default.useRef(false);
-        // Every time the path changes, announce the route change. The announcement will be prioritized by h1, then title
-        // (from metadata), and finally if those don't exist, then the pathName that is in the URL. This methodology is
-        // inspired by Marcy Sutton's accessible client routing user testing. More information can be found here:
+        // Every time the path changes, announce the new page’s title following this
+        // priority: first the document title (from head), otherwise the first h1, or
+        // if none of these exist, then the pathname from the URL. This methodology is
+        // inspired by Marcy Sutton’s accessible client routing user testing. More
+        // information can be found here:
         // https://www.gatsbyjs.com/blog/2019-07-11-user-testing-accessible-client-routing/
         _react.default.useEffect(
           function() {
@@ -1882,20 +1921,22 @@
               initialPathLoaded.current = true;
               return;
             }
-            var newRouteAnnouncement;
-            var pageHeader = document.querySelector("h1");
-            if (pageHeader) {
-              newRouteAnnouncement =
-                pageHeader.innerText || pageHeader.textContent;
-            }
-            if (!newRouteAnnouncement) {
-              if (document.title) {
-                newRouteAnnouncement = document.title;
-              } else {
-                newRouteAnnouncement = asPath;
-              }
+            if (document.title) {
+              setRouteAnnouncement(document.title);
+            } else {
+              var pageHeader = document.querySelector("h1");
+              var ref;
+              var content =
+                (ref =
+                  pageHeader === null || pageHeader === void 0
+                    ? void 0
+                    : pageHeader.innerText) !== null && ref !== void 0
+                  ? ref
+                  : pageHeader === null || pageHeader === void 0
+                  ? void 0
+                  : pageHeader.textContent;
+              setRouteAnnouncement(content || asPath);
             }
-            setRouteAnnouncement(newRouteAnnouncement);
           },
           [asPath]
         );
@@ -3662,7 +3703,10 @@
         // first item will be empty string from splitting at first char
         var pathnameParts = pathname.split("/");
         (locales || []).some(function(locale) {
-          if (pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
+          if (
+            pathnameParts[1] &&
+            pathnameParts[1].toLowerCase() === locale.toLowerCase()
+          ) {
             detectedLocale = locale;
             pathnameParts.splice(1, 1);
             pathname = pathnameParts.join("/") || "/";
@@ -5694,7 +5738,7 @@
                             case 24:
                               _ctx.next = 26;
                               return this._preflightRequest({
-                                as: asPath,
+                                as: addBasePath(asPath),
                                 cache: true,
                                 pages: pages,
                                 pathname: pathname,
Diff for webpack-HASH.js
@@ -171,7 +171,7 @@
     /******/ // This function allow to reference all chunks
     /******/ __webpack_require__.miniCssF = function(chunkId) {
       /******/ // return url for filenames based on template
-      /******/ return "static/css/" + "7edf9ee7c3885268" + ".css";
+      /******/ return "static/css/" + "94fdbc56eafa2039" + ".css";
       /******/
     };
     /******/
Diff for 7edf9ee7c3885268.css
@@ -1,4 +1,4 @@
-.css_helloWorld__2Fhmt {
+.css_helloWorld__qqNwY {
   color: green;
   background: url(/_next/static/media/nextjs.cae0b805.png);
 }
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-43980cc4f59eb55b.js"
+      src="/_next/static/chunks/webpack-8244d589778df4b1.js"
       defer=""
     ></script>
     <script
@@ -19,7 +19,7 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-eba93c3d9e176de0.js"
+      src="/_next/static/chunks/main-662b275b90f10726.js"
       defer=""
     ></script>
     <script

Please sign in to comment.