@openuiai/next 16.0.12 → 16.0.13
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 +3 -3
- 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/esm/build/index.js +3 -3
- 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/has-necessary-dependencies.js +37 -1
- package/dist/esm/lib/has-necessary-dependencies.js.map +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/errors/canary-only-config-error.js +1 -1
- package/dist/lib/has-necessary-dependencies.js +37 -1
- package/dist/lib/has-necessary-dependencies.js.map +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/errors/canary-only-config-error.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 +1 -1
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${"16.0.
|
|
82
|
+
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"16.0.13"}`, '-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('--debug-prerender', 'Enables debug mode for prerendering. Not for production use!').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').option('--webpack', 'Builds using webpack.').addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
|
|
84
84
|
'compile',
|
|
85
85
|
'generate',
|
package/dist/build/index.js
CHANGED
|
@@ -373,7 +373,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
|
373
373
|
try {
|
|
374
374
|
const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
|
|
375
375
|
buildMode: experimentalBuildMode,
|
|
376
|
-
version: "16.0.
|
|
376
|
+
version: "16.0.13"
|
|
377
377
|
});
|
|
378
378
|
_buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
|
|
379
379
|
_buildcontext.NextBuildContext.dir = dir;
|
|
@@ -886,7 +886,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
|
886
886
|
// Files outside of the distDir can be "type": "module"
|
|
887
887
|
await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
|
888
888
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
|
889
|
-
await (0, _builddiagnostics.recordFrameworkVersion)("16.0.
|
|
889
|
+
await (0, _builddiagnostics.recordFrameworkVersion)("16.0.13");
|
|
890
890
|
await (0, _builddiagnostics.updateBuildDiagnostics)({
|
|
891
891
|
buildStage: 'start'
|
|
892
892
|
});
|
|
@@ -2535,7 +2535,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
|
2535
2535
|
configOutDir: _path.default.join(dir, configOutDir),
|
|
2536
2536
|
staticPages,
|
|
2537
2537
|
serverPropsPages,
|
|
2538
|
-
nextVersion: "16.0.
|
|
2538
|
+
nextVersion: "16.0.13",
|
|
2539
2539
|
tracingRoot: outputFileTracingRoot,
|
|
2540
2540
|
hasNodeMiddleware,
|
|
2541
2541
|
hasInstrumentationHook,
|
|
@@ -1713,7 +1713,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1713
1713
|
isClient && new _copyfileplugin.CopyFilePlugin({
|
|
1714
1714
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1715
1715
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1716
|
-
cacheKey: "16.0.
|
|
1716
|
+
cacheKey: "16.0.13",
|
|
1717
1717
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1718
1718
|
minimize: false,
|
|
1719
1719
|
info: {
|
|
@@ -1904,7 +1904,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1904
1904
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1905
1905
|
// - Next.js version
|
|
1906
1906
|
// - next.config.js keys that affect compilation
|
|
1907
|
-
version: `${__dirname}|${"16.0.
|
|
1907
|
+
version: `${__dirname}|${"16.0.13"}|${configVars}`,
|
|
1908
1908
|
cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
|
|
1909
1909
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1910
1910
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "appBootstrap", {
|
|
|
15
15
|
});
|
|
16
16
|
const _assetprefix = require("./asset-prefix");
|
|
17
17
|
const _setattributesfromprops = require("./set-attributes-from-props");
|
|
18
|
-
const version = "16.0.
|
|
18
|
+
const version = "16.0.13";
|
|
19
19
|
window.next = {
|
|
20
20
|
version,
|
|
21
21
|
appDir: true
|
package/dist/client/index.js
CHANGED
|
@@ -60,7 +60,7 @@ const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-con
|
|
|
60
60
|
const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error");
|
|
61
61
|
const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
|
|
62
62
|
const _isnextroutererror = require("./components/is-next-router-error");
|
|
63
|
-
const version = "16.0.
|
|
63
|
+
const version = "16.0.13";
|
|
64
64
|
let router;
|
|
65
65
|
const emitter = (0, _mitt.default)();
|
|
66
66
|
const looseToArray = (input)=>[].slice.call(input);
|
package/dist/esm/build/index.js
CHANGED
|
@@ -305,7 +305,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
|
305
305
|
try {
|
|
306
306
|
const nextBuildSpan = trace('next-build', undefined, {
|
|
307
307
|
buildMode: experimentalBuildMode,
|
|
308
|
-
version: "16.0.
|
|
308
|
+
version: "16.0.13"
|
|
309
309
|
});
|
|
310
310
|
NextBuildContext.nextBuildSpan = nextBuildSpan;
|
|
311
311
|
NextBuildContext.dir = dir;
|
|
@@ -818,7 +818,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
|
818
818
|
// Files outside of the distDir can be "type": "module"
|
|
819
819
|
await writeFileUtf8(path.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
|
820
820
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
|
821
|
-
await recordFrameworkVersion("16.0.
|
|
821
|
+
await recordFrameworkVersion("16.0.13");
|
|
822
822
|
await updateBuildDiagnostics({
|
|
823
823
|
buildStage: 'start'
|
|
824
824
|
});
|
|
@@ -2467,7 +2467,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
|
2467
2467
|
configOutDir: path.join(dir, configOutDir),
|
|
2468
2468
|
staticPages,
|
|
2469
2469
|
serverPropsPages,
|
|
2470
|
-
nextVersion: "16.0.
|
|
2470
|
+
nextVersion: "16.0.13",
|
|
2471
2471
|
tracingRoot: outputFileTracingRoot,
|
|
2472
2472
|
hasNodeMiddleware,
|
|
2473
2473
|
hasInstrumentationHook,
|
|
@@ -1610,7 +1610,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1610
1610
|
isClient && new CopyFilePlugin({
|
|
1611
1611
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1612
1612
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1613
|
-
cacheKey: "16.0.
|
|
1613
|
+
cacheKey: "16.0.13",
|
|
1614
1614
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1615
1615
|
minimize: false,
|
|
1616
1616
|
info: {
|
|
@@ -1801,7 +1801,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1801
1801
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1802
1802
|
// - Next.js version
|
|
1803
1803
|
// - next.config.js keys that affect compilation
|
|
1804
|
-
version: `${__dirname}|${"16.0.
|
|
1804
|
+
version: `${__dirname}|${"16.0.13"}|${configVars}`,
|
|
1805
1805
|
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
|
|
1806
1806
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1807
1807
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - next/script with `beforeInteractive` strategy
|
|
6
6
|
*/ import { getAssetPrefix } from './asset-prefix';
|
|
7
7
|
import { setAttributesFromProps } from './set-attributes-from-props';
|
|
8
|
-
const version = "16.0.
|
|
8
|
+
const version = "16.0.13";
|
|
9
9
|
window.next = {
|
|
10
10
|
version,
|
|
11
11
|
appDir: true
|
package/dist/esm/client/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
|
|
|
25
25
|
import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
|
|
26
26
|
import tracer from './tracing/tracer';
|
|
27
27
|
import { isNextRouterError } from './components/is-next-router-error';
|
|
28
|
-
export const version = "16.0.
|
|
28
|
+
export const version = "16.0.13";
|
|
29
29
|
export let router;
|
|
30
30
|
export const emitter = mitt();
|
|
31
31
|
const looseToArray = (input)=>[].slice.call(input);
|
|
@@ -1,12 +1,48 @@
|
|
|
1
1
|
import { existsSync, realpathSync } from 'fs';
|
|
2
2
|
import { resolveFrom } from './resolve-from';
|
|
3
3
|
import { dirname, join, relative } from 'path';
|
|
4
|
+
// Detect Bun runtime
|
|
5
|
+
const isBun = typeof globalThis.Bun !== 'undefined';
|
|
6
|
+
/**
|
|
7
|
+
* Try to resolve a package using require.resolve as a fallback for Bun
|
|
8
|
+
*/ function tryRequireResolve(baseDir, moduleId) {
|
|
9
|
+
try {
|
|
10
|
+
// Try standard require.resolve with paths option
|
|
11
|
+
return require.resolve(moduleId, {
|
|
12
|
+
paths: [
|
|
13
|
+
baseDir
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
} catch {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
4
20
|
export function hasNecessaryDependencies(baseDir, requiredPackages) {
|
|
5
21
|
let resolutions = new Map();
|
|
6
22
|
const missingPackages = [];
|
|
7
23
|
for (const p of requiredPackages){
|
|
8
24
|
try {
|
|
9
|
-
|
|
25
|
+
let pkgPath;
|
|
26
|
+
// Try resolveFrom first
|
|
27
|
+
try {
|
|
28
|
+
pkgPath = realpathSync(resolveFrom(baseDir, `${p.pkg}/package.json`));
|
|
29
|
+
} catch {
|
|
30
|
+
// Bun fallback: try require.resolve directly
|
|
31
|
+
if (isBun) {
|
|
32
|
+
const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`);
|
|
33
|
+
if (resolved) {
|
|
34
|
+
pkgPath = realpathSync(resolved);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// If still not found, throw to trigger missing package handling
|
|
39
|
+
if (!pkgPath) {
|
|
40
|
+
throw Object.defineProperty(new Error(`Could not resolve ${p.pkg}/package.json`), "__NEXT_ERROR_CODE", {
|
|
41
|
+
value: "E916",
|
|
42
|
+
enumerable: false,
|
|
43
|
+
configurable: true
|
|
44
|
+
});
|
|
45
|
+
}
|
|
10
46
|
const pkgDir = dirname(pkgPath);
|
|
11
47
|
resolutions.set(join(p.pkg, 'package.json'), pkgPath);
|
|
12
48
|
if (p.exportsRestrict) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\n// Detect Bun runtime\nconst isBun = typeof globalThis.Bun !== 'undefined'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\n/**\n * Try to resolve a package using require.resolve as a fallback for Bun\n */\nfunction tryRequireResolve(\n baseDir: string,\n moduleId: string\n): string | undefined {\n try {\n // Try standard require.resolve with paths option\n return require.resolve(moduleId, { paths: [baseDir] })\n } catch {\n return undefined\n }\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n let pkgPath: string | undefined\n\n // Try resolveFrom first\n try {\n pkgPath = realpathSync(\n resolveFrom(baseDir, `${p.pkg}/package.json`)\n )\n } catch {\n // Bun fallback: try require.resolve directly\n if (isBun) {\n const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`)\n if (resolved) {\n pkgPath = realpathSync(resolved)\n }\n }\n }\n\n // If still not found, throw to trigger missing package handling\n if (!pkgPath) {\n throw new Error(`Could not resolve ${p.pkg}/package.json`)\n }\n\n const pkgDir = dirname(pkgPath)\n\n resolutions.set(join(p.pkg, 'package.json'), pkgPath)\n\n if (p.exportsRestrict) {\n const fileNameToVerify = relative(p.pkg, p.file)\n if (fileNameToVerify) {\n const fileToVerify = join(pkgDir, fileNameToVerify)\n if (existsSync(fileToVerify)) {\n resolutions.set(p.pkg, fileToVerify)\n } else {\n missingPackages.push(p)\n continue\n }\n } else {\n resolutions.set(p.pkg, pkgPath)\n }\n } else {\n resolutions.set(p.pkg, resolveFrom(baseDir, p.file))\n }\n } catch (_) {\n missingPackages.push(p)\n continue\n }\n }\n\n return {\n resolved: resolutions,\n missing: missingPackages,\n }\n}\n"],"names":["existsSync","realpathSync","resolveFrom","dirname","join","relative","isBun","globalThis","Bun","tryRequireResolve","baseDir","moduleId","require","resolve","paths","undefined","hasNecessaryDependencies","requiredPackages","resolutions","Map","missingPackages","p","pkgPath","pkg","resolved","Error","pkgDir","set","exportsRestrict","fileNameToVerify","file","fileToVerify","push","_","missing"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,KAAI;AAC7C,SAASC,WAAW,QAAQ,iBAAgB;AAC5C,SAASC,OAAO,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,OAAM;AAE9C,qBAAqB;AACrB,MAAMC,QAAQ,OAAOC,WAAWC,GAAG,KAAK;AA6BxC;;CAEC,GACD,SAASC,kBACPC,OAAe,EACfC,QAAgB;IAEhB,IAAI;QACF,iDAAiD;QACjD,OAAOC,QAAQC,OAAO,CAACF,UAAU;YAAEG,OAAO;gBAACJ;aAAQ;QAAC;IACtD,EAAE,OAAM;QACN,OAAOK;IACT;AACF;AAEA,OAAO,SAASC,yBACdN,OAAe,EACfO,gBAAqC;IAErC,IAAIC,cAAc,IAAIC;IACtB,MAAMC,kBAAuC,EAAE;IAE/C,KAAK,MAAMC,KAAKJ,iBAAkB;QAChC,IAAI;YACF,IAAIK;YAEJ,wBAAwB;YACxB,IAAI;gBACFA,UAAUrB,aACRC,YAAYQ,SAAS,GAAGW,EAAEE,GAAG,CAAC,aAAa,CAAC;YAEhD,EAAE,OAAM;gBACN,6CAA6C;gBAC7C,IAAIjB,OAAO;oBACT,MAAMkB,WAAWf,kBAAkBC,SAAS,GAAGW,EAAEE,GAAG,CAAC,aAAa,CAAC;oBACnE,IAAIC,UAAU;wBACZF,UAAUrB,aAAauB;oBACzB;gBACF;YACF;YAEA,gEAAgE;YAChE,IAAI,CAACF,SAAS;gBACZ,MAAM,qBAAoD,CAApD,IAAIG,MAAM,CAAC,kBAAkB,EAAEJ,EAAEE,GAAG,CAAC,aAAa,CAAC,GAAnD,qBAAA;2BAAA;gCAAA;kCAAA;gBAAmD;YAC3D;YAEA,MAAMG,SAASvB,QAAQmB;YAEvBJ,YAAYS,GAAG,CAACvB,KAAKiB,EAAEE,GAAG,EAAE,iBAAiBD;YAE7C,IAAID,EAAEO,eAAe,EAAE;gBACrB,MAAMC,mBAAmBxB,SAASgB,EAAEE,GAAG,EAAEF,EAAES,IAAI;gBAC/C,IAAID,kBAAkB;oBACpB,MAAME,eAAe3B,KAAKsB,QAAQG;oBAClC,IAAI7B,WAAW+B,eAAe;wBAC5Bb,YAAYS,GAAG,CAACN,EAAEE,GAAG,EAAEQ;oBACzB,OAAO;wBACLX,gBAAgBY,IAAI,CAACX;wBACrB;oBACF;gBACF,OAAO;oBACLH,YAAYS,GAAG,CAACN,EAAEE,GAAG,EAAED;gBACzB;YACF,OAAO;gBACLJ,YAAYS,GAAG,CAACN,EAAEE,GAAG,EAAErB,YAAYQ,SAASW,EAAES,IAAI;YACpD;QACF,EAAE,OAAOG,GAAG;YACVb,gBAAgBY,IAAI,CAACX;YACrB;QACF;IACF;IAEA,OAAO;QACLG,UAAUN;QACVgB,SAASd;IACX;AACF","ignoreList":[0]}
|
|
@@ -163,7 +163,7 @@ export default class HotReloaderWebpack {
|
|
|
163
163
|
this.previewProps = previewProps;
|
|
164
164
|
this.rewrites = rewrites;
|
|
165
165
|
this.hotReloaderSpan = trace('hot-reloader', undefined, {
|
|
166
|
-
version: "16.0.
|
|
166
|
+
version: "16.0.13"
|
|
167
167
|
});
|
|
168
168
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
169
169
|
// of the current `next dev` invocation.
|
|
@@ -20,7 +20,7 @@ export function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures
|
|
|
20
20
|
if (parts.length > 0) {
|
|
21
21
|
versionSuffix = ` (${parts.join(', ')})`;
|
|
22
22
|
}
|
|
23
|
-
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.0.
|
|
23
|
+
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.0.13"}`))}${versionSuffix}`);
|
|
24
24
|
if (appUrl) {
|
|
25
25
|
Log.bootstrap(`- Local: ${appUrl}`);
|
|
26
26
|
}
|
|
@@ -110,7 +110,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
|
|
|
110
110
|
export async function startServer(serverOptions) {
|
|
111
111
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
|
112
112
|
let { port } = serverOptions;
|
|
113
|
-
process.title = `next-server (v${"16.0.
|
|
113
|
+
process.title = `next-server (v${"16.0.13"})`;
|
|
114
114
|
let handlersReady = ()=>{};
|
|
115
115
|
let handlersError = ()=>{};
|
|
116
116
|
let handlersPromise = new Promise((resolve, reject)=>{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function isStableBuild() {
|
|
2
|
-
return !"16.0.
|
|
2
|
+
return !"16.0.13"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
|
3
3
|
}
|
|
4
4
|
export class CanaryOnlyConfigError extends Error {
|
|
5
5
|
constructor(arg){
|
|
@@ -11,12 +11,48 @@ Object.defineProperty(exports, "hasNecessaryDependencies", {
|
|
|
11
11
|
const _fs = require("fs");
|
|
12
12
|
const _resolvefrom = require("./resolve-from");
|
|
13
13
|
const _path = require("path");
|
|
14
|
+
// Detect Bun runtime
|
|
15
|
+
const isBun = typeof globalThis.Bun !== 'undefined';
|
|
16
|
+
/**
|
|
17
|
+
* Try to resolve a package using require.resolve as a fallback for Bun
|
|
18
|
+
*/ function tryRequireResolve(baseDir, moduleId) {
|
|
19
|
+
try {
|
|
20
|
+
// Try standard require.resolve with paths option
|
|
21
|
+
return require.resolve(moduleId, {
|
|
22
|
+
paths: [
|
|
23
|
+
baseDir
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
} catch {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
14
30
|
function hasNecessaryDependencies(baseDir, requiredPackages) {
|
|
15
31
|
let resolutions = new Map();
|
|
16
32
|
const missingPackages = [];
|
|
17
33
|
for (const p of requiredPackages){
|
|
18
34
|
try {
|
|
19
|
-
|
|
35
|
+
let pkgPath;
|
|
36
|
+
// Try resolveFrom first
|
|
37
|
+
try {
|
|
38
|
+
pkgPath = (0, _fs.realpathSync)((0, _resolvefrom.resolveFrom)(baseDir, `${p.pkg}/package.json`));
|
|
39
|
+
} catch {
|
|
40
|
+
// Bun fallback: try require.resolve directly
|
|
41
|
+
if (isBun) {
|
|
42
|
+
const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`);
|
|
43
|
+
if (resolved) {
|
|
44
|
+
pkgPath = (0, _fs.realpathSync)(resolved);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// If still not found, throw to trigger missing package handling
|
|
49
|
+
if (!pkgPath) {
|
|
50
|
+
throw Object.defineProperty(new Error(`Could not resolve ${p.pkg}/package.json`), "__NEXT_ERROR_CODE", {
|
|
51
|
+
value: "E916",
|
|
52
|
+
enumerable: false,
|
|
53
|
+
configurable: true
|
|
54
|
+
});
|
|
55
|
+
}
|
|
20
56
|
const pkgDir = (0, _path.dirname)(pkgPath);
|
|
21
57
|
resolutions.set((0, _path.join)(p.pkg, 'package.json'), pkgPath);
|
|
22
58
|
if (p.exportsRestrict) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n
|
|
1
|
+
{"version":3,"sources":["../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\n// Detect Bun runtime\nconst isBun = typeof globalThis.Bun !== 'undefined'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\n/**\n * Try to resolve a package using require.resolve as a fallback for Bun\n */\nfunction tryRequireResolve(\n baseDir: string,\n moduleId: string\n): string | undefined {\n try {\n // Try standard require.resolve with paths option\n return require.resolve(moduleId, { paths: [baseDir] })\n } catch {\n return undefined\n }\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n let pkgPath: string | undefined\n\n // Try resolveFrom first\n try {\n pkgPath = realpathSync(\n resolveFrom(baseDir, `${p.pkg}/package.json`)\n )\n } catch {\n // Bun fallback: try require.resolve directly\n if (isBun) {\n const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`)\n if (resolved) {\n pkgPath = realpathSync(resolved)\n }\n }\n }\n\n // If still not found, throw to trigger missing package handling\n if (!pkgPath) {\n throw new Error(`Could not resolve ${p.pkg}/package.json`)\n }\n\n const pkgDir = dirname(pkgPath)\n\n resolutions.set(join(p.pkg, 'package.json'), pkgPath)\n\n if (p.exportsRestrict) {\n const fileNameToVerify = relative(p.pkg, p.file)\n if (fileNameToVerify) {\n const fileToVerify = join(pkgDir, fileNameToVerify)\n if (existsSync(fileToVerify)) {\n resolutions.set(p.pkg, fileToVerify)\n } else {\n missingPackages.push(p)\n continue\n }\n } else {\n resolutions.set(p.pkg, pkgPath)\n }\n } else {\n resolutions.set(p.pkg, resolveFrom(baseDir, p.file))\n }\n } catch (_) {\n missingPackages.push(p)\n continue\n }\n }\n\n return {\n resolved: resolutions,\n missing: missingPackages,\n }\n}\n"],"names":["hasNecessaryDependencies","isBun","globalThis","Bun","tryRequireResolve","baseDir","moduleId","require","resolve","paths","undefined","requiredPackages","resolutions","Map","missingPackages","p","pkgPath","realpathSync","resolveFrom","pkg","resolved","Error","pkgDir","dirname","set","join","exportsRestrict","fileNameToVerify","relative","file","fileToVerify","existsSync","push","_","missing"],"mappings":";;;;+BAiDgBA;;;eAAAA;;;oBAjDyB;6BACb;sBACY;AAExC,qBAAqB;AACrB,MAAMC,QAAQ,OAAOC,WAAWC,GAAG,KAAK;AA6BxC;;CAEC,GACD,SAASC,kBACPC,OAAe,EACfC,QAAgB;IAEhB,IAAI;QACF,iDAAiD;QACjD,OAAOC,QAAQC,OAAO,CAACF,UAAU;YAAEG,OAAO;gBAACJ;aAAQ;QAAC;IACtD,EAAE,OAAM;QACN,OAAOK;IACT;AACF;AAEO,SAASV,yBACdK,OAAe,EACfM,gBAAqC;IAErC,IAAIC,cAAc,IAAIC;IACtB,MAAMC,kBAAuC,EAAE;IAE/C,KAAK,MAAMC,KAAKJ,iBAAkB;QAChC,IAAI;YACF,IAAIK;YAEJ,wBAAwB;YACxB,IAAI;gBACFA,UAAUC,IAAAA,gBAAY,EACpBC,IAAAA,wBAAW,EAACb,SAAS,GAAGU,EAAEI,GAAG,CAAC,aAAa,CAAC;YAEhD,EAAE,OAAM;gBACN,6CAA6C;gBAC7C,IAAIlB,OAAO;oBACT,MAAMmB,WAAWhB,kBAAkBC,SAAS,GAAGU,EAAEI,GAAG,CAAC,aAAa,CAAC;oBACnE,IAAIC,UAAU;wBACZJ,UAAUC,IAAAA,gBAAY,EAACG;oBACzB;gBACF;YACF;YAEA,gEAAgE;YAChE,IAAI,CAACJ,SAAS;gBACZ,MAAM,qBAAoD,CAApD,IAAIK,MAAM,CAAC,kBAAkB,EAAEN,EAAEI,GAAG,CAAC,aAAa,CAAC,GAAnD,qBAAA;2BAAA;gCAAA;kCAAA;gBAAmD;YAC3D;YAEA,MAAMG,SAASC,IAAAA,aAAO,EAACP;YAEvBJ,YAAYY,GAAG,CAACC,IAAAA,UAAI,EAACV,EAAEI,GAAG,EAAE,iBAAiBH;YAE7C,IAAID,EAAEW,eAAe,EAAE;gBACrB,MAAMC,mBAAmBC,IAAAA,cAAQ,EAACb,EAAEI,GAAG,EAAEJ,EAAEc,IAAI;gBAC/C,IAAIF,kBAAkB;oBACpB,MAAMG,eAAeL,IAAAA,UAAI,EAACH,QAAQK;oBAClC,IAAII,IAAAA,cAAU,EAACD,eAAe;wBAC5BlB,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAEW;oBACzB,OAAO;wBACLhB,gBAAgBkB,IAAI,CAACjB;wBACrB;oBACF;gBACF,OAAO;oBACLH,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAEH;gBACzB;YACF,OAAO;gBACLJ,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAED,IAAAA,wBAAW,EAACb,SAASU,EAAEc,IAAI;YACpD;QACF,EAAE,OAAOI,GAAG;YACVnB,gBAAgBkB,IAAI,CAACjB;YACrB;QACF;IACF;IAEA,OAAO;QACLK,UAAUR;QACVsB,SAASpB;IACX;AACF","ignoreList":[0]}
|
|
@@ -231,7 +231,7 @@ class HotReloaderWebpack {
|
|
|
231
231
|
this.previewProps = previewProps;
|
|
232
232
|
this.rewrites = rewrites;
|
|
233
233
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
234
|
-
version: "16.0.
|
|
234
|
+
version: "16.0.13"
|
|
235
235
|
});
|
|
236
236
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
237
237
|
// of the current `next dev` invocation.
|
|
@@ -88,7 +88,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, logBu
|
|
|
88
88
|
if (parts.length > 0) {
|
|
89
89
|
versionSuffix = ` (${parts.join(', ')})`;
|
|
90
90
|
}
|
|
91
|
-
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.
|
|
91
|
+
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.13"}`))}${versionSuffix}`);
|
|
92
92
|
if (appUrl) {
|
|
93
93
|
_log.bootstrap(`- Local: ${appUrl}`);
|
|
94
94
|
}
|
|
@@ -178,7 +178,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
|
|
|
178
178
|
async function startServer(serverOptions) {
|
|
179
179
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
|
180
180
|
let { port } = serverOptions;
|
|
181
|
-
process.title = `next-server (v${"16.0.
|
|
181
|
+
process.title = `next-server (v${"16.0.13"})`;
|
|
182
182
|
let handlersReady = ()=>{};
|
|
183
183
|
let handlersError = ()=>{};
|
|
184
184
|
let handlersPromise = new Promise((resolve, reject)=>{
|
|
@@ -21,7 +21,7 @@ _export(exports, {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
function isStableBuild() {
|
|
24
|
-
return !"16.0.
|
|
24
|
+
return !"16.0.13"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
|
25
25
|
}
|
|
26
26
|
class CanaryOnlyConfigError extends Error {
|
|
27
27
|
constructor(arg){
|
|
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
|
|
|
11
11
|
const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
|
|
12
12
|
function eventCliSessionStopped(event) {
|
|
13
13
|
// This should be an invariant, if it fails our build tooling is broken.
|
|
14
|
-
if (typeof "16.0.
|
|
14
|
+
if (typeof "16.0.13" !== 'string') {
|
|
15
15
|
return [];
|
|
16
16
|
}
|
|
17
17
|
const payload = {
|
|
18
|
-
nextVersion: "16.0.
|
|
18
|
+
nextVersion: "16.0.13",
|
|
19
19
|
nodeVersion: process.version,
|
|
20
20
|
cliCommand: event.cliCommand,
|
|
21
21
|
durationMilliseconds: event.durationMilliseconds,
|
|
@@ -12,12 +12,12 @@ const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
|
|
|
12
12
|
function eventCliSession(nextConfig, event) {
|
|
13
13
|
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_reactCompiler, _nextConfig_reactCompiler1;
|
|
14
14
|
// This should be an invariant, if it fails our build tooling is broken.
|
|
15
|
-
if (typeof "16.0.
|
|
15
|
+
if (typeof "16.0.13" !== 'string') {
|
|
16
16
|
return [];
|
|
17
17
|
}
|
|
18
18
|
const { images, i18n } = nextConfig || {};
|
|
19
19
|
const payload = {
|
|
20
|
-
nextVersion: "16.0.
|
|
20
|
+
nextVersion: "16.0.13",
|
|
21
21
|
nodeVersion: process.version,
|
|
22
22
|
cliCommand: event.cliCommand,
|
|
23
23
|
isSrcDir: event.isSrcDir,
|