next 15.1.2 → 15.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of next might be problematic. Click here for more details.

Files changed (57) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +2 -2
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/type-check.js +5 -4
  5. package/dist/build/type-check.js.map +1 -1
  6. package/dist/build/utils.js +6 -3
  7. package/dist/build/utils.js.map +1 -1
  8. package/dist/build/webpack-config.js +2 -2
  9. package/dist/client/app-bootstrap.js +1 -1
  10. package/dist/client/index.js +1 -1
  11. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  12. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  13. package/dist/esm/build/index.js +2 -2
  14. package/dist/esm/build/swc/index.js +1 -1
  15. package/dist/esm/build/type-check.js +5 -4
  16. package/dist/esm/build/type-check.js.map +1 -1
  17. package/dist/esm/build/utils.js +6 -3
  18. package/dist/esm/build/utils.js.map +1 -1
  19. package/dist/esm/build/webpack-config.js +2 -2
  20. package/dist/esm/client/app-bootstrap.js +1 -1
  21. package/dist/esm/client/index.js +1 -1
  22. package/dist/esm/export/worker.js +2 -1
  23. package/dist/esm/export/worker.js.map +1 -1
  24. package/dist/esm/lib/verifyAndLint.js +4 -3
  25. package/dist/esm/lib/verifyAndLint.js.map +1 -1
  26. package/dist/esm/server/config.js +1 -1
  27. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  28. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  29. package/dist/esm/server/dev/static-paths-worker.js +2 -1
  30. package/dist/esm/server/dev/static-paths-worker.js.map +1 -1
  31. package/dist/esm/server/lib/app-info-log.js +1 -1
  32. package/dist/esm/server/lib/start-server.js +1 -1
  33. package/dist/esm/server/load-components.js +13 -8
  34. package/dist/esm/server/load-components.js.map +1 -1
  35. package/dist/esm/server/next-server.js +11 -5
  36. package/dist/esm/server/next-server.js.map +1 -1
  37. package/dist/export/worker.js +2 -1
  38. package/dist/export/worker.js.map +1 -1
  39. package/dist/lib/verifyAndLint.js +5 -4
  40. package/dist/lib/verifyAndLint.js.map +1 -1
  41. package/dist/server/config.js +1 -1
  42. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  43. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  44. package/dist/server/dev/static-paths-worker.js +2 -1
  45. package/dist/server/dev/static-paths-worker.js.map +1 -1
  46. package/dist/server/lib/app-info-log.js +1 -1
  47. package/dist/server/lib/start-server.js +1 -1
  48. package/dist/server/load-components.d.ts +2 -1
  49. package/dist/server/load-components.js +13 -8
  50. package/dist/server/load-components.js.map +1 -1
  51. package/dist/server/next-server.d.ts +1 -0
  52. package/dist/server/next-server.js +11 -5
  53. package/dist/server/next-server.js.map +1 -1
  54. package/dist/telemetry/anonymous-meta.js +1 -1
  55. package/dist/telemetry/events/session-stopped.js +2 -2
  56. package/dist/telemetry/events/version.js +2 -2
  57. package/package.json +15 -15
package/dist/bin/next CHANGED
@@ -75,7 +75,7 @@ const program = new NextRootCommand();
75
75
  program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
76
76
  formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
77
77
  subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
78
- }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.1.2"}`, '-v, --version', 'Outputs the Next.js version.');
78
+ }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.1.3"}`, '-v, --version', 'Outputs the Next.js version.');
79
79
  program.command('build').description('Creates an optimized production build of your application. The output displays information about each route.').argument('[directory]', `A directory on which to build the application. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).option('-d, --debug', 'Enables a more verbose build output.').option('--no-lint', 'Disables linting.').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').addOption(new _commander.Option('--experimental-turbo').hideHelp()).addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
80
80
  'compile',
81
81
  'generate'
@@ -357,7 +357,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
357
357
  const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
358
358
  buildMode: experimentalBuildMode,
359
359
  isTurboBuild: String(turboNextBuild),
360
- version: "15.1.2"
360
+ version: "15.1.3"
361
361
  });
362
362
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
363
363
  _buildcontext.NextBuildContext.dir = dir;
@@ -695,7 +695,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
695
695
  // Files outside of the distDir can be "type": "module"
696
696
  await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
697
697
  // These are written to distDir, so they need to come after creating and cleaning distDr.
698
- await (0, _builddiagnostics.recordFrameworkVersion)("15.1.2");
698
+ await (0, _builddiagnostics.recordFrameworkVersion)("15.1.3");
699
699
  await (0, _builddiagnostics.updateBuildDiagnostics)({
700
700
  buildStage: 'start'
701
701
  });
@@ -127,7 +127,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
127
127
  }
128
128
  return newObj;
129
129
  }
130
- const nextVersion = "15.1.2";
130
+ const nextVersion = "15.1.3";
131
131
  const ArchName = (0, _os.arch)();
132
132
  const PlatformName = (0, _os.platform)();
133
133
  function infoLog(...args) {
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "startTypeChecking", {
10
10
  });
11
11
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
12
12
  const _log = /*#__PURE__*/ _interop_require_wildcard(require("./output/log"));
13
- const _jestworker = require("next/dist/compiled/jest-worker");
13
+ const _worker = require("../lib/worker");
14
14
  const _verifyAndLint = require("../lib/verifyAndLint");
15
15
  const _spinner = /*#__PURE__*/ _interop_require_default(require("./spinner"));
16
16
  const _events = require("../telemetry/events");
@@ -69,13 +69,14 @@ function _interop_require_wildcard(obj, nodeInterop) {
69
69
  * instead of running "next/lib/typescript/runTypeCheck" in a worker,
70
70
  * we will run entire "next/lib/verify-typescript-setup" in a worker instead.
71
71
  */ function verifyTypeScriptSetup(dir, distDir, intentDirs, typeCheckPreflight, tsconfigPath, disableStaticImages, cacheDir, enableWorkerThreads, hasAppDir, hasPagesDir) {
72
- const typeCheckWorker = new _jestworker.Worker(require.resolve('../lib/verify-typescript-setup'), {
72
+ const typeCheckWorker = new _worker.Worker(require.resolve('../lib/verify-typescript-setup'), {
73
+ exposedMethods: [
74
+ 'verifyTypeScriptSetup'
75
+ ],
73
76
  numWorkers: 1,
74
77
  enableWorkerThreads,
75
78
  maxRetries: 0
76
79
  });
77
- typeCheckWorker.getStdout().pipe(process.stdout);
78
- typeCheckWorker.getStderr().pipe(process.stderr);
79
80
  return typeCheckWorker.verifyTypeScriptSetup({
80
81
  dir,
81
82
  distDir,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/build/type-check.ts"],"sourcesContent":["import type { NextConfigComplete } from '../server/config-shared'\nimport type { Telemetry } from '../telemetry/storage'\nimport type { Span } from '../trace'\n\nimport path from 'path'\nimport * as Log from './output/log'\nimport { Worker as JestWorker } from 'next/dist/compiled/jest-worker'\nimport { verifyAndLint } from '../lib/verifyAndLint'\nimport createSpinner from './spinner'\nimport { eventTypeCheckCompleted } from '../telemetry/events'\nimport isError from '../lib/is-error'\n\n/**\n * typescript will be loaded in \"next/lib/verify-typescript-setup\" and\n * then passed to \"next/lib/typescript/runTypeCheck\" as a parameter.\n *\n * Since it is impossible to pass a function from main thread to a worker,\n * instead of running \"next/lib/typescript/runTypeCheck\" in a worker,\n * we will run entire \"next/lib/verify-typescript-setup\" in a worker instead.\n */\nfunction verifyTypeScriptSetup(\n dir: string,\n distDir: string,\n intentDirs: string[],\n typeCheckPreflight: boolean,\n tsconfigPath: string,\n disableStaticImages: boolean,\n cacheDir: string | undefined,\n enableWorkerThreads: boolean | undefined,\n hasAppDir: boolean,\n hasPagesDir: boolean\n) {\n const typeCheckWorker = new JestWorker(\n require.resolve('../lib/verify-typescript-setup'),\n {\n numWorkers: 1,\n enableWorkerThreads,\n maxRetries: 0,\n }\n ) as JestWorker & {\n verifyTypeScriptSetup: typeof import('../lib/verify-typescript-setup').verifyTypeScriptSetup\n }\n\n typeCheckWorker.getStdout().pipe(process.stdout)\n typeCheckWorker.getStderr().pipe(process.stderr)\n\n return typeCheckWorker\n .verifyTypeScriptSetup({\n dir,\n distDir,\n intentDirs,\n typeCheckPreflight,\n tsconfigPath,\n disableStaticImages,\n cacheDir,\n hasAppDir,\n hasPagesDir,\n })\n .then((result) => {\n typeCheckWorker.end()\n return result\n })\n .catch(() => {\n // The error is already logged in the worker, we simply exit the main thread to prevent the\n // `Jest worker encountered 1 child process exceptions, exceeding retry limit` from showing up\n process.exit(1)\n })\n}\n\nexport async function startTypeChecking({\n cacheDir,\n config,\n dir,\n ignoreESLint,\n nextBuildSpan,\n pagesDir,\n runLint,\n shouldLint,\n telemetry,\n appDir,\n}: {\n cacheDir: string\n config: NextConfigComplete\n dir: string\n ignoreESLint: boolean\n nextBuildSpan: Span\n pagesDir?: string\n runLint: boolean\n shouldLint: boolean\n telemetry: Telemetry\n appDir?: string\n}) {\n const ignoreTypeScriptErrors = Boolean(config.typescript.ignoreBuildErrors)\n\n const eslintCacheDir = path.join(cacheDir, 'eslint/')\n\n if (ignoreTypeScriptErrors) {\n Log.info('Skipping validation of types')\n }\n if (runLint && ignoreESLint) {\n // only print log when build require lint while ignoreESLint is enabled\n Log.info('Skipping linting')\n }\n\n let typeCheckingAndLintingSpinnerPrefixText: string | undefined\n let typeCheckingAndLintingSpinner:\n | ReturnType<typeof createSpinner>\n | undefined\n\n if (!ignoreTypeScriptErrors && shouldLint) {\n typeCheckingAndLintingSpinnerPrefixText =\n 'Linting and checking validity of types'\n } else if (!ignoreTypeScriptErrors) {\n typeCheckingAndLintingSpinnerPrefixText = 'Checking validity of types'\n } else if (shouldLint) {\n typeCheckingAndLintingSpinnerPrefixText = 'Linting'\n }\n\n // we will not create a spinner if both ignoreTypeScriptErrors and ignoreESLint are\n // enabled, but we will still verifying project's tsconfig and dependencies.\n if (typeCheckingAndLintingSpinnerPrefixText) {\n typeCheckingAndLintingSpinner = createSpinner(\n typeCheckingAndLintingSpinnerPrefixText\n )\n }\n\n const typeCheckStart = process.hrtime()\n\n try {\n const [[verifyResult, typeCheckEnd]] = await Promise.all([\n nextBuildSpan.traceChild('verify-typescript-setup').traceAsyncFn(() =>\n verifyTypeScriptSetup(\n dir,\n config.distDir,\n [pagesDir, appDir].filter(Boolean) as string[],\n !ignoreTypeScriptErrors,\n config.typescript.tsconfigPath,\n config.images.disableStaticImages,\n cacheDir,\n config.experimental.workerThreads,\n !!appDir,\n !!pagesDir\n ).then((resolved) => {\n const checkEnd = process.hrtime(typeCheckStart)\n return [resolved, checkEnd] as const\n })\n ),\n shouldLint &&\n nextBuildSpan.traceChild('verify-and-lint').traceAsyncFn(async () => {\n await verifyAndLint(\n dir,\n eslintCacheDir,\n config.eslint?.dirs,\n config.experimental.workerThreads,\n telemetry\n )\n }),\n ])\n typeCheckingAndLintingSpinner?.stopAndPersist()\n\n if (!ignoreTypeScriptErrors && verifyResult) {\n telemetry.record(\n eventTypeCheckCompleted({\n durationInSeconds: typeCheckEnd[0],\n typescriptVersion: verifyResult.version,\n inputFilesCount: verifyResult.result?.inputFilesCount,\n totalFilesCount: verifyResult.result?.totalFilesCount,\n incremental: verifyResult.result?.incremental,\n })\n )\n }\n } catch (err) {\n // prevent showing jest-worker internal error as it\n // isn't helpful for users and clutters output\n if (isError(err) && err.message === 'Call retries were exceeded') {\n await telemetry.flush()\n process.exit(1)\n }\n throw err\n }\n}\n"],"names":["startTypeChecking","verifyTypeScriptSetup","dir","distDir","intentDirs","typeCheckPreflight","tsconfigPath","disableStaticImages","cacheDir","enableWorkerThreads","hasAppDir","hasPagesDir","typeCheckWorker","JestWorker","require","resolve","numWorkers","maxRetries","getStdout","pipe","process","stdout","getStderr","stderr","then","result","end","catch","exit","config","ignoreESLint","nextBuildSpan","pagesDir","runLint","shouldLint","telemetry","appDir","ignoreTypeScriptErrors","Boolean","typescript","ignoreBuildErrors","eslintCacheDir","path","join","Log","info","typeCheckingAndLintingSpinnerPrefixText","typeCheckingAndLintingSpinner","createSpinner","typeCheckStart","hrtime","verifyResult","typeCheckEnd","Promise","all","traceChild","traceAsyncFn","filter","images","experimental","workerThreads","resolved","checkEnd","verifyAndLint","eslint","dirs","stopAndPersist","record","eventTypeCheckCompleted","durationInSeconds","typescriptVersion","version","inputFilesCount","totalFilesCount","incremental","err","isError","message","flush"],"mappings":";;;;+BAqEsBA;;;eAAAA;;;6DAjEL;6DACI;4BACgB;+BACP;gEACJ;wBACc;gEACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpB;;;;;;;CAOC,GACD,SAASC,sBACPC,GAAW,EACXC,OAAe,EACfC,UAAoB,EACpBC,kBAA2B,EAC3BC,YAAoB,EACpBC,mBAA4B,EAC5BC,QAA4B,EAC5BC,mBAAwC,EACxCC,SAAkB,EAClBC,WAAoB;IAEpB,MAAMC,kBAAkB,IAAIC,kBAAU,CACpCC,QAAQC,OAAO,CAAC,mCAChB;QACEC,YAAY;QACZP;QACAQ,YAAY;IACd;IAKFL,gBAAgBM,SAAS,GAAGC,IAAI,CAACC,QAAQC,MAAM;IAC/CT,gBAAgBU,SAAS,GAAGH,IAAI,CAACC,QAAQG,MAAM;IAE/C,OAAOX,gBACJX,qBAAqB,CAAC;QACrBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAE;QACAC;IACF,GACCa,IAAI,CAAC,CAACC;QACLb,gBAAgBc,GAAG;QACnB,OAAOD;IACT,GACCE,KAAK,CAAC;QACL,2FAA2F;QAC3F,8FAA8F;QAC9FP,QAAQQ,IAAI,CAAC;IACf;AACJ;AAEO,e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UAAU,CAAC,mBAAmBC,YAAY,CAAC;oBAIrD3B;gBAHF,MAAMkC,IAAAA,4BAAa,EACjB7D,KACAuC,iBACAZ,iBAAAA,OAAOmC,MAAM,qBAAbnC,eAAeoC,IAAI,EACnBpC,OAAO8B,YAAY,CAACC,aAAa,EACjCzB;YAEJ;SACH;QACDY,iDAAAA,8BAA+BmB,cAAc;QAE7C,IAAI,CAAC7B,0BAA0Bc,cAAc;gBAKtBA,sBACAA,uBACJA;YANjBhB,UAAUgC,MAAM,CACdC,IAAAA,+BAAuB,EAAC;gBACtBC,mBAAmBjB,YAAY,CAAC,EAAE;gBAClCkB,mBAAmBnB,aAAaoB,OAAO;gBACvCC,eAAe,GAAErB,uBAAAA,aAAa1B,MAAM,qBAAnB0B,qBAAqBqB,eAAe;gBACrDC,eAAe,GAAEtB,wBAAAA,aAAa1B,MAAM,qBAAnB0B,sBAAqBsB,eAAe;gBACrDC,WAAW,GAAEvB,wBAAAA,aAAa1B,MAAM,qBAAnB0B,sBAAqBuB,WAAW;YAC/C;QAEJ;IACF,EAAE,OAAOC,KAAK;QACZ,mDAAmD;QACnD,8CAA8C;QAC9C,IAAIC,IAAAA,gBAAO,EAACD,QAAQA,IAAIE,OAAO,KAAK,8BAA8B;YAChE,MAAM1C,UAAU2C,KAAK;YACrB1D,QAAQQ,IAAI,CAAC;QACf;QACA,MAAM+C;IACR;AACF"}
1
+ {"version":3,"sources":["../../src/build/type-check.ts"],"sourcesContent":["import type { NextConfigComplete } from '../server/config-shared'\nimport type { Telemetry } from '../telemetry/storage'\nimport type { Span } from '../trace'\n\nimport path from 'path'\nimport * as Log from './output/log'\nimport { Worker } from '../lib/worker'\nimport { verifyAndLint } from '../lib/verifyAndLint'\nimport createSpinner from './spinner'\nimport { eventTypeCheckCompleted } from '../telemetry/events'\nimport isError from '../lib/is-error'\n\n/**\n * typescript will be loaded in \"next/lib/verify-typescript-setup\" and\n * then passed to \"next/lib/typescript/runTypeCheck\" as a parameter.\n *\n * Since it is impossible to pass a function from main thread to a worker,\n * instead of running \"next/lib/typescript/runTypeCheck\" in a worker,\n * we will run entire \"next/lib/verify-typescript-setup\" in a worker instead.\n */\nfunction verifyTypeScriptSetup(\n dir: string,\n distDir: string,\n intentDirs: string[],\n typeCheckPreflight: boolean,\n tsconfigPath: string,\n disableStaticImages: boolean,\n cacheDir: string | undefined,\n enableWorkerThreads: boolean | undefined,\n hasAppDir: boolean,\n hasPagesDir: boolean\n) {\n const typeCheckWorker = new Worker(\n require.resolve('../lib/verify-typescript-setup'),\n {\n exposedMethods: ['verifyTypeScriptSetup'],\n numWorkers: 1,\n enableWorkerThreads,\n maxRetries: 0,\n }\n ) as Worker & {\n verifyTypeScriptSetup: typeof import('../lib/verify-typescript-setup').verifyTypeScriptSetup\n }\n\n return typeCheckWorker\n .verifyTypeScriptSetup({\n dir,\n distDir,\n intentDirs,\n typeCheckPreflight,\n tsconfigPath,\n disableStaticImages,\n cacheDir,\n hasAppDir,\n hasPagesDir,\n })\n .then((result) => {\n typeCheckWorker.end()\n return result\n })\n .catch(() => {\n // The error is already logged in the worker, we simply exit the main thread to prevent the\n // `Jest worker encountered 1 child process exceptions, exceeding retry limit` from showing up\n process.exit(1)\n })\n}\n\nexport async function startTypeChecking({\n cacheDir,\n config,\n dir,\n ignoreESLint,\n nextBuildSpan,\n pagesDir,\n runLint,\n shouldLint,\n telemetry,\n appDir,\n}: {\n cacheDir: string\n config: NextConfigComplete\n dir: string\n ignoreESLint: boolean\n nextBuildSpan: Span\n pagesDir?: string\n runLint: boolean\n shouldLint: boolean\n telemetry: Telemetry\n appDir?: string\n}) {\n const ignoreTypeScriptErrors = Boolean(config.typescript.ignoreBuildErrors)\n\n const eslintCacheDir = path.join(cacheDir, 'eslint/')\n\n if (ignoreTypeScriptErrors) {\n Log.info('Skipping validation of types')\n }\n if (runLint && ignoreESLint) {\n // only print log when build require lint while ignoreESLint is enabled\n Log.info('Skipping linting')\n }\n\n let typeCheckingAndLintingSpinnerPrefixText: string | undefined\n let typeCheckingAndLintingSpinner:\n | ReturnType<typeof createSpinner>\n | undefined\n\n if (!ignoreTypeScriptErrors && shouldLint) {\n typeCheckingAndLintingSpinnerPrefixText =\n 'Linting and checking validity of types'\n } else if (!ignoreTypeScriptErrors) {\n typeCheckingAndLintingSpinnerPrefixText = 'Checking validity of types'\n } else if (shouldLint) {\n typeCheckingAndLintingSpinnerPrefixText = 'Linting'\n }\n\n // we will not create a spinner if both ignoreTypeScriptErrors and ignoreESLint are\n // enabled, but we will still verifying project's tsconfig and dependencies.\n if (typeCheckingAndLintingSpinnerPrefixText) {\n typeCheckingAndLintingSpinner = createSpinner(\n typeCheckingAndLintingSpinnerPrefixText\n )\n }\n\n const typeCheckStart = process.hrtime()\n\n try {\n const [[verifyResult, typeCheckEnd]] = await Promise.all([\n nextBuildSpan.traceChild('verify-typescript-setup').traceAsyncFn(() =>\n verifyTypeScriptSetup(\n dir,\n config.distDir,\n [pagesDir, appDir].filter(Boolean) as string[],\n !ignoreTypeScriptErrors,\n config.typescript.tsconfigPath,\n config.images.disableStaticImages,\n cacheDir,\n config.experimental.workerThreads,\n !!appDir,\n !!pagesDir\n ).then((resolved) => {\n const checkEnd = process.hrtime(typeCheckStart)\n return [resolved, checkEnd] as const\n })\n ),\n shouldLint &&\n nextBuildSpan.traceChild('verify-and-lint').traceAsyncFn(async () => {\n await verifyAndLint(\n dir,\n eslintCacheDir,\n config.eslint?.dirs,\n config.experimental.workerThreads,\n telemetry\n )\n }),\n ])\n typeCheckingAndLintingSpinner?.stopAndPersist()\n\n if (!ignoreTypeScriptErrors && verifyResult) {\n telemetry.record(\n eventTypeCheckCompleted({\n durationInSeconds: typeCheckEnd[0],\n typescriptVersion: verifyResult.version,\n inputFilesCount: verifyResult.result?.inputFilesCount,\n totalFilesCount: verifyResult.result?.totalFilesCount,\n incremental: verifyResult.result?.incremental,\n })\n )\n }\n } catch (err) {\n // prevent showing jest-worker internal error as it\n // isn't helpful for users and clutters output\n if (isError(err) && err.message === 'Call retries were exceeded') {\n await telemetry.flush()\n process.exit(1)\n }\n throw err\n }\n}\n"],"names":["startTypeChecking","verifyTypeScriptSetup","dir","distDir","intentDirs","typeCheckPreflight","tsconfigPath","disableStaticImages","cacheDir","enableWorkerThreads","hasAppDir","hasPagesDir","typeCheckWorker","Worker","require","resolve","exposedMethods","numWorkers","maxRetries","then","result","end","catch","process","exit","config","ignoreESLint","nextBuildSpan","pagesDir","runLint","shouldLint","telemetry","appDir","ignoreTypeScriptErrors","Boolean","typescript","ignoreBuildErrors","eslintCacheDir","path","join","Log","info","typeCheckingAndLintingSpinnerPrefixText","typeCheckingAndLintingSpinner","createSpinner","typeCheckStart","hrtime","verifyResult","typeCheckEnd","Promise","all","traceChild","traceAsyncFn","filter","images","experimental","workerThreads","resolved","checkEnd","verifyAndLint","eslint","dirs","stopAndPersist","record","eventTypeCheckCompleted","durationInSeconds","typescriptVersion","version","inputFilesCount","totalFilesCount","incremental","err","isError","message","flush"],"mappings":";;;;+BAmEsBA;;;eAAAA;;;6DA/DL;6DACI;wBACE;+BACO;gEACJ;wBACc;gEACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpB;;;;;;;CAOC,GACD,SAASC,sBACPC,GAAW,EACXC,OAAe,EACfC,UAAoB,EACpBC,kBAA2B,EAC3BC,YAAoB,EACpBC,mBAA4B,EAC5BC,QAA4B,EAC5BC,mBAAwC,EACxCC,SAAkB,EAClBC,WAAoB;IAEpB,MAAMC,kBAAkB,IAAIC,cAAM,CAChCC,QAAQC,OAAO,CAAC,mCAChB;QACEC,gBAAgB;YAAC;SAAwB;QACzCC,YAAY;QACZR;QACAS,YAAY;IACd;IAKF,OAAON,gBACJX,qBAAqB,CAAC;QACrBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAE;QACAC;IACF,GACCQ,IAAI,CAAC,CAACC;QACLR,gBAAgBS,GAAG;QACnB,OAAOD;IACT,GACCE,KAAK,CAAC;QACL,2FA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AChC,OAAO;wBAACY;wBAAUC;qBAAS;gBAC7B;YAEF5B,cACEH,cAAcwB,UAAU,CAAC,mBAAmBC,YAAY,CAAC;oBAIrD3B;gBAHF,MAAMkC,IAAAA,4BAAa,EACjBzD,KACAmC,iBACAZ,iBAAAA,OAAOmC,MAAM,qBAAbnC,eAAeoC,IAAI,EACnBpC,OAAO8B,YAAY,CAACC,aAAa,EACjCzB;YAEJ;SACH;QACDY,iDAAAA,8BAA+BmB,cAAc;QAE7C,IAAI,CAAC7B,0BAA0Bc,cAAc;gBAKtBA,sBACAA,uBACJA;YANjBhB,UAAUgC,MAAM,CACdC,IAAAA,+BAAuB,EAAC;gBACtBC,mBAAmBjB,YAAY,CAAC,EAAE;gBAClCkB,mBAAmBnB,aAAaoB,OAAO;gBACvCC,eAAe,GAAErB,uBAAAA,aAAa3B,MAAM,qBAAnB2B,qBAAqBqB,eAAe;gBACrDC,eAAe,GAAEtB,wBAAAA,aAAa3B,MAAM,qBAAnB2B,sBAAqBsB,eAAe;gBACrDC,WAAW,GAAEvB,wBAAAA,aAAa3B,MAAM,qBAAnB2B,sBAAqBuB,WAAW;YAC/C;QAEJ;IACF,EAAE,OAAOC,KAAK;QACZ,mDAAmD;QACnD,8CAA8C;QAC9C,IAAIC,IAAAA,gBAAO,EAACD,QAAQA,IAAIE,OAAO,KAAK,8BAA8B;YAChE,MAAM1C,UAAU2C,KAAK;YACrBnD,QAAQC,IAAI,CAAC;QACf;QACA,MAAM+C;IACR;AACF"}
@@ -1126,7 +1126,8 @@ async function isPageStatic({ dir, page, distDir, configFileName, runtimeEnvConf
1126
1126
  componentsResult = await (0, _loadcomponents.loadComponents)({
1127
1127
  distDir,
1128
1128
  page: originalAppPath || page,
1129
- isAppPath: pageType === 'app'
1129
+ isAppPath: pageType === 'app',
1130
+ isDev: false
1130
1131
  });
1131
1132
  }
1132
1133
  const Comp = componentsResult.Component;
@@ -1291,7 +1292,8 @@ async function hasCustomGetInitialProps({ page, distDir, runtimeEnvConfig, check
1291
1292
  const components = await (0, _loadcomponents.loadComponents)({
1292
1293
  distDir,
1293
1294
  page: page,
1294
- isAppPath: false
1295
+ isAppPath: false,
1296
+ isDev: false
1295
1297
  });
1296
1298
  let mod = components.ComponentMod;
1297
1299
  if (checkingApp) {
@@ -1307,7 +1309,8 @@ async function getDefinedNamedExports({ page, distDir, runtimeEnvConfig }) {
1307
1309
  const components = await (0, _loadcomponents.loadComponents)({
1308
1310
  distDir,
1309
1311
  page: page,
1310
- isAppPath: false
1312
+ isAppPath: false,
1313
+ isDev: false
1311
1314
  });
1312
1315
  return Object.keys(components.ComponentMod).filter((key)=>{
1313
1316
  return typeof components.ComponentMod[key] !== 'undefined';