next 15.3.0-canary.42 → 15.3.0-canary.43

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.
Files changed (41) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +16 -2
  3. package/dist/build/index.js.map +1 -1
  4. package/dist/build/swc/index.js +1 -1
  5. package/dist/build/turbopack-build/impl.js +0 -8
  6. package/dist/build/turbopack-build/impl.js.map +1 -1
  7. package/dist/build/webpack-config.js +4 -3
  8. package/dist/build/webpack-config.js.map +1 -1
  9. package/dist/client/app-bootstrap.js +1 -1
  10. package/dist/client/index.js +1 -1
  11. package/dist/compiled/next-server/app-page-experimental.runtime.prod.js.map +1 -1
  12. package/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js.map +1 -1
  13. package/dist/compiled/next-server/app-page-turbo.runtime.prod.js.map +1 -1
  14. package/dist/compiled/next-server/app-page.runtime.prod.js.map +1 -1
  15. package/dist/esm/build/index.js +16 -2
  16. package/dist/esm/build/index.js.map +1 -1
  17. package/dist/esm/build/swc/index.js +1 -1
  18. package/dist/esm/build/turbopack-build/impl.js +0 -8
  19. package/dist/esm/build/turbopack-build/impl.js.map +1 -1
  20. package/dist/esm/build/webpack-config.js +4 -3
  21. package/dist/esm/build/webpack-config.js.map +1 -1
  22. package/dist/esm/client/app-bootstrap.js +1 -1
  23. package/dist/esm/client/index.js +1 -1
  24. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  25. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  26. package/dist/esm/server/lib/app-info-log.js +1 -1
  27. package/dist/esm/server/lib/start-server.js +1 -1
  28. package/dist/esm/shared/lib/canary-only.js +1 -1
  29. package/dist/esm/shared/lib/get-rspack.js +5 -11
  30. package/dist/esm/shared/lib/get-rspack.js.map +1 -1
  31. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  32. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  33. package/dist/server/lib/app-info-log.js +1 -1
  34. package/dist/server/lib/start-server.js +1 -1
  35. package/dist/shared/lib/canary-only.js +1 -1
  36. package/dist/shared/lib/get-rspack.js +5 -11
  37. package/dist/shared/lib/get-rspack.js.map +1 -1
  38. package/dist/telemetry/anonymous-meta.js +1 -1
  39. package/dist/telemetry/events/session-stopped.js +2 -2
  40. package/dist/telemetry/events/version.js +2 -2
  41. package/package.json +16 -16
package/dist/bin/next CHANGED
@@ -79,7 +79,7 @@ const program = new NextRootCommand();
79
79
  program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
80
80
  formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
81
81
  subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
82
- }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.3.0-canary.42"}`, '-v, --version', 'Outputs the Next.js version.');
82
+ }).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.3.0-canary.43"}`, '-v, --version', 'Outputs the Next.js version.');
83
83
  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.').option('--turbo', 'Starts development mode using Turbopack.').option('--turbopack', 'Starts development mode using Turbopack.').addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
84
84
  'compile',
85
85
  'generate',
@@ -372,7 +372,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
372
372
  const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
373
373
  buildMode: experimentalBuildMode,
374
374
  isTurboBuild: String(isTurbopack),
375
- version: "15.3.0-canary.42"
375
+ version: "15.3.0-canary.43"
376
376
  });
377
377
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
378
378
  _buildcontext.NextBuildContext.dir = dir;
@@ -753,7 +753,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
753
753
  // Files outside of the distDir can be "type": "module"
754
754
  await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
755
755
  // These are written to distDir, so they need to come after creating and cleaning distDr.
756
- await (0, _builddiagnostics.recordFrameworkVersion)("15.3.0-canary.42");
756
+ await (0, _builddiagnostics.recordFrameworkVersion)("15.3.0-canary.43");
757
757
  await (0, _builddiagnostics.updateBuildDiagnostics)({
758
758
  buildStage: 'start'
759
759
  });
@@ -2309,6 +2309,9 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
2309
2309
  } finally{
2310
2310
  // Ensure we wait for lockfile patching if present
2311
2311
  await _swc.lockfilePatchPromise.cur;
2312
+ if (isTurbopack && !process.env.__NEXT_TEST_MODE) {
2313
+ warnAboutTurbopackBuilds(loadedConfig);
2314
+ }
2312
2315
  // Ensure all traces are flushed before finishing the command
2313
2316
  await (0, _trace.flushAllTraces)();
2314
2317
  (0, _swc.teardownTraceSubscriber)();
@@ -2324,5 +2327,16 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
2324
2327
  }
2325
2328
  }
2326
2329
  }
2330
+ function warnAboutTurbopackBuilds(config) {
2331
+ var _config_experimental_turbo;
2332
+ let warningStr = `Support for Turbopack builds is experimental. ` + (0, _picocolors.bold)(`We don't recommend deploying mission-critical applications to production.`);
2333
+ warningStr += '\n\n- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.';
2334
+ if (!(config == null ? void 0 : (_config_experimental_turbo = config.experimental.turbo) == null ? void 0 : _config_experimental_turbo.unstablePersistentCaching)) {
2335
+ warningStr += '\n- This build is without disk caching; subsequent builds will become faster when disk caching becomes available.';
2336
+ }
2337
+ warningStr += '\n- When comparing output to webpack builds, make sure to first clear the Next.js cache by deleting the `.next` directory.';
2338
+ warningStr += '\n\nProvide feedback for Turbopack builds at https://github.com/vercel/next.js/discussions/77721';
2339
+ _log.warn(warningStr);
2340
+ }
2327
2341
 
2328
2342
  //# sourceMappingURL=index.js.map