@openuiai/next 16.0.3 → 16.0.4

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 (33) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +3 -3
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/webpack-config.js +2 -2
  5. package/dist/client/app-bootstrap.js +1 -1
  6. package/dist/client/index.js +1 -1
  7. package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
  8. package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
  9. package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
  10. package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
  11. package/dist/compiled/next-server/server.runtime.prod.js +6 -6
  12. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  13. package/dist/esm/build/index.js +3 -3
  14. package/dist/esm/build/swc/index.js +1 -1
  15. package/dist/esm/build/webpack-config.js +2 -2
  16. package/dist/esm/client/app-bootstrap.js +1 -1
  17. package/dist/esm/client/index.js +1 -1
  18. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  19. package/dist/esm/server/lib/app-info-log.js +1 -1
  20. package/dist/esm/server/lib/start-server.js +1 -1
  21. package/dist/esm/server/require-hook.js +23 -21
  22. package/dist/esm/server/require-hook.js.map +1 -1
  23. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  24. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  25. package/dist/server/lib/app-info-log.js +1 -1
  26. package/dist/server/lib/start-server.js +1 -1
  27. package/dist/server/require-hook.js +23 -21
  28. package/dist/server/require-hook.js.map +1 -1
  29. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  30. package/dist/telemetry/anonymous-meta.js +1 -1
  31. package/dist/telemetry/events/session-stopped.js +2 -2
  32. package/dist/telemetry/events/version.js +2 -2
  33. package/package.json +1 -1
@@ -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.3"
308
+ version: "16.0.4"
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.3");
821
+ await recordFrameworkVersion("16.0.4");
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.3",
2470
+ nextVersion: "16.0.4",
2471
2471
  tracingRoot: outputFileTracingRoot,
2472
2472
  hasNodeMiddleware,
2473
2473
  hasInstrumentationHook,
@@ -8,7 +8,7 @@ import { eventSwcLoadFailure } from '../../telemetry/events/swc-load-failure';
8
8
  import { patchIncorrectLockfile } from '../../lib/patch-incorrect-lockfile';
9
9
  import { downloadNativeNextSwc, downloadWasmSwc } from '../../lib/download-swc';
10
10
  import { getDefineEnv } from '../define-env';
11
- const nextVersion = "16.0.3";
11
+ const nextVersion = "16.0.4";
12
12
  const ArchName = arch();
13
13
  const PlatformName = platform();
14
14
  function infoLog(...args) {
@@ -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.3",
1613
+ cacheKey: "16.0.4",
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.3"}|${configVars}`,
1804
+ version: `${__dirname}|${"16.0.4"}|${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.3";
8
+ const version = "16.0.4";
9
9
  window.next = {
10
10
  version,
11
11
  appDir: true
@@ -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.3";
28
+ export const version = "16.0.4";
29
29
  export let router;
30
30
  export const emitter = mitt();
31
31
  const looseToArray = (input)=>[].slice.call(input);
@@ -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.3"
166
+ version: "16.0.4"
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.3"}`))}${versionSuffix}`);
23
+ Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.0.4"}`))}${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.3"})`;
113
+ process.title = `next-server (v${"16.0.4"})`;
114
114
  let handlersReady = ()=>{};
115
115
  let handlersError = ()=>{};
116
116
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -2,6 +2,9 @@
2
2
  // This is needed for userland plugins to attach to the same webpack instance as Next.js'.
3
3
  // Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.
4
4
  // This module will only be loaded once per process.
5
+ // Skip module hooks on Bun - Bun's module system handles things differently
6
+ // and these hooks cause issues with undefined requests
7
+ const isBun = typeof globalThis.Bun !== 'undefined';
5
8
  const path = require('path');
6
9
  const mod = require('module');
7
10
  const originalRequire = mod.prototype.require;
@@ -28,26 +31,25 @@ export function addHookAliases(aliases = []) {
28
31
  }
29
32
  }
30
33
  addHookAliases(toResolveMap(defaultOverrides));
31
- // @ts-expect-error
32
- mod._resolveFilename = (function(originalResolveFilename, requestMap, request, parent, isMain, options) {
33
- // Guard against non-string requests (can happen in Bun)
34
- if (typeof request !== 'string') {
35
- return request;
36
- }
37
- const hookResolved = requestMap.get(request);
38
- if (hookResolved) request = hookResolved;
39
- return originalResolveFilename.call(mod, request, parent, isMain, options);
40
- // We use `bind` here to avoid referencing outside variables to create potential memory leaks.
41
- }).bind(null, resolveFilename, hookPropertyMap);
42
- // @ts-expect-error
43
- // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
44
- // that needs to point to the rendering runtime version, it will point to the correct one.
45
- // This can happen on `pages` when a user requires a dependency that uses next/image for example.
46
- mod.prototype.require = function(request) {
47
- if (typeof request === 'string' && request.endsWith('.shared-runtime')) {
48
- return originalRequire.call(this, `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(request, '.shared-runtime')}`);
49
- }
50
- return originalRequire.call(this, request);
51
- };
34
+ // Only apply module hooks on Node.js - Bun's module system handles things differently
35
+ if (!isBun) {
36
+ // @ts-expect-error
37
+ mod._resolveFilename = (function(originalResolveFilename, requestMap, request, parent, isMain, options) {
38
+ const hookResolved = requestMap.get(request);
39
+ if (hookResolved) request = hookResolved;
40
+ return originalResolveFilename.call(mod, request, parent, isMain, options);
41
+ // We use `bind` here to avoid referencing outside variables to create potential memory leaks.
42
+ }).bind(null, resolveFilename, hookPropertyMap);
43
+ // @ts-expect-error
44
+ // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
45
+ // that needs to point to the rendering runtime version, it will point to the correct one.
46
+ // This can happen on `pages` when a user requires a dependency that uses next/image for example.
47
+ mod.prototype.require = function(request) {
48
+ if (typeof request === 'string' && request.endsWith('.shared-runtime')) {
49
+ return originalRequire.call(this, `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(request, '.shared-runtime')}`);
50
+ }
51
+ return originalRequire.call(this, request);
52
+ };
53
+ }
52
54
 
53
55
  //# sourceMappingURL=require-hook.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/require-hook.ts"],"sourcesContent":["// Synchronously inject a require hook for webpack and webpack/. It's required to use the internal ncc webpack version.\n// This is needed for userland plugins to attach to the same webpack instance as Next.js'.\n// Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.\n\n// This module will only be loaded once per process.\nconst path = require('path') as typeof import('path')\nconst mod = require('module') as typeof import('module')\nconst originalRequire = mod.prototype.require\nconst resolveFilename =\n // @ts-expect-error\n mod._resolveFilename\n\nlet resolve: typeof require.resolve = process.env.NEXT_MINIMAL\n ? // @ts-ignore\n __non_webpack_require__.resolve\n : require.resolve\n\nexport const hookPropertyMap = new Map()\n\nexport const defaultOverrides = {\n 'styled-jsx': path.dirname(resolve('styled-jsx/package.json')),\n 'styled-jsx/style': resolve('styled-jsx/style'),\n 'styled-jsx/style.js': resolve('styled-jsx/style'),\n // Alias react and react-dom to the compiled versions to ensure consistency\n // across the entire build process. This prevents multiple React instances.\n react: path.dirname(resolve('next/dist/compiled/react/package.json')),\n 'react-dom': path.dirname(\n resolve('next/dist/compiled/react-dom/package.json')\n ),\n}\n\nconst toResolveMap = (map: Record<string, string>): [string, string][] =>\n Object.entries(map).map(([key, value]) => [key, resolve(value)])\n\nexport function addHookAliases(aliases: [string, string][] = []) {\n for (const [key, value] of aliases) {\n hookPropertyMap.set(key, value)\n }\n}\n\naddHookAliases(toResolveMap(defaultOverrides))\n\n// @ts-expect-error\nmod._resolveFilename = function (\n originalResolveFilename: (\n request: string,\n parent: string,\n isMain: boolean,\n opts: any\n ) => string,\n requestMap: Map<string, string>,\n request: string,\n parent: string,\n isMain: boolean,\n options: any\n) {\n // Guard against non-string requests (can happen in Bun)\n if (typeof request !== 'string') {\n return request\n }\n const hookResolved = requestMap.get(request)\n if (hookResolved) request = hookResolved\n\n return originalResolveFilename.call(mod, request, parent, isMain, options)\n\n // We use `bind` here to avoid referencing outside variables to create potential memory leaks.\n}.bind(null, resolveFilename, hookPropertyMap)\n\n// @ts-expect-error\n// This is a hack to make sure that if a user requires a Next.js module that wasn't bundled\n// that needs to point to the rendering runtime version, it will point to the correct one.\n// This can happen on `pages` when a user requires a dependency that uses next/image for example.\nmod.prototype.require = function (request: string) {\n if (typeof request === 'string' && request.endsWith('.shared-runtime')) {\n return originalRequire.call(\n this,\n `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(\n request,\n '.shared-runtime'\n )}`\n )\n }\n\n return originalRequire.call(this, request)\n}\n"],"names":["path","require","mod","originalRequire","prototype","resolveFilename","_resolveFilename","resolve","process","env","NEXT_MINIMAL","__non_webpack_require__","hookPropertyMap","Map","defaultOverrides","dirname","react","toResolveMap","map","Object","entries","key","value","addHookAliases","aliases","set","originalResolveFilename","requestMap","request","parent","isMain","options","hookResolved","get","call","bind","endsWith","basename"],"mappings":"AAAA,uHAAuH;AACvH,0FAA0F;AAC1F,kGAAkG;AAElG,oDAAoD;AACpD,MAAMA,OAAOC,QAAQ;AACrB,MAAMC,MAAMD,QAAQ;AACpB,MAAME,kBAAkBD,IAAIE,SAAS,CAACH,OAAO;AAC7C,MAAMI,kBACJ,mBAAmB;AACnBH,IAAII,gBAAgB;AAEtB,IAAIC,UAAkCC,QAAQC,GAAG,CAACC,YAAY,GAE1DC,wBAAwBJ,OAAO,GAC/BN,QAAQM,OAAO;AAEnB,OAAO,MAAMK,kBAAkB,IAAIC,MAAK;AAExC,OAAO,MAAMC,mBAAmB;IAC9B,cAAcd,KAAKe,OAAO,CAACR,QAAQ;IACnC,oBAAoBA,QAAQ;IAC5B,uBAAuBA,QAAQ;IAC/B,2EAA2E;IAC3E,2EAA2E;IAC3ES,OAAOhB,KAAKe,OAAO,CAACR,QAAQ;IAC5B,aAAaP,KAAKe,OAAO,CACvBR,QAAQ;AAEZ,EAAC;AAED,MAAMU,eAAe,CAACC,MACpBC,OAAOC,OAAO,CAACF,KAAKA,GAAG,CAAC,CAAC,CAACG,KAAKC,MAAM,GAAK;YAACD;YAAKd,QAAQe;SAAO;AAEjE,OAAO,SAASC,eAAeC,UAA8B,EAAE;IAC7D,KAAK,MAAM,CAACH,KAAKC,MAAM,IAAIE,QAAS;QAClCZ,gBAAgBa,GAAG,CAACJ,KAAKC;IAC3B;AACF;AAEAC,eAAeN,aAAaH;AAE5B,mBAAmB;AACnBZ,IAAII,gBAAgB,GAAG,CAAA,SACrBoB,uBAKW,EACXC,UAA+B,EAC/BC,OAAe,EACfC,MAAc,EACdC,MAAe,EACfC,OAAY;IAEZ,wDAAwD;IACxD,IAAI,OAAOH,YAAY,UAAU;QAC/B,OAAOA;IACT;IACA,MAAMI,eAAeL,WAAWM,GAAG,CAACL;IACpC,IAAII,cAAcJ,UAAUI;IAE5B,OAAON,wBAAwBQ,IAAI,CAAChC,KAAK0B,SAASC,QAAQC,QAAQC;AAElE,8FAA8F;AAChG,CAAA,EAAEI,IAAI,CAAC,MAAM9B,iBAAiBO;AAE9B,mBAAmB;AACnB,2FAA2F;AAC3F,0FAA0F;AAC1F,iGAAiG;AACjGV,IAAIE,SAAS,CAACH,OAAO,GAAG,SAAU2B,OAAe;IAC/C,IAAI,OAAOA,YAAY,YAAYA,QAAQQ,QAAQ,CAAC,oBAAoB;QACtE,OAAOjC,gBAAgB+B,IAAI,CACzB,IAAI,EACJ,CAAC,uDAAuD,EAAElC,KAAKqC,QAAQ,CACrET,SACA,oBACC;IAEP;IAEA,OAAOzB,gBAAgB+B,IAAI,CAAC,IAAI,EAAEN;AACpC","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../src/server/require-hook.ts"],"sourcesContent":["// Synchronously inject a require hook for webpack and webpack/. It's required to use the internal ncc webpack version.\n// This is needed for userland plugins to attach to the same webpack instance as Next.js'.\n// Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.\n\n// This module will only be loaded once per process.\n\n// Skip module hooks on Bun - Bun's module system handles things differently\n// and these hooks cause issues with undefined requests\nconst isBun = typeof globalThis.Bun !== 'undefined'\n\nconst path = require('path') as typeof import('path')\nconst mod = require('module') as typeof import('module')\nconst originalRequire = mod.prototype.require\nconst resolveFilename =\n // @ts-expect-error\n mod._resolveFilename\n\nlet resolve: typeof require.resolve = process.env.NEXT_MINIMAL\n ? // @ts-ignore\n __non_webpack_require__.resolve\n : require.resolve\n\nexport const hookPropertyMap = new Map()\n\nexport const defaultOverrides = {\n 'styled-jsx': path.dirname(resolve('styled-jsx/package.json')),\n 'styled-jsx/style': resolve('styled-jsx/style'),\n 'styled-jsx/style.js': resolve('styled-jsx/style'),\n // Alias react and react-dom to the compiled versions to ensure consistency\n // across the entire build process. This prevents multiple React instances.\n react: path.dirname(resolve('next/dist/compiled/react/package.json')),\n 'react-dom': path.dirname(\n resolve('next/dist/compiled/react-dom/package.json')\n ),\n}\n\nconst toResolveMap = (map: Record<string, string>): [string, string][] =>\n Object.entries(map).map(([key, value]) => [key, resolve(value)])\n\nexport function addHookAliases(aliases: [string, string][] = []) {\n for (const [key, value] of aliases) {\n hookPropertyMap.set(key, value)\n }\n}\n\naddHookAliases(toResolveMap(defaultOverrides))\n\n// Only apply module hooks on Node.js - Bun's module system handles things differently\nif (!isBun) {\n // @ts-expect-error\n mod._resolveFilename = function (\n originalResolveFilename: (\n request: string,\n parent: string,\n isMain: boolean,\n opts: any\n ) => string,\n requestMap: Map<string, string>,\n request: string,\n parent: string,\n isMain: boolean,\n options: any\n ) {\n const hookResolved = requestMap.get(request)\n if (hookResolved) request = hookResolved\n\n return originalResolveFilename.call(mod, request, parent, isMain, options)\n\n // We use `bind` here to avoid referencing outside variables to create potential memory leaks.\n }.bind(null, resolveFilename, hookPropertyMap)\n\n // @ts-expect-error\n // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled\n // that needs to point to the rendering runtime version, it will point to the correct one.\n // This can happen on `pages` when a user requires a dependency that uses next/image for example.\n mod.prototype.require = function (request: string) {\n if (typeof request === 'string' && request.endsWith('.shared-runtime')) {\n return originalRequire.call(\n this,\n `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(\n request,\n '.shared-runtime'\n )}`\n )\n }\n\n return originalRequire.call(this, request)\n }\n}\n"],"names":["isBun","globalThis","Bun","path","require","mod","originalRequire","prototype","resolveFilename","_resolveFilename","resolve","process","env","NEXT_MINIMAL","__non_webpack_require__","hookPropertyMap","Map","defaultOverrides","dirname","react","toResolveMap","map","Object","entries","key","value","addHookAliases","aliases","set","originalResolveFilename","requestMap","request","parent","isMain","options","hookResolved","get","call","bind","endsWith","basename"],"mappings":"AAAA,uHAAuH;AACvH,0FAA0F;AAC1F,kGAAkG;AAElG,oDAAoD;AAEpD,4EAA4E;AAC5E,uDAAuD;AACvD,M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;IAE9B,mBAAmB;IACnB,2FAA2F;IAC3F,0FAA0F;IAC1F,iGAAiG;IACjGV,IAAIE,SAAS,CAACH,OAAO,GAAG,SAAU2B,OAAe;QAC/C,IAAI,OAAOA,YAAY,YAAYA,QAAQQ,QAAQ,CAAC,oBAAoB;YACtE,OAAOjC,gBAAgB+B,IAAI,CACzB,IAAI,EACJ,CAAC,uDAAuD,EAAElC,KAAKqC,QAAQ,CACrET,SACA,oBACC;QAEP;QAEA,OAAOzB,gBAAgB+B,IAAI,CAAC,IAAI,EAAEN;IACpC;AACF","ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  export function isStableBuild() {
2
- return !"16.0.3"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
2
+ return !"16.0.4"?.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){
@@ -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.3"
234
+ version: "16.0.4"
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.3"}`))}${versionSuffix}`);
91
+ _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.4"}`))}${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.3"})`;
181
+ process.title = `next-server (v${"16.0.4"})`;
182
182
  let handlersReady = ()=>{};
183
183
  let handlersError = ()=>{};
184
184
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -2,6 +2,8 @@
2
2
  // This is needed for userland plugins to attach to the same webpack instance as Next.js'.
3
3
  // Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.
4
4
  // This module will only be loaded once per process.
5
+ // Skip module hooks on Bun - Bun's module system handles things differently
6
+ // and these hooks cause issues with undefined requests
5
7
  "use strict";
6
8
  Object.defineProperty(exports, "__esModule", {
7
9
  value: true
@@ -28,6 +30,7 @@ _export(exports, {
28
30
  return hookPropertyMap;
29
31
  }
30
32
  });
33
+ const isBun = typeof globalThis.Bun !== 'undefined';
31
34
  const path = require('path');
32
35
  const mod = require('module');
33
36
  const originalRequire = mod.prototype.require;
@@ -54,26 +57,25 @@ function addHookAliases(aliases = []) {
54
57
  }
55
58
  }
56
59
  addHookAliases(toResolveMap(defaultOverrides));
57
- // @ts-expect-error
58
- mod._resolveFilename = (function(originalResolveFilename, requestMap, request, parent, isMain, options) {
59
- // Guard against non-string requests (can happen in Bun)
60
- if (typeof request !== 'string') {
61
- return request;
62
- }
63
- const hookResolved = requestMap.get(request);
64
- if (hookResolved) request = hookResolved;
65
- return originalResolveFilename.call(mod, request, parent, isMain, options);
66
- // We use `bind` here to avoid referencing outside variables to create potential memory leaks.
67
- }).bind(null, resolveFilename, hookPropertyMap);
68
- // @ts-expect-error
69
- // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
70
- // that needs to point to the rendering runtime version, it will point to the correct one.
71
- // This can happen on `pages` when a user requires a dependency that uses next/image for example.
72
- mod.prototype.require = function(request) {
73
- if (typeof request === 'string' && request.endsWith('.shared-runtime')) {
74
- return originalRequire.call(this, `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(request, '.shared-runtime')}`);
75
- }
76
- return originalRequire.call(this, request);
77
- };
60
+ // Only apply module hooks on Node.js - Bun's module system handles things differently
61
+ if (!isBun) {
62
+ // @ts-expect-error
63
+ mod._resolveFilename = (function(originalResolveFilename, requestMap, request, parent, isMain, options) {
64
+ const hookResolved = requestMap.get(request);
65
+ if (hookResolved) request = hookResolved;
66
+ return originalResolveFilename.call(mod, request, parent, isMain, options);
67
+ // We use `bind` here to avoid referencing outside variables to create potential memory leaks.
68
+ }).bind(null, resolveFilename, hookPropertyMap);
69
+ // @ts-expect-error
70
+ // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
71
+ // that needs to point to the rendering runtime version, it will point to the correct one.
72
+ // This can happen on `pages` when a user requires a dependency that uses next/image for example.
73
+ mod.prototype.require = function(request) {
74
+ if (typeof request === 'string' && request.endsWith('.shared-runtime')) {
75
+ return originalRequire.call(this, `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(request, '.shared-runtime')}`);
76
+ }
77
+ return originalRequire.call(this, request);
78
+ };
79
+ }
78
80
 
79
81
  //# sourceMappingURL=require-hook.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/server/require-hook.ts"],"sourcesContent":["// Synchronously inject a require hook for webpack and webpack/. It's required to use the internal ncc webpack version.\n// This is needed for userland plugins to attach to the same webpack instance as Next.js'.\n// Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.\n\n// This module will only be loaded once per process.\nconst path = require('path') as typeof import('path')\nconst mod = require('module') as typeof import('module')\nconst originalRequire = mod.prototype.require\nconst resolveFilename =\n // @ts-expect-error\n mod._resolveFilename\n\nlet resolve: typeof require.resolve = process.env.NEXT_MINIMAL\n ? // @ts-ignore\n __non_webpack_require__.resolve\n : require.resolve\n\nexport const hookPropertyMap = new Map()\n\nexport const defaultOverrides = {\n 'styled-jsx': path.dirname(resolve('styled-jsx/package.json')),\n 'styled-jsx/style': resolve('styled-jsx/style'),\n 'styled-jsx/style.js': resolve('styled-jsx/style'),\n // Alias react and react-dom to the compiled versions to ensure consistency\n // across the entire build process. This prevents multiple React instances.\n react: path.dirname(resolve('next/dist/compiled/react/package.json')),\n 'react-dom': path.dirname(\n resolve('next/dist/compiled/react-dom/package.json')\n ),\n}\n\nconst toResolveMap = (map: Record<string, string>): [string, string][] =>\n Object.entries(map).map(([key, value]) => [key, resolve(value)])\n\nexport function addHookAliases(aliases: [string, string][] = []) {\n for (const [key, value] of aliases) {\n hookPropertyMap.set(key, value)\n }\n}\n\naddHookAliases(toResolveMap(defaultOverrides))\n\n// @ts-expect-error\nmod._resolveFilename = function (\n originalResolveFilename: (\n request: string,\n parent: string,\n isMain: boolean,\n opts: any\n ) => string,\n requestMap: Map<string, string>,\n request: string,\n parent: string,\n isMain: boolean,\n options: any\n) {\n // Guard against non-string requests (can happen in Bun)\n if (typeof request !== 'string') {\n return request\n }\n const hookResolved = requestMap.get(request)\n if (hookResolved) request = hookResolved\n\n return originalResolveFilename.call(mod, request, parent, isMain, options)\n\n // We use `bind` here to avoid referencing outside variables to create potential memory leaks.\n}.bind(null, resolveFilename, hookPropertyMap)\n\n// @ts-expect-error\n// This is a hack to make sure that if a user requires a Next.js module that wasn't bundled\n// that needs to point to the rendering runtime version, it will point to the correct one.\n// This can happen on `pages` when a user requires a dependency that uses next/image for example.\nmod.prototype.require = function (request: string) {\n if (typeof request === 'string' && request.endsWith('.shared-runtime')) {\n return originalRequire.call(\n this,\n `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(\n request,\n '.shared-runtime'\n )}`\n )\n }\n\n return originalRequire.call(this, request)\n}\n"],"names":["addHookAliases","defaultOverrides","hookPropertyMap","path","require","mod","originalRequire","prototype","resolveFilename","_resolveFilename","resolve","process","env","NEXT_MINIMAL","__non_webpack_require__","Map","dirname","react","toResolveMap","map","Object","entries","key","value","aliases","set","originalResolveFilename","requestMap","request","parent","isMain","options","hookResolved","get","call","bind","endsWith","basename"],"mappings":"AAAA,uHAAuH;AACvH,0FAA0F;AAC1F,kGAAkG;AAElG,oDAAoD;;;;;;;;;;;;;;;;;IA8BpCA,cAAc;eAAdA;;IAfHC,gBAAgB;eAAhBA;;IAFAC,eAAe;eAAfA;;;AAZb,MAAMC,OAAOC,QAAQ;AACrB,MAAMC,MAAMD,QAAQ;AACpB,MAAME,kBAAkBD,IAAIE,SAAS,CAACH,OAAO;AAC7C,MAAMI,kBACJ,mBAAmB;AACnBH,IAAII,gBAAgB;AAEtB,IAAIC,UAAkCC,QAAQC,GAAG,CAACC,YAAY,GAE1DC,wBAAwBJ,OAAO,GAC/BN,QAAQM,OAAO;AAEZ,MAAMR,kBAAkB,IAAIa;AAE5B,MAAMd,mBAAmB;IAC9B,cAAcE,KAAKa,OAAO,CAACN,QAAQ;IACnC,oBAAoBA,QAAQ;IAC5B,uBAAuBA,QAAQ;IAC/B,2EAA2E;IAC3E,2EAA2E;IAC3EO,OAAOd,KAAKa,OAAO,CAACN,QAAQ;IAC5B,aAAaP,KAAKa,OAAO,CACvBN,QAAQ;AAEZ;AAEA,MAAMQ,eAAe,CAACC,MACpBC,OAAOC,OAAO,CAACF,KAAKA,GAAG,CAAC,CAAC,CAACG,KAAKC,MAAM,GAAK;YAACD;YAAKZ,QAAQa;SAAO;AAE1D,SAASvB,eAAewB,UAA8B,EAAE;IAC7D,KAAK,MAAM,CAACF,KAAKC,MAAM,IAAIC,QAAS;QAClCtB,gBAAgBuB,GAAG,CAACH,KAAKC;IAC3B;AACF;AAEAvB,eAAekB,aAAajB;AAE5B,mBAAmB;AACnBI,IAAII,gBAAgB,GAAG,CAAA,SACrBiB,uBAKW,EACXC,UAA+B,EAC/BC,OAAe,EACfC,MAAc,EACdC,MAAe,EACfC,OAAY;IAEZ,wDAAwD;IACxD,IAAI,OAAOH,YAAY,UAAU;QAC/B,OAAOA;IACT;IACA,MAAMI,eAAeL,WAAWM,GAAG,CAACL;IACpC,IAAII,cAAcJ,UAAUI;IAE5B,OAAON,wBAAwBQ,IAAI,CAAC7B,KAAKuB,SAASC,QAAQC,QAAQC;AAElE,8FAA8F;AAChG,CAAA,EAAEI,IAAI,CAAC,MAAM3B,iBAAiBN;AAE9B,mBAAmB;AACnB,2FAA2F;AAC3F,0FAA0F;AAC1F,iGAAiG;AACjGG,IAAIE,SAAS,CAACH,OAAO,GAAG,SAAUwB,OAAe;IAC/C,IAAI,OAAOA,YAAY,YAAYA,QAAQQ,QAAQ,CAAC,oBAAoB;QACtE,OAAO9B,gBAAgB4B,IAAI,CACzB,IAAI,EACJ,CAAC,uDAAuD,EAAE/B,KAAKkC,QAAQ,CACrET,SACA,oBACC;IAEP;IAEA,OAAOtB,gBAAgB4B,IAAI,CAAC,IAAI,EAAEN;AACpC","ignoreList":[0]}
1
+ {"version":3,"sources":["../../src/server/require-hook.ts"],"sourcesContent":["// Synchronously inject a require hook for webpack and webpack/. It's required to use the internal ncc webpack version.\n// This is needed for userland plugins to attach to the same webpack instance as Next.js'.\n// Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.\n\n// This module will only be loaded once per process.\n\n// Skip module hooks on Bun - Bun's module system handles things differently\n// and these hooks cause issues with undefined requests\nconst isBun = typeof globalThis.Bun !== 'undefined'\n\nconst path = require('path') as typeof import('path')\nconst mod = require('module') as typeof import('module')\nconst originalRequire = mod.prototype.require\nconst resolveFilename =\n // @ts-expect-error\n mod._resolveFilename\n\nlet resolve: typeof require.resolve = process.env.NEXT_MINIMAL\n ? // @ts-ignore\n __non_webpack_require__.resolve\n : require.resolve\n\nexport const hookPropertyMap = new Map()\n\nexport const defaultOverrides = {\n 'styled-jsx': path.dirname(resolve('styled-jsx/package.json')),\n 'styled-jsx/style': resolve('styled-jsx/style'),\n 'styled-jsx/style.js': resolve('styled-jsx/style'),\n // Alias react and react-dom to the compiled versions to ensure consistency\n // across the entire build process. This prevents multiple React instances.\n react: path.dirname(resolve('next/dist/compiled/react/package.json')),\n 'react-dom': path.dirname(\n resolve('next/dist/compiled/react-dom/package.json')\n ),\n}\n\nconst toResolveMap = (map: Record<string, string>): [string, string][] =>\n Object.entries(map).map(([key, value]) => [key, resolve(value)])\n\nexport function addHookAliases(aliases: [string, string][] = []) {\n for (const [key, value] of aliases) {\n hookPropertyMap.set(key, value)\n }\n}\n\naddHookAliases(toResolveMap(defaultOverrides))\n\n// Only apply module hooks on Node.js - Bun's module system handles things differently\nif (!isBun) {\n // @ts-expect-error\n mod._resolveFilename = function (\n originalResolveFilename: (\n request: string,\n parent: string,\n isMain: boolean,\n opts: any\n ) => string,\n requestMap: Map<string, string>,\n request: string,\n parent: string,\n isMain: boolean,\n options: any\n ) {\n const hookResolved = requestMap.get(request)\n if (hookResolved) request = hookResolved\n\n return originalResolveFilename.call(mod, request, parent, isMain, options)\n\n // We use `bind` here to avoid referencing outside variables to create potential memory leaks.\n }.bind(null, resolveFilename, hookPropertyMap)\n\n // @ts-expect-error\n // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled\n // that needs to point to the rendering runtime version, it will point to the correct one.\n // This can happen on `pages` when a user requires a dependency that uses next/image for example.\n mod.prototype.require = function (request: string) {\n if (typeof request === 'string' && request.endsWith('.shared-runtime')) {\n return originalRequire.call(\n this,\n `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(\n request,\n '.shared-runtime'\n )}`\n )\n }\n\n return originalRequire.call(this, request)\n }\n}\n"],"names":["addHookAliases","defaultOverrides","hookPropertyMap","isBun","globalThis","Bun","path","require","mod","originalRequire","prototype","resolveFilename","_resolveFilename","resolve","process","env","NEXT_MINIMAL","__non_webpack_require__","Map","dirname","react","toResolveMap","map","Object","entries","key","value","aliases","set","originalResolveFilename","requestMap","request","parent","isMain","options","hookResolved","get","call","bind","endsWith","basename"],"mappings":"AAAA,uHAAuH;AACvH,0FAA0F;AAC1F,kGAAkG;AAElG,oDAAoD;AAEpD,4EAA4E;AAC5E,uDAAuD;;;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,QAAQC,QAAQC;IAElE,8FAA8F;IAChG,CAAA,EAAEI,IAAI,CAAC,MAAM3B,iBAAiBT;IAE9B,mBAAmB;IACnB,2FAA2F;IAC3F,0FAA0F;IAC1F,iGAAiG;IACjGM,IAAIE,SAAS,CAACH,OAAO,GAAG,SAAUwB,OAAe;QAC/C,IAAI,OAAOA,YAAY,YAAYA,QAAQQ,QAAQ,CAAC,oBAAoB;YACtE,OAAO9B,gBAAgB4B,IAAI,CACzB,IAAI,EACJ,CAAC,uDAAuD,EAAE/B,KAAKkC,QAAQ,CACrET,SACA,oBACC;QAEP;QAEA,OAAOtB,gBAAgB4B,IAAI,CAAC,IAAI,EAAEN;IACpC;AACF","ignoreList":[0]}
@@ -21,7 +21,7 @@ _export(exports, {
21
21
  }
22
22
  });
23
23
  function isStableBuild() {
24
- return !"16.0.3"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
24
+ return !"16.0.4"?.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){
@@ -81,7 +81,7 @@ function getAnonymousMeta() {
81
81
  isWsl: _iswsl.default,
82
82
  isCI: _ciinfo.isCI,
83
83
  ciName: _ciinfo.isCI && _ciinfo.name || null,
84
- nextVersion: "16.0.3"
84
+ nextVersion: "16.0.4"
85
85
  };
86
86
  return traits;
87
87
  }
@@ -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.3" !== 'string') {
14
+ if (typeof "16.0.4" !== 'string') {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "16.0.3",
18
+ nextVersion: "16.0.4",
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.3" !== 'string') {
15
+ if (typeof "16.0.4" !== 'string') {
16
16
  return [];
17
17
  }
18
18
  const { images, i18n } = nextConfig || {};
19
19
  const payload = {
20
- nextVersion: "16.0.3",
20
+ nextVersion: "16.0.4",
21
21
  nodeVersion: process.version,
22
22
  cliCommand: event.cliCommand,
23
23
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openuiai/next",
3
- "version": "16.0.3",
3
+ "version": "16.0.4",
4
4
  "description": "OpenNext.js - A development-focused fork of Next.js with Bun support",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",