Skip to content

Commit 7b17151

Browse files
committed
use .next dist to properly test next-on-netlify
1 parent 157619c commit 7b17151

File tree

104 files changed

+24112
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+24112
-28
lines changed

test/fixtures/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.next

test/fixtures/.next/BUILD_ID

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lQzbZpujXJtqiMXAeuORY
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"polyfillFiles": [
3+
"static/chunks/polyfills-36bde18dcfde0c144be5.js"
4+
],
5+
"devFiles": [],
6+
"ampDevFiles": [],
7+
"lowPriorityFiles": [
8+
"static/lQzbZpujXJtqiMXAeuORY/_buildManifest.js",
9+
"static/lQzbZpujXJtqiMXAeuORY/_ssgManifest.js"
10+
],
11+
"pages": {
12+
"/": [
13+
"static/chunks/main-636401514c82a6b87008.js",
14+
"static/chunks/webpack-e067438c4cf4ef2ef178.js",
15+
"static/chunks/framework.9116e7bff2bfccdffa19.js",
16+
"static/css/c50ddf22b716c7b6b76d.css",
17+
"static/chunks/pages/index-071b8dd1801c570106f0.js"
18+
],
19+
"/_app": [
20+
"static/chunks/main-636401514c82a6b87008.js",
21+
"static/chunks/webpack-e067438c4cf4ef2ef178.js",
22+
"static/chunks/framework.9116e7bff2bfccdffa19.js",
23+
"static/chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.0d390002b679b0003559.js",
24+
"static/css/6e9ef204d6fd7ac61493.css",
25+
"static/chunks/pages/_app-90fcc616c99a45ea1d34.js"
26+
],
27+
"/_error": [
28+
"static/chunks/main-636401514c82a6b87008.js",
29+
"static/chunks/webpack-e067438c4cf4ef2ef178.js",
30+
"static/chunks/framework.9116e7bff2bfccdffa19.js",
31+
"static/chunks/pages/_error-4f026761014494626b1e.js"
32+
]
33+
},
34+
"ampFirstPages": []
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.removePathTrailingSlash = removePathTrailingSlash;\nexports.normalizePathTrailingSlash = void 0;\n/**\n* Removes the trailing slash of a path if there is one. Preserves the root path `/`.\n*/\n\nfunction removePathTrailingSlash(path) {\n return path.endsWith('/') && path !== '/' ? path.slice(0, -1) : path;\n}\n/**\n* Normalizes the trailing slash of a path according to the `trailingSlash` option\n* in `next.config.js`.\n*/\n\n\nvar normalizePathTrailingSlash = process.env.__NEXT_TRAILING_SLASH ? function (path) {\n if (/\\.[^/]+\\/?$/.test(path)) {\n return removePathTrailingSlash(path);\n } else if (path.endsWith('/')) {\n return path;\n } else {\n return path + '/';\n }\n} : removePathTrailingSlash;\nexports.normalizePathTrailingSlash = normalizePathTrailingSlash;","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.RouterContext = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nvar RouterContext = /*#__PURE__*/_react[\"default\"].createContext(null);\n\nexports.RouterContext = RouterContext;\n\nif (false) {\n RouterContext.displayName = 'RouterContext';\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.isInAmpMode = isInAmpMode;\nexports.useAmp = useAmp;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _ampContext = require(\"./amp-context\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nfunction isInAmpMode() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$ampFirst = _ref.ampFirst,\n ampFirst = _ref$ampFirst === void 0 ? false : _ref$ampFirst,\n _ref$hybrid = _ref.hybrid,\n hybrid = _ref$hybrid === void 0 ? false : _ref$hybrid,\n _ref$hasQuery = _ref.hasQuery,\n hasQuery = _ref$hasQuery === void 0 ? false : _ref$hasQuery;\n\n return ampFirst || hybrid && hasQuery;\n}\n\nfunction useAmp() {\n // Don't assign the context value to a variable to save bytes\n return isInAmpMode(_react[\"default\"].useContext(_ampContext.AmpStateContext));\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.default = mitt;\n/*\nMIT License\nCopyright (c) Jason Miller (https://jasonformat.com/)\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n// This file is based on https://github.com/developit/mitt/blob/v1.1.3/src/index.js\n// It's been edited for the needs of this script\n// See the LICENSE at the top of the file\n\nfunction mitt() {\n const all = Object.create(null);\n return {\n on(type, handler) {\n ;\n (all[type] || (all[type] = [])).push(handler);\n },\n\n off(type, handler) {\n if (all[type]) {\n all[type].splice(all[type].indexOf(handler) >>> 0, 1);\n }\n },\n\n emit(type, ...evts) {\n // eslint-disable-next-line array-callback-return\n ;\n (all[type] || []).slice().map(handler => {\n handler(...evts);\n });\n }\n\n };\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.RouterContext = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nconst RouterContext = /*#__PURE__*/_react.default.createContext(null);\n\nexports.RouterContext = RouterContext;\n\nif (false) {\n RouterContext.displayName = 'RouterContext';\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports[\"default\"] = withRouter;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"./router\");\n\nfunction withRouter(ComposedComponent) {\n function WithRouterWrapper(props) {\n return /*#__PURE__*/_react[\"default\"].createElement(ComposedComponent, Object.assign({\n router: (0, _router.useRouter)()\n }, props));\n }\n\n WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps // This is needed to allow checking for custom getInitialProps in _app\n ;\n WithRouterWrapper.origGetInitialProps = ComposedComponent.origGetInitialProps;\n\n if (false) {\n var name = ComposedComponent.displayName || ComposedComponent.name || 'Unknown';\n WithRouterWrapper.displayName = \"withRouter(\".concat(name, \")\");\n }\n\n return WithRouterWrapper;\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.getRouteRegex = getRouteRegex; // this isn't importing the escape-string-regex module\n// to reduce bytes\n\nfunction escapeRegex(str) {\n return str.replace(/[|\\\\{}()[\\]^$+*?.-]/g, '\\\\$&');\n}\n\nfunction parseParameter(param) {\n var optional = param.startsWith('[') && param.endsWith(']');\n\n if (optional) {\n param = param.slice(1, -1);\n }\n\n var repeat = param.startsWith('...');\n\n if (repeat) {\n param = param.slice(3);\n }\n\n return {\n key: param,\n repeat: repeat,\n optional: optional\n };\n}\n\nfunction getRouteRegex(normalizedRoute) {\n var segments = (normalizedRoute.replace(/\\/$/, '') || '/').slice(1).split('/');\n var groups = {};\n var groupIndex = 1;\n var parameterizedRoute = segments.map(function (segment) {\n if (segment.startsWith('[') && segment.endsWith(']')) {\n var _parseParameter = parseParameter(segment.slice(1, -1)),\n key = _parseParameter.key,\n optional = _parseParameter.optional,\n repeat = _parseParameter.repeat;\n\n groups[key] = {\n pos: groupIndex++,\n repeat: repeat,\n optional: optional\n };\n return repeat ? optional ? '(?:/(.+?))?' : '/(.+?)' : '/([^/]+?)';\n } else {\n return \"/\".concat(escapeRegex(segment));\n }\n }).join(''); // dead code eliminate for browser since it's only needed\n // while generating routes-manifest\n\n if (false) {\n var routeKeyCharCode = 97;\n var routeKeyCharLength = 1; // builds a minimal routeKey using only a-z and minimal number of characters\n\n var getSafeRouteKey = function getSafeRouteKey() {\n var routeKey = '';\n\n for (var i = 0; i < routeKeyCharLength; i++) {\n routeKey += String.fromCharCode(routeKeyCharCode);\n routeKeyCharCode++;\n\n if (routeKeyCharCode > 122) {\n routeKeyCharLength++;\n routeKeyCharCode = 97;\n }\n }\n\n return routeKey;\n };\n\n var routeKeys = {};\n var namedParameterizedRoute = segments.map(function (segment) {\n if (segment.startsWith('[') && segment.endsWith(']')) {\n var _parseParameter2 = parseParameter(segment.slice(1, -1)),\n key = _parseParameter2.key,\n optional = _parseParameter2.optional,\n repeat = _parseParameter2.repeat; // replace any non-word characters since they can break\n // the named regex\n\n\n var cleanedKey = key.replace(/\\W/g, '');\n var invalidKey = false; // check if the key is still invalid and fallback to using a known\n // safe key\n\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true;\n }\n\n if (!isNaN(parseInt(cleanedKey.substr(0, 1)))) {\n invalidKey = true;\n }\n\n if (invalidKey) {\n cleanedKey = getSafeRouteKey();\n }\n\n routeKeys[cleanedKey] = key;\n return repeat ? optional ? \"(?:/(?<\".concat(cleanedKey, \">.+?))?\") : \"/(?<\".concat(cleanedKey, \">.+?)\") : \"/(?<\".concat(cleanedKey, \">[^/]+?)\");\n } else {\n return \"/\".concat(escapeRegex(segment));\n }\n }).join('');\n return {\n re: new RegExp(\"^\".concat(parameterizedRoute, \"(?:/)?$\")),\n groups: groups,\n routeKeys: routeKeys,\n namedRegex: \"^\".concat(namedParameterizedRoute, \"(?:/)?$\")\n };\n }\n\n return {\n re: new RegExp(\"^\".concat(parameterizedRoute, \"(?:/)?$\")),\n groups: groups\n };\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"// Next.js API route support: https://nextjs.org/docs/api-routes/introduction\nexport default ((req, res) => {\n res.statusCode = 200;\n res.json({\n name: 'John Doe'\n });\n});","map":null,"metadata":{},"sourceType":"module"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.parseRelativeUrl = parseRelativeUrl;\n\nvar _utils = require(\"../../utils\");\n\nvar _querystring = require(\"./querystring\");\n/**\n* Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n* (e.g. `./hello`) then at least base must be.\n* Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n* the current origin will be parsed as relative\n*/\n\n\nfunction parseRelativeUrl(url, base) {\n var globalBase = new URL(false ? 'http://n' : (0, _utils.getLocationOrigin)());\n var resolvedBase = base ? new URL(base, globalBase) : globalBase;\n\n var _URL = new URL(url, resolvedBase),\n pathname = _URL.pathname,\n searchParams = _URL.searchParams,\n search = _URL.search,\n hash = _URL.hash,\n href = _URL.href,\n origin = _URL.origin;\n\n if (origin !== globalBase.origin) {\n throw new Error('invariant: invalid relative URL');\n }\n\n return {\n pathname: pathname,\n query: (0, _querystring.searchParamsToUrlQuery)(searchParams),\n search: search,\n hash: hash,\n href: href.slice(globalBase.origin.length)\n };\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.formatUrl = formatUrl;\n\nvar querystring = _interopRequireWildcard(require(\"./querystring\"));\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n} // Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nvar slashedProtocols = /https?|ftp|gopher|file/;\n\nfunction formatUrl(urlObj) {\n var auth = urlObj.auth,\n hostname = urlObj.hostname;\n var protocol = urlObj.protocol || '';\n var pathname = urlObj.pathname || '';\n var hash = urlObj.hash || '';\n var query = urlObj.query || '';\n var host = false;\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';\n\n if (urlObj.host) {\n host = auth + urlObj.host;\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? \"[\".concat(hostname, \"]\") : hostname);\n\n if (urlObj.port) {\n host += ':' + urlObj.port;\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query));\n }\n\n var search = urlObj.search || query && \"?\".concat(query) || '';\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash;\n if (search && search[0] !== '?') search = '?' + search;\n pathname = pathname.replace(/[?#]/g, encodeURIComponent);\n search = search.replace('#', '%23');\n return \"\".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash);\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = escapePathDelimiters; // escape delimiters used by path-to-regexp\n\nfunction escapePathDelimiters(segment) {\n return segment.replace(/[/#?]/g, function (_char) {\n return encodeURIComponent(_char);\n });\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.searchParamsToUrlQuery = searchParamsToUrlQuery;\nexports.urlQueryToSearchParams = urlQueryToSearchParams;\nexports.assign = assign;\n\nfunction searchParamsToUrlQuery(searchParams) {\n const query = {};\n searchParams.forEach((value, key) => {\n if (typeof query[key] === 'undefined') {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n ;\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n });\n return query;\n}\n\nfunction stringifyUrlQueryParam(param) {\n if (typeof param === 'string' || typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') {\n return String(param);\n } else {\n return '';\n }\n}\n\nfunction urlQueryToSearchParams(urlQuery) {\n const result = new URLSearchParams();\n Object.entries(urlQuery).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n value.forEach(item => result.append(key, stringifyUrlQueryParam(item)));\n } else {\n result.set(key, stringifyUrlQueryParam(value));\n }\n });\n return result;\n}\n\nfunction assign(target, ...searchParamsList) {\n searchParamsList.forEach(searchParams => {\n Array.from(searchParams.keys()).forEach(key => target.delete(key));\n searchParams.forEach((value, key) => target.append(key, value));\n });\n return target;\n}","map":null,"metadata":{},"sourceType":"script"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ast":null,"code":"import { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport '../styles/globals.css';\n\nfunction MyApp({\n Component,\n pageProps\n}) {\n return /*#__PURE__*/_jsx(Component, _objectSpread({}, pageProps));\n}\n\nexport default MyApp;","map":null,"metadata":{},"sourceType":"module"}

0 commit comments

Comments
 (0)