next 16.0.0-canary.5 → 16.0.0-canary.6

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 (54) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +4 -4
  3. package/dist/build/index.js.map +1 -1
  4. package/dist/build/swc/generated-native.d.ts +6 -6
  5. package/dist/build/swc/index.js +1 -1
  6. package/dist/build/templates/app-page.js +5 -6
  7. package/dist/build/templates/app-page.js.map +1 -1
  8. package/dist/build/webpack-config-rules/resolve.d.ts +1 -1
  9. package/dist/build/webpack-config-rules/resolve.js +8 -9
  10. package/dist/build/webpack-config-rules/resolve.js.map +1 -1
  11. package/dist/build/webpack-config.js +23 -16
  12. package/dist/build/webpack-config.js.map +1 -1
  13. package/dist/client/app-bootstrap.js +1 -1
  14. package/dist/client/index.js +1 -1
  15. package/dist/esm/build/index.js +4 -4
  16. package/dist/esm/build/index.js.map +1 -1
  17. package/dist/esm/build/swc/generated-native.d.ts +6 -6
  18. package/dist/esm/build/swc/index.js +1 -1
  19. package/dist/esm/build/templates/app-page.js +5 -6
  20. package/dist/esm/build/templates/app-page.js.map +1 -1
  21. package/dist/esm/build/webpack-config-rules/resolve.js +5 -7
  22. package/dist/esm/build/webpack-config-rules/resolve.js.map +1 -1
  23. package/dist/esm/build/webpack-config.js +24 -17
  24. package/dist/esm/build/webpack-config.js.map +1 -1
  25. package/dist/esm/client/app-bootstrap.js +1 -1
  26. package/dist/esm/client/index.js +1 -1
  27. package/dist/esm/server/config-schema.js +0 -1
  28. package/dist/esm/server/config-schema.js.map +1 -1
  29. package/dist/esm/server/config-shared.js +0 -1
  30. package/dist/esm/server/config-shared.js.map +1 -1
  31. package/dist/esm/server/config.js +5 -29
  32. package/dist/esm/server/config.js.map +1 -1
  33. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  34. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  35. package/dist/esm/server/lib/app-info-log.js +1 -1
  36. package/dist/esm/server/lib/start-server.js +1 -1
  37. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  38. package/dist/server/config-schema.d.ts +0 -1
  39. package/dist/server/config-schema.js +0 -1
  40. package/dist/server/config-schema.js.map +1 -1
  41. package/dist/server/config-shared.d.ts +0 -7
  42. package/dist/server/config-shared.js +0 -1
  43. package/dist/server/config-shared.js.map +1 -1
  44. package/dist/server/config.js +5 -29
  45. package/dist/server/config.js.map +1 -1
  46. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  47. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  48. package/dist/server/lib/app-info-log.js +1 -1
  49. package/dist/server/lib/start-server.js +1 -1
  50. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  51. package/dist/telemetry/anonymous-meta.js +1 -1
  52. package/dist/telemetry/events/session-stopped.js +2 -2
  53. package/dist/telemetry/events/version.js +2 -2
  54. package/package.json +15 -15
@@ -139,8 +139,8 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
139
139
  * @param userConfig - The user config.
140
140
  * @param silent - Whether to suppress warnings.
141
141
  * @returns The complete config.
142
- */ function assignDefaultsAndValidate(dir, userConfig, silent, configuredExperimentalFeatures, phase) {
143
- var _result_experimental, _result_experimental1, _result_experimental_serverActions, _result_experimental2, _userConfig_experimental, _userConfig_experimental1, _userConfig_experimental2, _userConfig_experimental3, _userConfig_experimental4, _userConfig_experimental5, _userConfig_experimental6, _userConfig_experimental7, _userConfig_experimental8, _userConfig_experimental9, _userConfig_experimental10, _userConfig_experimental11, _result_experimental3, _result_turbopack, _result_turbopack1, _result_devIndicators, _result_experimental4, _result_experimental5, _userConfig_experimental12, _result_experimental6;
142
+ */ function assignDefaultsAndValidate(dir, userConfig, silent, phase) {
143
+ var _result_experimental, _result_experimental1, _result_experimental_serverActions, _result_experimental2, _userConfig_experimental, _userConfig_experimental1, _userConfig_experimental2, _userConfig_experimental3, _userConfig_experimental4, _userConfig_experimental5, _userConfig_experimental6, _userConfig_experimental7, _userConfig_experimental8, _userConfig_experimental9, _userConfig_experimental10, _userConfig_experimental11, _result_experimental3, _result_turbopack, _result_turbopack1, _result_devIndicators, _result_experimental4, _result_experimental5, _result_experimental6;
144
144
  const configFileName = userConfig.configFileName;
145
145
  if (typeof userConfig.exportTrailingSlash !== 'undefined') {
146
146
  if (!silent) {
@@ -936,22 +936,6 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
936
936
  if (result.experimental.useCache === undefined) {
937
937
  result.experimental.useCache = result.experimental.cacheComponents;
938
938
  }
939
- // If cacheComponents is enabled and the user hasn't configured
940
- // rdcForNavigations, we enable it by default.
941
- if (result.experimental.cacheComponents && ((_userConfig_experimental12 = userConfig.experimental) == null ? void 0 : _userConfig_experimental12.rdcForNavigations) === undefined) {
942
- result.experimental.rdcForNavigations = true;
943
- if (configuredExperimentalFeatures) {
944
- addConfiguredExperimentalFeature(configuredExperimentalFeatures, 'rdcForNavigations', true, 'enabled by `experimental.cacheComponents`');
945
- }
946
- }
947
- // If rdcForNavigations is enabled, but cacheComponents is not, we throw an error.
948
- if (result.experimental.rdcForNavigations && !result.experimental.cacheComponents) {
949
- throw Object.defineProperty(new Error('`experimental.rdcForNavigations` is enabled, but `experimental.cacheComponents` is not.'), "__NEXT_ERROR_CODE", {
950
- value: "E865",
951
- enumerable: false,
952
- configurable: true
953
- });
954
- }
955
939
  if (phase === PHASE_DEVELOPMENT_SERVER && ((_result_experimental6 = result.experimental) == null ? void 0 : _result_experimental6.isolatedDevBuild)) {
956
940
  result.distDir = join(result.distDir, 'dev');
957
941
  }
@@ -1051,7 +1035,7 @@ export default async function loadConfig(phase, dir, { customConfig, rawConfig,
1051
1035
  configOrigin: 'server',
1052
1036
  configFileName,
1053
1037
  ...customConfig
1054
- }, silent, configuredExperimentalFeatures, phase), phase, silent);
1038
+ }, silent, phase), phase, silent);
1055
1039
  // Cache the custom config result
1056
1040
  configCache.set(cacheKey, {
1057
1041
  config,
@@ -1175,7 +1159,7 @@ export default async function loadConfig(phase, dir, { customConfig, rawConfig,
1175
1159
  configFile: path,
1176
1160
  configFileName,
1177
1161
  ...userConfig
1178
- }, silent, configuredExperimentalFeatures, phase);
1162
+ }, silent, phase);
1179
1163
  const finalConfig = await applyModifyConfig(completeConfig, phase, silent);
1180
1164
  // Cache the final result
1181
1165
  configCache.set(cacheKey, {
@@ -1222,7 +1206,7 @@ export default async function loadConfig(phase, dir, { customConfig, rawConfig,
1222
1206
  const completeConfig = assignDefaultsAndValidate(dir, {
1223
1207
  ...clonedDefaultConfig,
1224
1208
  configFileName
1225
- }, silent, configuredExperimentalFeatures, phase);
1209
+ }, silent, phase);
1226
1210
  setHttpClientAndAgentOptions(completeConfig);
1227
1211
  const finalConfig = await applyModifyConfig(completeConfig, phase, silent);
1228
1212
  // Cache the default config result
@@ -1253,14 +1237,6 @@ function enforceExperimentalFeatures(config, options) {
1253
1237
  addConfiguredExperimentalFeature(configuredExperimentalFeatures, 'cacheComponents', true, 'enabled by `__NEXT_EXPERIMENTAL_CACHE_COMPONENTS`');
1254
1238
  }
1255
1239
  }
1256
- // TODO: Remove this once we've made RDC for Navigations the default for cache components.
1257
- if (process.env.__NEXT_EXPERIMENTAL_CACHE_COMPONENTS === 'true' && // We do respect an explicit value in the user config.
1258
- (config.experimental.rdcForNavigations === undefined || isDefaultConfig && !config.experimental.rdcForNavigations)) {
1259
- config.experimental.rdcForNavigations = true;
1260
- if (configuredExperimentalFeatures) {
1261
- addConfiguredExperimentalFeature(configuredExperimentalFeatures, 'rdcForNavigations', true, 'enabled by `__NEXT_EXPERIMENTAL_CACHE_COMPONENTS`');
1262
- }
1263
- }
1264
1240
  // TODO: Remove this once using the debug channel is the default.
1265
1241
  if (process.env.__NEXT_EXPERIMENTAL_DEBUG_CHANNEL === 'true' && // We do respect an explicit value in the user config.
1266
1242
  (config.experimental.reactDebugChannel === undefined || isDefaultConfig && !config.experimental.reactDebugChannel)) {