next 15.0.4-canary.4 → 15.0.4-canary.5
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.
Potentially problematic release.
This version of next might be problematic. Click here for more details.
- 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/server.runtime.prod.js +1 -1
- package/dist/compiled/next-server/server.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/server/base-server.js +13 -7
- package/dist/esm/server/base-server.js.map +1 -1
- package/dist/esm/server/config.js +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/server/base-server.js +13 -7
- package/dist/server/base-server.js.map +1 -1
- package/dist/server/config.js +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/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
|
@@ -283,7 +283,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
|
283
283
|
const nextBuildSpan = trace('next-build', undefined, {
|
|
284
284
|
buildMode: experimentalBuildMode,
|
|
285
285
|
isTurboBuild: String(turboNextBuild),
|
|
286
|
-
version: "15.0.4-canary.
|
|
286
|
+
version: "15.0.4-canary.5"
|
|
287
287
|
});
|
|
288
288
|
NextBuildContext.nextBuildSpan = nextBuildSpan;
|
|
289
289
|
NextBuildContext.dir = dir;
|
|
@@ -684,7 +684,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
|
684
684
|
// Files outside of the distDir can be "type": "module"
|
|
685
685
|
await writeFileUtf8(path.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
|
686
686
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
|
687
|
-
await recordFrameworkVersion("15.0.4-canary.
|
|
687
|
+
await recordFrameworkVersion("15.0.4-canary.5");
|
|
688
688
|
await updateBuildDiagnostics({
|
|
689
689
|
buildStage: 'start'
|
|
690
690
|
});
|
|
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
|
|
|
11
11
|
import { getDefineEnv } from '../webpack/plugins/define-env-plugin';
|
|
12
12
|
import { getReactCompilerLoader } from '../get-babel-loader-config';
|
|
13
13
|
import { TurbopackInternalError } from '../../server/dev/turbopack-utils';
|
|
14
|
-
const nextVersion = "15.0.4-canary.
|
|
14
|
+
const nextVersion = "15.0.4-canary.5";
|
|
15
15
|
const ArchName = arch();
|
|
16
16
|
const PlatformName = platform();
|
|
17
17
|
function infoLog(...args) {
|
|
@@ -1409,7 +1409,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1409
1409
|
isClient && new CopyFilePlugin({
|
|
1410
1410
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1411
1411
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1412
|
-
cacheKey: "15.0.4-canary.
|
|
1412
|
+
cacheKey: "15.0.4-canary.5",
|
|
1413
1413
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1414
1414
|
minimize: false,
|
|
1415
1415
|
info: {
|
|
@@ -1637,7 +1637,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
|
1637
1637
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1638
1638
|
// - Next.js version
|
|
1639
1639
|
// - next.config.js keys that affect compilation
|
|
1640
|
-
version: `${__dirname}|${"15.0.4-canary.
|
|
1640
|
+
version: `${__dirname}|${"15.0.4-canary.5"}|${configVars}`,
|
|
1641
1641
|
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
|
|
1642
1642
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1643
1643
|
// 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/shared';
|
|
27
27
|
import tracer from './tracing/tracer';
|
|
28
28
|
import reportToSocket from './tracing/report-to-socket';
|
|
29
|
-
export const version = "15.0.4-canary.
|
|
29
|
+
export const version = "15.0.4-canary.5";
|
|
30
30
|
export let router;
|
|
31
31
|
export const emitter = mitt();
|
|
32
32
|
const looseToArray = (input)=>[].slice.call(input);
|
|
@@ -1917,7 +1917,7 @@ export default class Server {
|
|
|
1917
1917
|
addRequestMeta(req, 'notFoundRevalidate', cacheEntry.revalidate);
|
|
1918
1918
|
// If cache control is already set on the response we don't
|
|
1919
1919
|
// override it to allow users to customize it via next.config
|
|
1920
|
-
if (cacheEntry.revalidate && !res.getHeader('Cache-Control')) {
|
|
1920
|
+
if (typeof cacheEntry.revalidate !== 'undefined' && !res.getHeader('Cache-Control')) {
|
|
1921
1921
|
res.setHeader('Cache-Control', formatRevalidate({
|
|
1922
1922
|
revalidate: cacheEntry.revalidate,
|
|
1923
1923
|
expireTime: this.nextConfig.expireTime
|
|
@@ -1939,7 +1939,7 @@ export default class Server {
|
|
|
1939
1939
|
} else if (cachedData.kind === CachedRouteKind.REDIRECT) {
|
|
1940
1940
|
// If cache control is already set on the response we don't
|
|
1941
1941
|
// override it to allow users to customize it via next.config
|
|
1942
|
-
if (cacheEntry.revalidate && !res.getHeader('Cache-Control')) {
|
|
1942
|
+
if (typeof cacheEntry.revalidate !== 'undefined' && !res.getHeader('Cache-Control')) {
|
|
1943
1943
|
res.setHeader('Cache-Control', formatRevalidate({
|
|
1944
1944
|
revalidate: cacheEntry.revalidate,
|
|
1945
1945
|
expireTime: this.nextConfig.expireTime
|
|
@@ -1957,14 +1957,20 @@ export default class Server {
|
|
|
1957
1957
|
return null;
|
|
1958
1958
|
}
|
|
1959
1959
|
} else if (cachedData.kind === CachedRouteKind.APP_ROUTE) {
|
|
1960
|
-
const headers =
|
|
1961
|
-
...cachedData.headers
|
|
1962
|
-
};
|
|
1960
|
+
const headers = fromNodeOutgoingHttpHeaders(cachedData.headers);
|
|
1963
1961
|
if (!(this.minimalMode && isSSG)) {
|
|
1964
|
-
delete
|
|
1962
|
+
headers.delete(NEXT_CACHE_TAGS_HEADER);
|
|
1963
|
+
}
|
|
1964
|
+
// If cache control is already set on the response we don't
|
|
1965
|
+
// override it to allow users to customize it via next.config
|
|
1966
|
+
if (typeof cacheEntry.revalidate !== 'undefined' && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
1967
|
+
headers.set('Cache-Control', formatRevalidate({
|
|
1968
|
+
revalidate: cacheEntry.revalidate,
|
|
1969
|
+
expireTime: this.nextConfig.expireTime
|
|
1970
|
+
}));
|
|
1965
1971
|
}
|
|
1966
1972
|
await sendResponse(req, res, new Response(cachedData.body, {
|
|
1967
|
-
headers
|
|
1973
|
+
headers,
|
|
1968
1974
|
status: cachedData.status || 200
|
|
1969
1975
|
}));
|
|
1970
1976
|
return null;
|