next 15.2.0-canary.26 → 15.2.0-canary.27

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 (47) 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/webpack/plugins/eval-source-map-dev-tool-plugin.js +0 -1
  5. package/dist/build/webpack/plugins/eval-source-map-dev-tool-plugin.js.map +1 -1
  6. package/dist/build/webpack-config.js +2 -2
  7. package/dist/client/app-bootstrap.js +1 -1
  8. package/dist/client/index.js +1 -1
  9. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +9 -9
  10. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
  11. package/dist/compiled/next-server/app-page.runtime.dev.js +9 -9
  12. package/dist/compiled/next-server/app-page.runtime.dev.js.map +1 -1
  13. package/dist/compiled/next-server/app-route-experimental.runtime.dev.js +3 -3
  14. package/dist/compiled/next-server/app-route-experimental.runtime.dev.js.map +1 -1
  15. package/dist/compiled/next-server/app-route.runtime.dev.js +3 -3
  16. package/dist/compiled/next-server/app-route.runtime.dev.js.map +1 -1
  17. package/dist/compiled/next-server/dist_client_dev_noop-turbopack-hmr_js-experimental.runtime.dev.js +1 -1
  18. package/dist/compiled/next-server/dist_client_dev_noop-turbopack-hmr_js-experimental.runtime.dev.js.map +1 -1
  19. package/dist/compiled/next-server/dist_client_dev_noop-turbopack-hmr_js.runtime.dev.js +1 -1
  20. package/dist/compiled/next-server/dist_client_dev_noop-turbopack-hmr_js.runtime.dev.js.map +1 -1
  21. package/dist/compiled/next-server/pages-api.runtime.dev.js +2 -2
  22. package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
  23. package/dist/compiled/next-server/pages.runtime.dev.js +18 -18
  24. package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
  25. package/dist/compiled/next-server/pages.runtime.prod.js +2 -2
  26. package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
  27. package/dist/esm/build/index.js +2 -2
  28. package/dist/esm/build/swc/index.js +1 -1
  29. package/dist/esm/build/webpack/plugins/eval-source-map-dev-tool-plugin.js +0 -1
  30. package/dist/esm/build/webpack/plugins/eval-source-map-dev-tool-plugin.js.map +1 -1
  31. package/dist/esm/build/webpack-config.js +2 -2
  32. package/dist/esm/client/app-bootstrap.js +1 -1
  33. package/dist/esm/client/index.js +1 -1
  34. package/dist/esm/server/config.js +1 -1
  35. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  36. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  37. package/dist/esm/server/lib/app-info-log.js +1 -1
  38. package/dist/esm/server/lib/start-server.js +1 -1
  39. package/dist/server/config.js +1 -1
  40. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  41. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  42. package/dist/server/lib/app-info-log.js +1 -1
  43. package/dist/server/lib/start-server.js +1 -1
  44. package/dist/telemetry/anonymous-meta.js +1 -1
  45. package/dist/telemetry/events/session-stopped.js +2 -2
  46. package/dist/telemetry/events/version.js +2 -2
  47. package/package.json +16 -16
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.2.0-canary.26"}`, '-v, --version', 'Outputs the Next.js version.');
78
+ }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.2.0-canary.27"}`, '-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'
@@ -362,7 +362,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
362
362
  const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
363
363
  buildMode: experimentalBuildMode,
364
364
  isTurboBuild: String(turboNextBuild),
365
- version: "15.2.0-canary.26"
365
+ version: "15.2.0-canary.27"
366
366
  });
367
367
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
368
368
  _buildcontext.NextBuildContext.dir = dir;
@@ -722,7 +722,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
722
722
  // Files outside of the distDir can be "type": "module"
723
723
  await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
724
724
  // These are written to distDir, so they need to come after creating and cleaning distDr.
725
- await (0, _builddiagnostics.recordFrameworkVersion)("15.2.0-canary.26");
725
+ await (0, _builddiagnostics.recordFrameworkVersion)("15.2.0-canary.27");
726
726
  await (0, _builddiagnostics.updateBuildDiagnostics)({
727
727
  buildStage: 'start'
728
728
  });
@@ -119,7 +119,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
119
119
  }
120
120
  return newObj;
121
121
  }
122
- const nextVersion = "15.2.0-canary.26";
122
+ const nextVersion = "15.2.0-canary.27";
123
123
  const ArchName = (0, _os.arch)();
124
124
  const PlatformName = (0, _os.platform)();
125
125
  function infoLog(...args) {
@@ -3,7 +3,6 @@
3
3
  Author Tobias Koppers @sokra
4
4
 
5
5
  Forked to add support for `ignoreList`.
6
- Keep in sync with packages/next/webpack-plugins/eval-source-map-dev-tool-plugin.js
7
6
  */ "use strict";
8
7
  Object.defineProperty(exports, "__esModule", {
9
8
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/build/webpack/plugins/eval-source-map-dev-tool-plugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n\n Forked to add support for `ignoreList`.\n Keep in sync with packages/next/webpack-plugins/eval-source-map-dev-tool-plugin.js\n*/\nimport {\n type webpack,\n type SourceMapDevToolPluginOptions,\n ConcatenatedModule,\n makePathsAbsolute,\n ModuleFilenameHelpers,\n NormalModule,\n RuntimeGlobals,\n SourceMapDevToolModuleOptionsPlugin,\n} from 'next/dist/compiled/webpack/webpack'\nimport type { RawSourceMap } from 'next/dist/compiled/source-map'\n\nconst cache = new WeakMap<webpack.sources.Source, webpack.sources.Source>()\n\nconst devtoolWarningMessage = `/*\n * ATTENTION: An \"eval-source-map\" devtool has been used.\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file with attached SourceMaps in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n`\n\n// @ts-expect-error -- can't compare `string` with `number` in `version`Ï\ninterface SourceMap extends RawSourceMap {\n ignoreList?: number[]\n version: number\n}\n\nexport interface EvalSourceMapDevToolPluginOptions\n extends SourceMapDevToolPluginOptions {\n // Fork\n shouldIgnorePath?: (modulePath: string) => boolean\n}\n\n// Fork of webpack's EvalSourceMapDevToolPlugin with support for adding `ignoreList`.\n// https://github.com/webpack/webpack/blob/e237b580e2bda705c5ab39973f786f7c5a7026bc/lib/EvalSourceMapDevToolPlugin.js#L37\nexport default class EvalSourceMapDevToolPlugin {\n sourceMapComment: string\n moduleFilenameTemplate: NonNullable<\n EvalSourceMapDevToolPluginOptions['moduleFilenameTemplate']\n >\n namespace: NonNullable<EvalSourceMapDevToolPluginOptions['namespace']>\n options: EvalSourceMapDevToolPluginOptions\n shouldIgnorePath: (modulePath: string) => boolean\n\n /**\n * @param {SourceMapDevToolPluginOptions|string} inputOptions Options object\n */\n constructor(inputOptions: EvalSourceMapDevToolPluginOptions) {\n let options: EvalSourceMapDevToolPluginOptions\n if (typeof inputOptions === 'string') {\n options = {\n append: inputOptions,\n }\n } else {\n options = inputOptions\n }\n this.sourceMapComment =\n options.append && typeof options.append !== 'function'\n ? options.append\n : '//# sourceURL=[module]\\n//# sourceMappingURL=[url]'\n this.moduleFilenameTemplate =\n options.moduleFilenameTemplate ||\n 'webpack://[namespace]/[resource-path]?[hash]'\n this.namespace = options.namespace || ''\n this.options = options\n\n // fork\n this.shouldIgnorePath = options.shouldIgnorePath ?? (() => false)\n }\n\n /**\n * Apply the plugin\n * @param compiler the compiler instance\n */\n apply(compiler: webpack.Compiler): void {\n const options = this.options\n compiler.hooks.compilation.tap(\n 'NextJSEvalSourceMapDevToolPlugin',\n (compilation) => {\n const { JavascriptModulesPlugin } = compiler.webpack.javascript\n const { RawSource, ConcatSource } = compiler.webpack.sources\n\n const devtoolWarning = new RawSource(devtoolWarningMessage)\n\n const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation)\n\n new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation)\n const matchModule = ModuleFilenameHelpers.matchObject.bind(\n ModuleFilenameHelpers,\n options\n )\n\n hooks.renderModuleContent.tap(\n 'NextJSEvalSourceMapDevToolPlugin',\n (source, m, { chunk, runtimeTemplate, chunkGraph }) => {\n const cachedSource = cache.get(source)\n if (cachedSource !== undefined) {\n return cachedSource\n }\n\n const result = (\n r: webpack.sources.Source\n ): webpack.sources.Source => {\n cache.set(source, r)\n return r\n }\n\n if (m instanceof NormalModule) {\n const module = m\n if (!matchModule(module.resource)) {\n return result(source)\n }\n } else if (m instanceof ConcatenatedModule) {\n const concatModule = m\n if (concatModule.rootModule instanceof NormalModule) {\n const module = concatModule.rootModule\n if (!matchModule(module.resource)) {\n return result(source)\n }\n } else {\n return result(source)\n }\n } else {\n return result(source)\n }\n\n const namespace = compilation.getPath(this.namespace, {\n chunk,\n })\n let sourceMap: SourceMap\n let content\n if (source.sourceAndMap) {\n const sourceAndMap = source.sourceAndMap(options)\n sourceMap = sourceAndMap.map as SourceMap\n content = sourceAndMap.source\n } else {\n sourceMap = source.map(options) as SourceMap\n content = source.source()\n }\n if (!sourceMap) {\n return result(source)\n }\n\n // Clone (flat) the sourcemap to ensure that the mutations below do not persist.\n sourceMap = { ...sourceMap }\n const context = compiler.options.context!\n const root = compiler.root\n const modules = sourceMap.sources.map((sourceMapSource) => {\n if (!sourceMapSource.startsWith('webpack://'))\n return sourceMapSource\n sourceMapSource = makePathsAbsolute(\n context,\n sourceMapSource.slice(10),\n root\n )\n const module = compilation.findModule(sourceMapSource)\n return module || sourceMapSource\n })\n let moduleFilenames = modules.map((module) =>\n ModuleFilenameHelpers.createFilename(\n module,\n {\n moduleFilenameTemplate: this.moduleFilenameTemplate,\n namespace,\n },\n {\n requestShortener: runtimeTemplate.requestShortener,\n chunkGraph,\n hashFunction: compilation.outputOptions.hashFunction!,\n }\n )\n )\n moduleFilenames = ModuleFilenameHelpers.replaceDuplicates(\n moduleFilenames,\n (filename, _i, n) => {\n for (let j = 0; j < n; j++) filename += '*'\n return filename\n }\n )\n sourceMap.sources = moduleFilenames\n sourceMap.ignoreList = []\n for (let index = 0; index < moduleFilenames.length; index++) {\n if (this.shouldIgnorePath(moduleFilenames[index])) {\n sourceMap.ignoreList.push(index)\n }\n }\n if (options.noSources) {\n sourceMap.sourcesContent = undefined\n }\n sourceMap.sourceRoot = options.sourceRoot || ''\n const moduleId =\n /** @type {ModuleId} */\n chunkGraph.getModuleId(m)\n if (moduleId) {\n sourceMap.file =\n typeof moduleId === 'number' ? `${moduleId}.js` : moduleId\n }\n\n const footer = `${this.sourceMapComment.replace(\n /\\[url\\]/g,\n `data:application/json;charset=utf-8;base64,${Buffer.from(\n JSON.stringify(sourceMap),\n 'utf8'\n ).toString('base64')}`\n )}\\n//# sourceURL=webpack-internal:///${moduleId}\\n` // workaround for chrome bug\n\n return result(\n new RawSource(\n `eval(${\n compilation.outputOptions.trustedTypes\n ? `${RuntimeGlobals.createScript}(${JSON.stringify(\n content + footer\n )})`\n : JSON.stringify(content + footer)\n });`\n )\n )\n }\n )\n hooks.inlineInRuntimeBailout.tap(\n 'EvalDevToolModulePlugin',\n () => 'the eval-source-map devtool is used.'\n )\n hooks.render.tap(\n 'EvalSourceMapDevToolPlugin',\n (source) => new ConcatSource(devtoolWarning, source)\n )\n hooks.chunkHash.tap('EvalSourceMapDevToolPlugin', (_chunk, hash) => {\n hash.update('EvalSourceMapDevToolPlugin')\n hash.update('2')\n })\n if (compilation.outputOptions.trustedTypes) {\n compilation.hooks.additionalModuleRuntimeRequirements.tap(\n 'EvalSourceMapDevToolPlugin',\n (_module, set, _context) => {\n set.add(RuntimeGlobals.createScript)\n }\n )\n }\n }\n )\n }\n}\n"],"names":["EvalSourceMapDevToolPlugin","cache","WeakMap","devtoolWarningMessage","constructor","inputOptions","options","append","sourceMapComment","moduleFilenameTemplate","namespace","shouldIgnorePath","apply","compiler","hooks","compilation","tap","JavascriptModulesPlugin","webpack","javascript","RawSource","ConcatSource","sources","devtoolWarning","getCompilationHooks","SourceMapDevToolModuleOptionsPlugin","matchModule","ModuleFilenameHelpers","matchObject","bind","renderModuleContent","source","m","chunk","runtimeTemplate","chunkGraph","cachedSource","get","undefined","result","r","set","NormalModule","module","resource","ConcatenatedModule","concatModule","rootModule","getPath","sourceMap","content","sourceAndMap","map","context","root","modules","sourceMapSource","startsWith","makePathsAbsolute","slice","findModule","moduleFilenames","createFilename","requestShortener","hashFunction","outputOptions","replaceDuplicates","filename","_i","n","j","ignoreList","index","length","push","noSources","sourcesContent","sourceRoot","moduleId","getModuleId","file","footer","replace","Buffer","from","JSON","stringify","toString","trustedTypes","RuntimeGlobals","createScript","inlineInRuntimeBailout","render","chunkHash","_chunk","hash","update","additionalModuleRuntimeRequirements","_module","_context","add"],"mappings":"AAAA;;;;;;AAMA;;;;+BAqCA,qFAAqF;AACrF,yHAAyH;AACzH;;;eAAqBA;;;yBA7Bd;AAGP,MAAMC,QAAQ,IAAIC;AAElB,MAAMC,wBAAwB,CAAC;;;;;;;;AAQ/B,CAAC;AAgBc,MAAMH;IASnB;;GAEC,GACDI,YAAYC,YAA+C,CAAE;QAC3D,IAAIC;QACJ,IAAI,OAAOD,iBAAiB,UAAU;YACpCC,UAAU;gBACRC,QAAQF;YACV;QACF,OAAO;YACLC,UAAUD;QACZ;QACA,IAAI,CAACG,gBAAgB,GACnBF,QAAQC,MAAM,IAAI,OAAOD,QAAQC,MAAM,KAAK,aACxCD,QAAQC,MAAM,GACd;QACN,IAAI,CAACE,sBAAsB,GACzBH,QAAQG,sBAAsB,IAC9B;QACF,IAAI,CAACC,SAAS,GAAGJ,QAAQI,SAAS,IAAI;QACtC,IAAI,CAACJ,OAAO,GAAGA;QAEf,OAAO;QACP,IAAI,CAACK,gBAAgB,GAAGL,QAAQK,gBAAgB,IAAK,CAAA,IAAM,KAAI;IACjE;IAEA;;;GAGC,GACDC,MAAMC,QAA0B,EAAQ;QACtC,MAAMP,UAAU,IAAI,CAACA,OAAO;QAC5BO,SAASC,KAAK,CAACC,WAAW,CAACC,GAAG,CAC5B,oCACA,CAACD;YACC,MAAM,EAAEE,uBAAuB,EAAE,GAAGJ,SAASK,OAAO,CAACC,UAAU;YAC/D,MAAM,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGR,SAASK,OAAO,CAACI,OAAO;YAE5D,MAAMC,iBAAiB,IAAIH,UAAUjB;YAErC,MAAMW,QAAQG,wBAAwBO,mBAAmB,CAACT;YAE1D,IAAIU,4CAAmC,CAACnB,SAASM,KAAK,CAACG;YACvD,MAAMW,cAAcC,8BAAqB,CAACC,WAAW,CAACC,IAAI,CACxDF,8BAAqB,EACrBrB;YAGFQ,MAAMgB,mB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,CAAC,GAAGA;gBACtD;gBAEA,MAAMG,SAAS,GAAG,IAAI,CAACzE,gBAAgB,CAAC0E,OAAO,CAC7C,YACA,CAAC,2CAA2C,EAAEC,OAAOC,IAAI,CACvDC,KAAKC,SAAS,CAACrC,YACf,QACAsC,QAAQ,CAAC,WAAW,EACtB,oCAAoC,EAAET,SAAS,EAAE,CAAC,CAAC,4BAA4B;;gBAEjF,OAAOvC,OACL,IAAInB,UACF,CAAC,KAAK,EACJL,YAAYkD,aAAa,CAACuB,YAAY,GAClC,GAAGC,uBAAc,CAACC,YAAY,CAAC,CAAC,EAAEL,KAAKC,SAAS,CAC9CpC,UAAU+B,QACV,CAAC,CAAC,GACJI,KAAKC,SAAS,CAACpC,UAAU+B,QAC9B,EAAE,CAAC;YAGV;YAEFnE,MAAM6E,sBAAsB,CAAC3E,GAAG,CAC9B,2BACA,IAAM;YAERF,MAAM8E,MAAM,CAAC5E,GAAG,CACd,8BACA,CAACe,SAAW,IAAIV,aAAaE,gBAAgBQ;YAE/CjB,MAAM+E,SAAS,CAAC7E,GAAG,CAAC,8BAA8B,CAAC8E,QAAQC;gBACzDA,KAAKC,MAAM,CAAC;gBACZD,KAAKC,MAAM,CAAC;YACd;YACA,IAAIjF,YAAYkD,aAAa,CAACuB,YAAY,EAAE;gBAC1CzE,YAAYD,KAAK,CAACmF,mCAAmC,CAACjF,GAAG,CACvD,8BACA,CAACkF,SAASzD,KAAK0D;oBACb1D,IAAI2D,GAAG,CAACX,uBAAc,CAACC,YAAY;gBACrC;YAEJ;QACF;IAEJ;AACF"}
1
+ {"version":3,"sources":["../../../../src/build/webpack/plugins/eval-source-map-dev-tool-plugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n\n Forked to add support for `ignoreList`.\n*/\nimport {\n type webpack,\n type SourceMapDevToolPluginOptions,\n ConcatenatedModule,\n makePathsAbsolute,\n ModuleFilenameHelpers,\n NormalModule,\n RuntimeGlobals,\n SourceMapDevToolModuleOptionsPlugin,\n} from 'next/dist/compiled/webpack/webpack'\nimport type { RawSourceMap } from 'next/dist/compiled/source-map'\n\nconst cache = new WeakMap<webpack.sources.Source, webpack.sources.Source>()\n\nconst devtoolWarningMessage = `/*\n * ATTENTION: An \"eval-source-map\" devtool has been used.\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file with attached SourceMaps in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n`\n\n// @ts-expect-error -- can't compare `string` with `number` in `version`Ï\ninterface SourceMap extends RawSourceMap {\n ignoreList?: number[]\n version: number\n}\n\nexport interface EvalSourceMapDevToolPluginOptions\n extends SourceMapDevToolPluginOptions {\n // Fork\n shouldIgnorePath?: (modulePath: string) => boolean\n}\n\n// Fork of webpack's EvalSourceMapDevToolPlugin with support for adding `ignoreList`.\n// https://github.com/webpack/webpack/blob/e237b580e2bda705c5ab39973f786f7c5a7026bc/lib/EvalSourceMapDevToolPlugin.js#L37\nexport default class EvalSourceMapDevToolPlugin {\n sourceMapComment: string\n moduleFilenameTemplate: NonNullable<\n EvalSourceMapDevToolPluginOptions['moduleFilenameTemplate']\n >\n namespace: NonNullable<EvalSourceMapDevToolPluginOptions['namespace']>\n options: EvalSourceMapDevToolPluginOptions\n shouldIgnorePath: (modulePath: string) => boolean\n\n /**\n * @param {SourceMapDevToolPluginOptions|string} inputOptions Options object\n */\n constructor(inputOptions: EvalSourceMapDevToolPluginOptions) {\n let options: EvalSourceMapDevToolPluginOptions\n if (typeof inputOptions === 'string') {\n options = {\n append: inputOptions,\n }\n } else {\n options = inputOptions\n }\n this.sourceMapComment =\n options.append && typeof options.append !== 'function'\n ? options.append\n : '//# sourceURL=[module]\\n//# sourceMappingURL=[url]'\n this.moduleFilenameTemplate =\n options.moduleFilenameTemplate ||\n 'webpack://[namespace]/[resource-path]?[hash]'\n this.namespace = options.namespace || ''\n this.options = options\n\n // fork\n this.shouldIgnorePath = options.shouldIgnorePath ?? (() => false)\n }\n\n /**\n * Apply the plugin\n * @param compiler the compiler instance\n */\n apply(compiler: webpack.Compiler): void {\n const options = this.options\n compiler.hooks.compilation.tap(\n 'NextJSEvalSourceMapDevToolPlugin',\n (compilation) => {\n const { JavascriptModulesPlugin } = compiler.webpack.javascript\n const { RawSource, ConcatSource } = compiler.webpack.sources\n\n const devtoolWarning = new RawSource(devtoolWarningMessage)\n\n const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation)\n\n new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation)\n const matchModule = ModuleFilenameHelpers.matchObject.bind(\n ModuleFilenameHelpers,\n options\n )\n\n hooks.renderModuleContent.tap(\n 'NextJSEvalSourceMapDevToolPlugin',\n (source, m, { chunk, runtimeTemplate, chunkGraph }) => {\n const cachedSource = cache.get(source)\n if (cachedSource !== undefined) {\n return cachedSource\n }\n\n const result = (\n r: webpack.sources.Source\n ): webpack.sources.Source => {\n cache.set(source, r)\n return r\n }\n\n if (m instanceof NormalModule) {\n const module = m\n if (!matchModule(module.resource)) {\n return result(source)\n }\n } else if (m instanceof ConcatenatedModule) {\n const concatModule = m\n if (concatModule.rootModule instanceof NormalModule) {\n const module = concatModule.rootModule\n if (!matchModule(module.resource)) {\n return result(source)\n }\n } else {\n return result(source)\n }\n } else {\n return result(source)\n }\n\n const namespace = compilation.getPath(this.namespace, {\n chunk,\n })\n let sourceMap: SourceMap\n let content\n if (source.sourceAndMap) {\n const sourceAndMap = source.sourceAndMap(options)\n sourceMap = sourceAndMap.map as SourceMap\n content = sourceAndMap.source\n } else {\n sourceMap = source.map(options) as SourceMap\n content = source.source()\n }\n if (!sourceMap) {\n return result(source)\n }\n\n // Clone (flat) the sourcemap to ensure that the mutations below do not persist.\n sourceMap = { ...sourceMap }\n const context = compiler.options.context!\n const root = compiler.root\n const modules = sourceMap.sources.map((sourceMapSource) => {\n if (!sourceMapSource.startsWith('webpack://'))\n return sourceMapSource\n sourceMapSource = makePathsAbsolute(\n context,\n sourceMapSource.slice(10),\n root\n )\n const module = compilation.findModule(sourceMapSource)\n return module || sourceMapSource\n })\n let moduleFilenames = modules.map((module) =>\n ModuleFilenameHelpers.createFilename(\n module,\n {\n moduleFilenameTemplate: this.moduleFilenameTemplate,\n namespace,\n },\n {\n requestShortener: runtimeTemplate.requestShortener,\n chunkGraph,\n hashFunction: compilation.outputOptions.hashFunction!,\n }\n )\n )\n moduleFilenames = ModuleFilenameHelpers.replaceDuplicates(\n moduleFilenames,\n (filename, _i, n) => {\n for (let j = 0; j < n; j++) filename += '*'\n return filename\n }\n )\n sourceMap.sources = moduleFilenames\n sourceMap.ignoreList = []\n for (let index = 0; index < moduleFilenames.length; index++) {\n if (this.shouldIgnorePath(moduleFilenames[index])) {\n sourceMap.ignoreList.push(index)\n }\n }\n if (options.noSources) {\n sourceMap.sourcesContent = undefined\n }\n sourceMap.sourceRoot = options.sourceRoot || ''\n const moduleId =\n /** @type {ModuleId} */\n chunkGraph.getModuleId(m)\n if (moduleId) {\n sourceMap.file =\n typeof moduleId === 'number' ? `${moduleId}.js` : moduleId\n }\n\n const footer = `${this.sourceMapComment.replace(\n /\\[url\\]/g,\n `data:application/json;charset=utf-8;base64,${Buffer.from(\n JSON.stringify(sourceMap),\n 'utf8'\n ).toString('base64')}`\n )}\\n//# sourceURL=webpack-internal:///${moduleId}\\n` // workaround for chrome bug\n\n return result(\n new RawSource(\n `eval(${\n compilation.outputOptions.trustedTypes\n ? `${RuntimeGlobals.createScript}(${JSON.stringify(\n content + footer\n )})`\n : JSON.stringify(content + footer)\n });`\n )\n )\n }\n )\n hooks.inlineInRuntimeBailout.tap(\n 'EvalDevToolModulePlugin',\n () => 'the eval-source-map devtool is used.'\n )\n hooks.render.tap(\n 'EvalSourceMapDevToolPlugin',\n (source) => new ConcatSource(devtoolWarning, source)\n )\n hooks.chunkHash.tap('EvalSourceMapDevToolPlugin', (_chunk, hash) => {\n hash.update('EvalSourceMapDevToolPlugin')\n hash.update('2')\n })\n if (compilation.outputOptions.trustedTypes) {\n compilation.hooks.additionalModuleRuntimeRequirements.tap(\n 'EvalSourceMapDevToolPlugin',\n (_module, set, _context) => {\n set.add(RuntimeGlobals.createScript)\n }\n )\n }\n }\n )\n }\n}\n"],"names":["EvalSourceMapDevToolPlugin","cache","WeakMap","devtoolWarningMessage","constructor","inputOptions","options","append","sourceMapComment","moduleFilenameTemplate","namespace","shouldIgnorePath","apply","compiler","hooks","compilation","tap","JavascriptModulesPlugin","webpack","javascript","RawSource","ConcatSource","sources","devtoolWarning","getCompilationHooks","SourceMapDevToolModuleOptionsPlugin","matchModule","ModuleFilenameHelpers","matchObject","bind","renderModuleContent","source","m","chunk","runtimeTemplate","chunkGraph","cachedSource","get","undefined","result","r","set","NormalModule","module","resource","ConcatenatedModule","concatModule","rootModule","getPath","sourceMap","content","sourceAndMap","map","context","root","modules","sourceMapSource","startsWith","makePathsAbsolute","slice","findModule","moduleFilenames","createFilename","requestShortener","hashFunction","outputOptions","replaceDuplicates","filename","_i","n","j","ignoreList","index","length","push","noSources","sourcesContent","sourceRoot","moduleId","getModuleId","file","footer","replace","Buffer","from","JSON","stringify","toString","trustedTypes","RuntimeGlobals","createScript","inlineInRuntimeBailout","render","chunkHash","_chunk","hash","update","additionalModuleRuntimeRequirements","_module","_context","add"],"mappings":"AAAA;;;;;AAKA;;;;+BAqCA,qFAAqF;AACrF,yHAAyH;AACzH;;;eAAqBA;;;yBA7Bd;AAGP,MAAMC,QAAQ,IAAIC;AAElB,MAAMC,wBAAwB,CAAC;;;;;;;;AAQ/B,CAAC;AAgBc,MAAMH;IASnB;;GAEC,GACDI,YAAYC,YAA+C,CAAE;QAC3D,IAAIC;QACJ,IAAI,OAAOD,iBAAiB,UAAU;YACpCC,UAAU;gBACRC,QAAQF;YACV;QACF,OAAO;YACLC,UAAUD;QACZ;QACA,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9CpC,UAAU+B,QACV,CAAC,CAAC,GACJI,KAAKC,SAAS,CAACpC,UAAU+B,QAC9B,EAAE,CAAC;YAGV;YAEFnE,MAAM6E,sBAAsB,CAAC3E,GAAG,CAC9B,2BACA,IAAM;YAERF,MAAM8E,MAAM,CAAC5E,GAAG,CACd,8BACA,CAACe,SAAW,IAAIV,aAAaE,gBAAgBQ;YAE/CjB,MAAM+E,SAAS,CAAC7E,GAAG,CAAC,8BAA8B,CAAC8E,QAAQC;gBACzDA,KAAKC,MAAM,CAAC;gBACZD,KAAKC,MAAM,CAAC;YACd;YACA,IAAIjF,YAAYkD,aAAa,CAACuB,YAAY,EAAE;gBAC1CzE,YAAYD,KAAK,CAACmF,mCAAmC,CAACjF,GAAG,CACvD,8BACA,CAACkF,SAASzD,KAAK0D;oBACb1D,IAAI2D,GAAG,CAACX,uBAAc,CAACC,YAAY;gBACrC;YAEJ;QACF;IAEJ;AACF"}
@@ -1499,7 +1499,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1499
1499
  isClient && new _copyfileplugin.CopyFilePlugin({
1500
1500
  // file path to build output of `@next/polyfill-nomodule`
1501
1501
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1502
- cacheKey: "15.2.0-canary.26",
1502
+ cacheKey: "15.2.0-canary.27",
1503
1503
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1504
1504
  minimize: false,
1505
1505
  info: {
@@ -1728,7 +1728,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1728
1728
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1729
1729
  // - Next.js version
1730
1730
  // - next.config.js keys that affect compilation
1731
- version: `${__dirname}|${"15.2.0-canary.26"}|${configVars}`,
1731
+ version: `${__dirname}|${"15.2.0-canary.27"}|${configVars}`,
1732
1732
  cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
1733
1733
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1734
1734
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "appBootstrap", {
13
13
  return appBootstrap;
14
14
  }
15
15
  });
16
- const version = "15.2.0-canary.26";
16
+ const version = "15.2.0-canary.27";
17
17
  window.next = {
18
18
  version,
19
19
  appDir: true
@@ -62,7 +62,7 @@ const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-err
62
62
  const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
63
63
  const _reporttosocket = /*#__PURE__*/ _interop_require_default._(require("./tracing/report-to-socket"));
64
64
  const _isnextroutererror = require("./components/is-next-router-error");
65
- const version = "15.2.0-canary.26";
65
+ const version = "15.2.0-canary.27";
66
66
  let router;
67
67
  const emitter = (0, _mitt.default)();
68
68
  const looseToArray = (input)=>[].slice.call(input);