next 15.6.0-canary.5 → 15.6.0-canary.7
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/swc/index.js +1 -1
- package/dist/build/templates/app-page.js +2 -2
- package/dist/build/templates/app-page.js.map +1 -1
- package/dist/build/templates/app-route.js +2 -2
- package/dist/build/templates/app-route.js.map +1 -1
- package/dist/build/templates/edge-ssr-app.js +2 -2
- package/dist/build/templates/edge-ssr-app.js.map +1 -1
- package/dist/build/templates/edge-ssr.js +2 -2
- package/dist/build/templates/edge-ssr.js.map +1 -1
- package/dist/build/templates/pages-api.js +2 -2
- package/dist/build/templates/pages-api.js.map +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-api.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api.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/compiled/next-server/pages.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
- package/dist/esm/build/index.js +3 -3
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/templates/app-page.js +2 -2
- package/dist/esm/build/templates/app-page.js.map +1 -1
- package/dist/esm/build/templates/app-route.js +2 -2
- package/dist/esm/build/templates/app-route.js.map +1 -1
- package/dist/esm/build/templates/edge-ssr-app.js +2 -2
- package/dist/esm/build/templates/edge-ssr-app.js.map +1 -1
- package/dist/esm/build/templates/edge-ssr.js +2 -2
- package/dist/esm/build/templates/edge-ssr.js.map +1 -1
- package/dist/esm/build/templates/pages-api.js +2 -2
- package/dist/esm/build/templates/pages-api.js.map +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/server/base-server.js +5 -2
- package/dist/esm/server/base-server.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/server/route-matcher-managers/dev-route-matcher-manager.js +0 -3
- package/dist/esm/server/route-matcher-managers/dev-route-matcher-manager.js.map +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/server/base-server.d.ts +1 -0
- package/dist/server/base-server.js +5 -2
- package/dist/server/base-server.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/server/route-matcher-managers/dev-route-matcher-manager.js +0 -3
- package/dist/server/route-matcher-managers/dev-route-matcher-manager.js.map +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
@@ -90,7 +90,7 @@ export async function createHotReloaderTurbopack(opts, serverFields, distDir, re
|
|
90
90
|
}
|
91
91
|
const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
|
92
92
|
const hotReloaderSpan = trace('hot-reloader', undefined, {
|
93
|
-
version: "15.6.0-canary.
|
93
|
+
version: "15.6.0-canary.7"
|
94
94
|
});
|
95
95
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
96
96
|
// of the current `next dev` invocation.
|
@@ -158,7 +158,7 @@ export default class HotReloaderWebpack {
|
|
158
158
|
this.previewProps = previewProps;
|
159
159
|
this.rewrites = rewrites;
|
160
160
|
this.hotReloaderSpan = trace('hot-reloader', undefined, {
|
161
|
-
version: "15.6.0-canary.
|
161
|
+
version: "15.6.0-canary.7"
|
162
162
|
});
|
163
163
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
164
164
|
// of the current `next dev` invocation.
|
@@ -14,7 +14,7 @@ export function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures
|
|
14
14
|
bundlerSuffix = ' (webpack)';
|
15
15
|
}
|
16
16
|
}
|
17
|
-
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.6.0-canary.
|
17
|
+
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.6.0-canary.7"}`))}${bundlerSuffix}`);
|
18
18
|
if (appUrl) {
|
19
19
|
Log.bootstrap(`- Local: ${appUrl}`);
|
20
20
|
}
|
@@ -111,7 +111,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
|
|
111
111
|
export async function startServer(serverOptions) {
|
112
112
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
113
113
|
let { port } = serverOptions;
|
114
|
-
process.title = `next-server (v${"15.6.0-canary.
|
114
|
+
process.title = `next-server (v${"15.6.0-canary.7"})`;
|
115
115
|
let handlersReady = ()=>{};
|
116
116
|
let handlersError = ()=>{};
|
117
117
|
let handlersPromise = new Promise((resolve, reject)=>{
|
@@ -26,9 +26,6 @@ export class DevRouteMatcherManager extends DefaultRouteMatcherManager {
|
|
26
26
|
return match;
|
27
27
|
}
|
28
28
|
async *matchAll(pathname, options) {
|
29
|
-
// Compile the development routes.
|
30
|
-
// TODO: we may want to only run this during testing, users won't be fast enough to require this many dir scans
|
31
|
-
await super.reload();
|
32
29
|
// Iterate over the development matches to see if one of them match the
|
33
30
|
// request path.
|
34
31
|
for await (const developmentMatch of super.matchAll(pathname, options)){
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/server/route-matcher-managers/dev-route-matcher-manager.ts"],"sourcesContent":["import { RouteKind } from '../route-kind'\nimport type { RouteMatch } from '../route-matches/route-match'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport { DefaultRouteMatcherManager } from './default-route-matcher-manager'\nimport type { MatchOptions, RouteMatcherManager } from './route-matcher-manager'\nimport path from '../../shared/lib/isomorphic/path'\nimport * as Log from '../../build/output/log'\nimport { cyan } from '../../lib/picocolors'\nimport type { RouteMatcher } from '../route-matchers/route-matcher'\n\nexport interface RouteEnsurer {\n ensure(match: RouteMatch, pathname: string): Promise<void>\n}\n\nexport class DevRouteMatcherManager extends DefaultRouteMatcherManager {\n constructor(\n private readonly production: RouteMatcherManager,\n private readonly ensurer: RouteEnsurer,\n private readonly dir: string\n ) {\n super()\n }\n\n public async test(pathname: string, options: MatchOptions): Promise<boolean> {\n // Try to find a match within the developer routes.\n const match = await super.match(pathname, options)\n\n // Return if the match wasn't null. Unlike the implementation of `match`\n // which uses `matchAll` here, this does not call `ensure` on the match\n // found via the development matches.\n return match !== null\n }\n\n protected validate(\n pathname: string,\n matcher: RouteMatcher,\n options: MatchOptions\n ): RouteMatch | null {\n const match = super.validate(pathname, matcher, options)\n\n // If a match was found, check to see if there were any conflicting app or\n // pages files.\n // TODO: maybe expand this to _any_ duplicated routes instead?\n if (\n match &&\n matcher.duplicated &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.APP_PAGE ||\n duplicate.definition.kind === RouteKind.APP_ROUTE\n ) &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.PAGES ||\n duplicate.definition.kind === RouteKind.PAGES_API\n )\n ) {\n return null\n }\n\n return match\n }\n\n public async *matchAll(\n pathname: string,\n options: MatchOptions\n ): AsyncGenerator<RouteMatch<RouteDefinition<RouteKind>>, null, undefined> {\n //
|
1
|
+
{"version":3,"sources":["../../../src/server/route-matcher-managers/dev-route-matcher-manager.ts"],"sourcesContent":["import { RouteKind } from '../route-kind'\nimport type { RouteMatch } from '../route-matches/route-match'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport { DefaultRouteMatcherManager } from './default-route-matcher-manager'\nimport type { MatchOptions, RouteMatcherManager } from './route-matcher-manager'\nimport path from '../../shared/lib/isomorphic/path'\nimport * as Log from '../../build/output/log'\nimport { cyan } from '../../lib/picocolors'\nimport type { RouteMatcher } from '../route-matchers/route-matcher'\n\nexport interface RouteEnsurer {\n ensure(match: RouteMatch, pathname: string): Promise<void>\n}\n\nexport class DevRouteMatcherManager extends DefaultRouteMatcherManager {\n constructor(\n private readonly production: RouteMatcherManager,\n private readonly ensurer: RouteEnsurer,\n private readonly dir: string\n ) {\n super()\n }\n\n public async test(pathname: string, options: MatchOptions): Promise<boolean> {\n // Try to find a match within the developer routes.\n const match = await super.match(pathname, options)\n\n // Return if the match wasn't null. Unlike the implementation of `match`\n // which uses `matchAll` here, this does not call `ensure` on the match\n // found via the development matches.\n return match !== null\n }\n\n protected validate(\n pathname: string,\n matcher: RouteMatcher,\n options: MatchOptions\n ): RouteMatch | null {\n const match = super.validate(pathname, matcher, options)\n\n // If a match was found, check to see if there were any conflicting app or\n // pages files.\n // TODO: maybe expand this to _any_ duplicated routes instead?\n if (\n match &&\n matcher.duplicated &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.APP_PAGE ||\n duplicate.definition.kind === RouteKind.APP_ROUTE\n ) &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.PAGES ||\n duplicate.definition.kind === RouteKind.PAGES_API\n )\n ) {\n return null\n }\n\n return match\n }\n\n public async *matchAll(\n pathname: string,\n options: MatchOptions\n ): AsyncGenerator<RouteMatch<RouteDefinition<RouteKind>>, null, undefined> {\n // Iterate over the development matches to see if one of them match the\n // request path.\n for await (const developmentMatch of super.matchAll(pathname, options)) {\n // We're here, which means that we haven't seen this match yet, so we\n // should try to ensure it and recompile the production matcher.\n await this.ensurer.ensure(developmentMatch, pathname)\n await this.production.reload()\n\n // Iterate over the production matches again, this time we should be able\n // to match it against the production matcher unless there's an error.\n for await (const productionMatch of this.production.matchAll(\n pathname,\n options\n )) {\n yield productionMatch\n }\n }\n\n // We tried direct matching against the pathname and against all the dynamic\n // paths, so there was no match.\n return null\n }\n\n public async reload(): Promise<void> {\n // Compile the production routes again.\n await this.production.reload()\n\n // Compile the development routes.\n await super.reload()\n\n // Check for and warn of any duplicates.\n for (const [pathname, matchers] of Object.entries(\n this.matchers.duplicates\n )) {\n // We only want to warn about matchers resolving to the same path if their\n // identities are different.\n const identity = matchers[0].identity\n if (matchers.slice(1).some((matcher) => matcher.identity !== identity)) {\n continue\n }\n\n Log.warn(\n `Duplicate page detected. ${matchers\n .map((matcher) =>\n cyan(path.relative(this.dir, matcher.definition.filename))\n )\n .join(' and ')} resolve to ${cyan(pathname)}`\n )\n }\n }\n}\n"],"names":["RouteKind","DefaultRouteMatcherManager","path","Log","cyan","DevRouteMatcherManager","constructor","production","ensurer","dir","test","pathname","options","match","validate","matcher","duplicated","some","duplicate","definition","kind","APP_PAGE","APP_ROUTE","PAGES","PAGES_API","matchAll","developmentMatch","ensure","reload","productionMatch","matchers","Object","entries","duplicates","identity","slice","warn","map","relative","filename","join"],"mappings":"AAAA,SAASA,SAAS,QAAQ,gBAAe;AAGzC,SAASC,0BAA0B,QAAQ,kCAAiC;AAE5E,OAAOC,UAAU,mCAAkC;AACnD,YAAYC,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AsE;YACtE,WAAW,MAAMC,mBAAmB,IAAI,CAACtB,UAAU,CAACkB,QAAQ,CAC1Dd,UACAC,SACC;gBACD,MAAMiB;YACR;QACF;QAEA,4EAA4E;QAC5E,gCAAgC;QAChC,OAAO;IACT;IAEA,MAAaD,SAAwB;QACnC,uCAAuC;QACvC,MAAM,IAAI,CAACrB,UAAU,CAACqB,MAAM;QAE5B,kCAAkC;QAClC,MAAM,KAAK,CAACA;QAEZ,wCAAwC;QACxC,KAAK,MAAM,CAACjB,UAAUmB,SAAS,IAAIC,OAAOC,OAAO,CAC/C,IAAI,CAACF,QAAQ,CAACG,UAAU,EACvB;YACD,0EAA0E;YAC1E,4BAA4B;YAC5B,MAAMC,WAAWJ,QAAQ,CAAC,EAAE,CAACI,QAAQ;YACrC,IAAIJ,SAASK,KAAK,CAAC,GAAGlB,IAAI,CAAC,CAACF,UAAYA,QAAQmB,QAAQ,KAAKA,WAAW;gBACtE;YACF;YAEA/B,IAAIiC,IAAI,CACN,CAAC,yBAAyB,EAAEN,SACzBO,GAAG,CAAC,CAACtB,UACJX,KAAKF,KAAKoC,QAAQ,CAAC,IAAI,CAAC7B,GAAG,EAAEM,QAAQI,UAAU,CAACoB,QAAQ,IAEzDC,IAAI,CAAC,SAAS,YAAY,EAAEpC,KAAKO,WAAW;QAEnD;IACF;AACF","ignoreList":[0]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export function isStableBuild() {
|
2
2
|
var _process_env___NEXT_VERSION;
|
3
|
-
return !((_process_env___NEXT_VERSION = "15.6.0-canary.
|
3
|
+
return !((_process_env___NEXT_VERSION = "15.6.0-canary.7") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
4
4
|
}
|
5
5
|
export class CanaryOnlyError extends Error {
|
6
6
|
constructor(arg){
|
@@ -221,6 +221,7 @@ export default abstract class Server<ServerOptions extends Options = Options, Se
|
|
221
221
|
* it's only fully used in dev
|
222
222
|
*/
|
223
223
|
constructor(options: ServerOptions);
|
224
|
+
protected reloadMatchers(): Promise<void>;
|
224
225
|
private handleRSCRequest;
|
225
226
|
private handleNextDataRequest;
|
226
227
|
protected handleNextImageRequest: RouteHandler<ServerRequest, ServerResponse>;
|
@@ -422,6 +422,9 @@ class Server {
|
|
422
422
|
dev
|
423
423
|
});
|
424
424
|
}
|
425
|
+
reloadMatchers() {
|
426
|
+
return this.matchers.reload();
|
427
|
+
}
|
425
428
|
getRouteMatchers() {
|
426
429
|
// Create a new manifest loader that get's the manifests from the server.
|
427
430
|
const manifestLoader = new _servermanifestloader.ServerManifestLoader((name)=>{
|
@@ -474,7 +477,7 @@ class Server {
|
|
474
477
|
const tracer = (0, _tracer.getTracer)();
|
475
478
|
return tracer.withPropagatedContext(req.headers, ()=>{
|
476
479
|
return tracer.trace(_constants1.BaseServerSpan.handleRequest, {
|
477
|
-
spanName: `${method}
|
480
|
+
spanName: `${method}`,
|
478
481
|
kind: _tracer.SpanKind.SERVER,
|
479
482
|
attributes: {
|
480
483
|
'http.method': method,
|
@@ -513,7 +516,7 @@ class Server {
|
|
513
516
|
});
|
514
517
|
span.updateName(name);
|
515
518
|
} else {
|
516
|
-
span.updateName(isRSCRequest ? `RSC ${method}
|
519
|
+
span.updateName(isRSCRequest ? `RSC ${method}` : `${method}`);
|
517
520
|
}
|
518
521
|
}));
|
519
522
|
});
|