next 15.4.2-canary.45 → 15.4.2-canary.46
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.
- package/dist/bin/next +1 -1
- package/dist/build/index.js +2 -2
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
- package/dist/esm/build/index.js +2 -2
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/lib/find-root.js +10 -9
- package/dist/esm/lib/find-root.js.map +1 -1
- package/dist/esm/server/config.js +1 -1
- package/dist/esm/server/config.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/lib/find-root.js +10 -9
- package/dist/lib/find-root.js.map +1 -1
- package/dist/server/config.js +1 -1
- package/dist/server/config.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
package/dist/esm/build/index.js
CHANGED
@@ -299,7 +299,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
299
299
|
const nextBuildSpan = trace('next-build', undefined, {
|
300
300
|
buildMode: experimentalBuildMode,
|
301
301
|
isTurboBuild: String(isTurbopack),
|
302
|
-
version: "15.4.2-canary.
|
302
|
+
version: "15.4.2-canary.46"
|
303
303
|
});
|
304
304
|
NextBuildContext.nextBuildSpan = nextBuildSpan;
|
305
305
|
NextBuildContext.dir = dir;
|
@@ -754,7 +754,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
754
754
|
// Files outside of the distDir can be "type": "module"
|
755
755
|
await writeFileUtf8(path.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
756
756
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
757
|
-
await recordFrameworkVersion("15.4.2-canary.
|
757
|
+
await recordFrameworkVersion("15.4.2-canary.46");
|
758
758
|
await updateBuildDiagnostics({
|
759
759
|
buildStage: 'start'
|
760
760
|
});
|
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
|
|
11
11
|
import { getDefineEnv } from '../define-env';
|
12
12
|
import { getReactCompilerLoader } from '../get-babel-loader-config';
|
13
13
|
import { throwTurbopackInternalError } from '../../shared/lib/turbopack/internal-error';
|
14
|
-
const nextVersion = "15.4.2-canary.
|
14
|
+
const nextVersion = "15.4.2-canary.46";
|
15
15
|
const ArchName = arch();
|
16
16
|
const PlatformName = platform();
|
17
17
|
function infoLog(...args) {
|
@@ -1608,7 +1608,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
1608
1608
|
isClient && new CopyFilePlugin({
|
1609
1609
|
// file path to build output of `@next/polyfill-nomodule`
|
1610
1610
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
1611
|
-
cacheKey: "15.4.2-canary.
|
1611
|
+
cacheKey: "15.4.2-canary.46",
|
1612
1612
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
1613
1613
|
minimize: false,
|
1614
1614
|
info: {
|
@@ -1787,7 +1787,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
1787
1787
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
1788
1788
|
// - Next.js version
|
1789
1789
|
// - next.config.js keys that affect compilation
|
1790
|
-
version: `${__dirname}|${"15.4.2-canary.
|
1790
|
+
version: `${__dirname}|${"15.4.2-canary.46"}|${configVars}`,
|
1791
1791
|
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
|
1792
1792
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
1793
1793
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
package/dist/esm/client/index.js
CHANGED
@@ -26,7 +26,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
|
|
26
26
|
import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
|
27
27
|
import tracer from './tracing/tracer';
|
28
28
|
import { isNextRouterError } from './components/is-next-router-error';
|
29
|
-
export const version = "15.4.2-canary.
|
29
|
+
export const version = "15.4.2-canary.46";
|
30
30
|
export let router;
|
31
31
|
export const emitter = mitt();
|
32
32
|
const looseToArray = (input)=>[].slice.call(input);
|
@@ -19,24 +19,25 @@ export function findRootDir(cwd) {
|
|
19
19
|
lockFile
|
20
20
|
];
|
21
21
|
while(true){
|
22
|
-
const
|
23
|
-
const
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
const lastLockFile = lockFiles[lockFiles.length - 1];
|
23
|
+
const currentDir = dirname(lastLockFile);
|
24
|
+
const parentDir = dirname(currentDir);
|
25
|
+
// dirname('/')==='/' so if we happen to reach the FS root (as might happen in a container we need to quit to avoid looping forever
|
26
|
+
if (parentDir === currentDir) break;
|
27
|
+
const newLockFile = findRootLockFile(parentDir);
|
28
|
+
if (!newLockFile) break;
|
29
|
+
lockFiles.push(newLockFile);
|
29
30
|
}
|
30
31
|
// Only warn if not in a build worker to avoid duplicate warnings
|
31
32
|
if (typeof process.send !== 'function' && lockFiles.length > 1) {
|
32
|
-
const additionalLockFiles = lockFiles.slice(0, -1).map((str)
|
33
|
+
const additionalLockFiles = lockFiles.slice(0, -1).map((str)=>`\n * ${str}`).join('');
|
33
34
|
if (process.env.TURBOPACK) {
|
34
35
|
Log.warnOnce(`Warning: Next.js inferred your workspace root, but it may not be correct.\n` + ` We detected multiple lockfiles and selected the directory of ${lockFiles[lockFiles.length - 1]} as the root directory.\n` + ` To silence this warning, set \`turbopack.root\` in your Next.js config, or consider ` + `removing one of the lockfiles if it's not needed.\n` + ` See https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#root-directory for more information.\n` + ` Detected additional lockfiles: ${additionalLockFiles}\n`);
|
35
36
|
} else {
|
36
37
|
Log.warnOnce(`Warning: Next.js inferred your workspace root, but it may not be correct.\n` + ` We detected multiple lockfiles and selected the directory of ${lockFiles[lockFiles.length - 1]} as the root directory.\n` + ` To silence this warning, set \`outputFileTracingRoot\` in your Next.js config, or consider ` + `removing one of the lockfiles if it's not needed.\n` + ` See https://nextjs.org/docs/app/api-reference/config/next-config-js/output#caveats for more information.\n` + ` Detected additional lockfiles: ${additionalLockFiles}\n`);
|
37
38
|
}
|
38
39
|
}
|
39
|
-
return dirname(
|
40
|
+
return dirname(lockFiles[lockFiles.length - 1]);
|
40
41
|
}
|
41
42
|
|
42
43
|
//# sourceMappingURL=find-root.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/lib/find-root.ts"],"sourcesContent":["import { dirname } from 'path'\nimport findUp from 'next/dist/compiled/find-up'\nimport * as Log from '../build/output/log'\n\nexport function findRootLockFile(cwd: string) {\n return findUp.sync(\n [\n 'pnpm-lock.yaml',\n 'package-lock.json',\n 'yarn.lock',\n 'bun.lock',\n 'bun.lockb',\n ],\n {\n cwd,\n }\n )\n}\n\nexport function findRootDir(cwd: string) {\n const lockFile = findRootLockFile(cwd)\n if (!lockFile) return undefined\n\n const lockFiles = [lockFile]\n while (true) {\n const
|
1
|
+
{"version":3,"sources":["../../src/lib/find-root.ts"],"sourcesContent":["import { dirname } from 'path'\nimport findUp from 'next/dist/compiled/find-up'\nimport * as Log from '../build/output/log'\n\nexport function findRootLockFile(cwd: string) {\n return findUp.sync(\n [\n 'pnpm-lock.yaml',\n 'package-lock.json',\n 'yarn.lock',\n 'bun.lock',\n 'bun.lockb',\n ],\n {\n cwd,\n }\n )\n}\n\nexport function findRootDir(cwd: string) {\n const lockFile = findRootLockFile(cwd)\n if (!lockFile) return undefined\n\n const lockFiles = [lockFile]\n while (true) {\n const lastLockFile = lockFiles[lockFiles.length - 1]\n const currentDir = dirname(lastLockFile)\n const parentDir = dirname(currentDir)\n\n // dirname('/')==='/' so if we happen to reach the FS root (as might happen in a container we need to quit to avoid looping forever\n if (parentDir === currentDir) break\n\n const newLockFile = findRootLockFile(parentDir)\n\n if (!newLockFile) break\n\n lockFiles.push(newLockFile)\n }\n\n // Only warn if not in a build worker to avoid duplicate warnings\n if (typeof process.send !== 'function' && lockFiles.length > 1) {\n const additionalLockFiles = lockFiles\n .slice(0, -1)\n .map((str) => `\\n * ${str}`)\n .join('')\n\n if (process.env.TURBOPACK) {\n Log.warnOnce(\n `Warning: Next.js inferred your workspace root, but it may not be correct.\\n` +\n ` We detected multiple lockfiles and selected the directory of ${lockFiles[lockFiles.length - 1]} as the root directory.\\n` +\n ` To silence this warning, set \\`turbopack.root\\` in your Next.js config, or consider ` +\n `removing one of the lockfiles if it's not needed.\\n` +\n ` See https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#root-directory for more information.\\n` +\n ` Detected additional lockfiles: ${additionalLockFiles}\\n`\n )\n } else {\n Log.warnOnce(\n `Warning: Next.js inferred your workspace root, but it may not be correct.\\n` +\n ` We detected multiple lockfiles and selected the directory of ${lockFiles[lockFiles.length - 1]} as the root directory.\\n` +\n ` To silence this warning, set \\`outputFileTracingRoot\\` in your Next.js config, or consider ` +\n `removing one of the lockfiles if it's not needed.\\n` +\n ` See https://nextjs.org/docs/app/api-reference/config/next-config-js/output#caveats for more information.\\n` +\n ` Detected additional lockfiles: ${additionalLockFiles}\\n`\n )\n }\n }\n\n return dirname(lockFiles[lockFiles.length - 1])\n}\n"],"names":["dirname","findUp","Log","findRootLockFile","cwd","sync","findRootDir","lockFile","undefined","lockFiles","lastLockFile","length","currentDir","parentDir","newLockFile","push","process","send","additionalLockFiles","slice","map","str","join","env","TURBOPACK","warnOnce"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAM;AAC9B,OAAOC,YAAY,6BAA4B;AAC/C,YAAYC,SAAS,sBAAqB;AAE1C,OAAO,SAASC,iBAAiBC,GAAW;IAC1C,OAAOH,OAAOI,IAAI,CAChB;QACE;QACA;QACA;QACA;QACA;KACD,EACD;QACED;IACF;AAEJ;AAEA,OAAO,SAASE,YAAYF,GAAW;IACrC,MAAMG,WAAWJ,iBAAiBC;IAClC,IAAI,CAACG,UAAU,OAAOC;IAEtB,MAAMC,YAAY;QAACF;KAAS;IAC5B,MAAO,KAAM;QACX,MAAMG,eAAeD,SAAS,CAACA,UAAUE,MAAM,GAAG,EAAE;QACpD,MAAMC,aAAaZ,QAAQU;QAC3B,MAAMG,YAAYb,QAAQY;QAE1B,mIAAmI;QACnI,IAAIC,cAAcD,YAAY;QAE9B,MAAME,cAAcX,iBAAiBU;QAErC,IAAI,CAACC,aAAa;QAElBL,UAAUM,IAAI,CAACD;IACjB;IAEA,iEAAiE;IACjE,IAAI,OAAOE,QAAQC,IAAI,KAAK,cAAcR,UAAUE,MAAM,GAAG,GAAG;QAC9D,MAAMO,sBAAsBT,UACzBU,KAAK,CAAC,GAAG,CAAC,GACVC,GAAG,CAAC,CAACC,MAAQ,CAAC,OAAO,EAAEA,KAAK,EAC5BC,IAAI,CAAC;QAER,IAAIN,QAAQO,GAAG,CAACC,SAAS,EAAE;YACzBtB,IAAIuB,QAAQ,CACV,CAAC,2EAA2E,CAAC,GAC3E,CAAC,8DAA8D,EAAEhB,SAAS,CAACA,UAAUE,MAAM,GAAG,EAAE,CAAC,yBAAyB,CAAC,GAC3H,CAAC,qFAAqF,CAAC,GACvF,CAAC,mDAAmD,CAAC,GACrD,CAAC,uHAAuH,CAAC,GACzH,CAAC,gCAAgC,EAAEO,oBAAoB,EAAE,CAAC;QAEhE,OAAO;YACLhB,IAAIuB,QAAQ,CACV,CAAC,2EAA2E,CAAC,GAC3E,CAAC,8DAA8D,EAAEhB,SAAS,CAACA,UAAUE,MAAM,GAAG,EAAE,CAAC,yBAAyB,CAAC,GAC3H,CAAC,4FAA4F,CAAC,GAC9F,CAAC,mDAAmD,CAAC,GACrD,CAAC,6GAA6G,CAAC,GAC/G,CAAC,gCAAgC,EAAEO,oBAAoB,EAAE,CAAC;QAEhE;IACF;IAEA,OAAOlB,QAAQS,SAAS,CAACA,UAAUE,MAAM,GAAG,EAAE;AAChD","ignoreList":[0]}
|
@@ -452,7 +452,7 @@ function assignDefaults(dir, userConfig, silent) {
|
|
452
452
|
}
|
453
453
|
warnCustomizedOption(result, 'experimental.esmExternals', true, 'experimental.esmExternals is not recommended to be modified as it may disrupt module resolution', configFileName, silent);
|
454
454
|
// Handle buildActivityPosition migration (needs to be done after merging with defaults)
|
455
|
-
if (result.devIndicators
|
455
|
+
if (result.devIndicators && typeof result.devIndicators === 'object' && 'buildActivityPosition' in result.devIndicators && result.devIndicators.buildActivityPosition !== result.devIndicators.position) {
|
456
456
|
if (!silent) {
|
457
457
|
Log.warnOnce(`The \`devIndicators\` option \`buildActivityPosition\` ("${result.devIndicators.buildActivityPosition}") conflicts with \`position\` ("${result.devIndicators.position}"). Using \`buildActivityPosition\` ("${result.devIndicators.buildActivityPosition}") for backward compatibility.`);
|
458
458
|
}
|