Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "16.4.0-canary.8"
"version": "16.4.0-canary.9"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/devlow-bench/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@vercel/devlow-bench",
"private": true,
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "Benchmarking tool for the developer workflow",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "ESLint configuration used by Next.js.",
"license": "MIT",
"repository": {
Expand All @@ -12,7 +12,7 @@
"dist"
],
"dependencies": {
"@next/eslint-plugin-next": "16.4.0-canary.8",
"@next/eslint-plugin-next": "16.4.0-canary.9",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/eslint-plugin-internal",
"private": true,
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "ESLint plugin for working on Next.js.",
"exports": {
".": "./src/eslint-plugin-internal.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/font",
"private": true,
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/playwright",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-playwright"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-routing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/routing",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-rspack",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-rspack"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"private": true,
"files": [
"native/"
Expand Down
16 changes: 8 additions & 8 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "16.4.0-canary.8",
"version": "16.4.0-canary.9",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -100,7 +100,7 @@
]
},
"dependencies": {
"@next/env": "16.4.0-canary.8",
"@next/env": "16.4.0-canary.9",
"@swc/helpers": "0.5.23",
"baseline-browser-mapping": "^2.9.19",
"caniuse-lite": "^1.0.30001579",
Expand Down Expand Up @@ -130,7 +130,7 @@
}
},
"optionalDependencies": {
"sharp": "^0.35.3"
"sharp": "^0.35.4"
},
"devDependencies": {
"@babel/core": "7.26.10",
Expand Down Expand Up @@ -164,11 +164,11 @@
"@modelcontextprotocol/sdk": "1.18.1",
"@mswjs/interceptors": "0.42.0",
"@napi-rs/triples": "1.2.0",
"@next/font": "16.4.0-canary.8",
"@next/polyfill-module": "16.4.0-canary.8",
"@next/polyfill-nomodule": "16.4.0-canary.8",
"@next/react-refresh-utils": "16.4.0-canary.8",
"@next/swc": "16.4.0-canary.8",
"@next/font": "16.4.0-canary.9",
"@next/polyfill-module": "16.4.0-canary.9",
"@next/polyfill-nomodule": "16.4.0-canary.9",
"@next/react-refresh-utils": "16.4.0-canary.9",
"@next/swc": "16.4.0-canary.9",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.61.0",
"@rspack/core": "1.6.7",
Expand Down
3 changes: 3 additions & 0 deletions packages/next/src/build/define-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ export function getDefineEnv({
'process.env.__NEXT_DYNAMIC_ON_HOVER': Boolean(
config.experimental.dynamicOnHover
),
'process.env.__NEXT_EXPERIMENTAL_REACT_BROWSER_BAILOUT': Boolean(
config.experimental.reactBrowserBailout
),
'process.env.__NEXT_USE_OFFLINE': Boolean(config.experimental.useOffline),
'process.env.__NEXT_PREFETCH_INLINING': Boolean(
config.experimental.prefetchInlining
Expand Down
3 changes: 3 additions & 0 deletions packages/next/src/build/templates/app-page-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,9 @@ export function createAppPageEntrypoint({
prefetchInlining:
nextConfig.experimental.prefetchInlining ?? false,
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
reactBrowserBailout: Boolean(
nextConfig.experimental.reactBrowserBailout
),
serverComponentsHmrCancellation: Boolean(
nextConfig.experimental.serverComponentsHmrCancellation
),
Expand Down
3 changes: 3 additions & 0 deletions packages/next/src/build/templates/edge-ssr-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ async function requestHandler(
inlineCss: Boolean(nextConfig.experimental.inlineCss),
prefetchInlining: nextConfig.experimental.prefetchInlining ?? false,
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
reactBrowserBailout: Boolean(
nextConfig.experimental.reactBrowserBailout
),
// Edge has no Node response-close signal, so HMR cancellation is a
// no-op.
serverComponentsHmrCancellation: false,
Expand Down
2 changes: 0 additions & 2 deletions packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1822,8 +1822,6 @@ export default async function getBaseWebpackConfig(
basePath: config.basePath,
assetPrefix: config.assetPrefix,
outputHashSalt: config.outputHashSalt,
imgOptDangerouslyAllowAVIF:
config.experimental.imgOptDangerouslyAllowAVIF,
},
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { optimizeImage } from '../../../../server/image-optimizer'

const BLUR_IMG_SIZE = 8
const BLUR_QUALITY = 70
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp'] // should match other usages
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match other usages

export async function getBlurImage(
content: Buffer,
Expand All @@ -13,7 +13,6 @@ export async function getBlurImage(
basePath,
outputPath,
isDev,
imgOptDangerouslyAllowAVIF = false,
tracing = () => ({
traceFn:
(fn) =>
Expand All @@ -28,7 +27,6 @@ export async function getBlurImage(
basePath: string
outputPath: string
isDev: boolean
imgOptDangerouslyAllowAVIF?: boolean
tracing: (name?: string) => {
traceFn(fn: Function): any
traceAsyncFn(fn: Function): any
Expand All @@ -39,11 +37,7 @@ export async function getBlurImage(
let blurWidth: number = 0
let blurHeight: number = 0

const isValidBlurExtension =
VALID_BLUR_EXT.includes(extension) ||
(extension === 'avif' && imgOptDangerouslyAllowAVIF)

if (isValidBlurExtension && !isAnimated(content)) {
if (VALID_BLUR_EXT.includes(extension) && !isAnimated(content)) {
// Shrink the image's largest dimension
if (imageSize.width >= imageSize.height) {
blurWidth = BLUR_IMG_SIZE
Expand Down Expand Up @@ -78,7 +72,6 @@ export async function getBlurImage(
height: blurHeight,
contentType: `image/${extension}`,
quality: BLUR_QUALITY,
dangerouslyAllowAVIF: imgOptDangerouslyAllowAVIF,
})
)
const blurDataURLSpan = tracing('image-base64-tostring')
Expand Down
12 changes: 2 additions & 10 deletions packages/next/src/build/webpack/loaders/next-image-loader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,14 @@ interface Options {
assetPrefix: string
basePath: string
outputHashSalt: string
imgOptDangerouslyAllowAVIF: boolean
}

function nextImageLoader(this: any, content: Buffer) {
const imageLoaderSpan = this.currentTraceSpan.traceChild('next-image-loader')
return imageLoaderSpan.traceAsyncFn(async () => {
const options: Options = this.getOptions()
const {
compilerType,
isDev,
assetPrefix,
basePath,
outputHashSalt,
imgOptDangerouslyAllowAVIF,
} = options
const { compilerType, isDev, assetPrefix, basePath, outputHashSalt } =
options
const context = this.rootContext

// Prepend the hash salt to the content for filename hash computation, so
Expand Down Expand Up @@ -65,7 +58,6 @@ function nextImageLoader(this: any, content: Buffer) {
basePath,
outputPath,
isDev,
imgOptDangerouslyAllowAVIF,
tracing: imageLoaderSpan.traceChild.bind(imageLoaderSpan),
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export class ClientReferenceManifestPlugin {
const concatenatedMod = connection.module
const concatenatedModId =
compilation.chunkGraph.getModuleId(concatenatedMod)
if (concatenatedModId) {
if (concatenatedModId !== null) {
recordModule(concatenatedModId, clientEntryMod)
}
}
Expand Down
10 changes: 1 addition & 9 deletions packages/next/src/client/legacy/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ export default function Image({
}

let staticSrc = ''
let isStaticAvif = false
if (isStaticImport(src)) {
const staticImageData = isStaticRequire(src) ? src.default : src

Expand All @@ -761,7 +760,6 @@ export default function Image({
}
blurDataURL = blurDataURL || staticImageData.blurDataURL
staticSrc = staticImageData.src
isStaticAvif = /\.avif(?:\?|$)/i.test(staticSrc)
if (!layout || layout !== 'fill') {
height = height || staticImageData.height
width = width || staticImageData.width
Expand All @@ -776,12 +774,6 @@ export default function Image({
}
src = typeof src === 'string' ? src : staticSrc

// Generating a blurDataURL requires decoding the source image, so static AVIF
// imports do not receive one while AVIF input optimization is disabled.
if (isStaticAvif && placeholder === 'blur' && !blurDataURL) {
placeholder = 'empty'
}

warnOnce(
`Image with src "${src}" is using next/legacy/image which is deprecated and will be removed in a future version of Next.js.`
)
Expand Down Expand Up @@ -916,7 +908,7 @@ export default function Image({
)
}
if (!blurDataURL) {
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp'] // should match next-image-loader
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader

throw new Error(
`Image with src "${src}" has "placeholder='blur'" property but is missing the "blurDataURL" property.
Expand Down
1 change: 1 addition & 0 deletions packages/next/src/export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ async function exportAppImpl(
inlineCss: nextConfig.experimental.inlineCss ?? false,
prefetchInlining: nextConfig.experimental.prefetchInlining ?? false,
authInterrupts: !!nextConfig.experimental.authInterrupts,
reactBrowserBailout: nextConfig.experimental.reactBrowserBailout ?? false,
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
cachedNavigations: nextConfig.experimental.cachedNavigations ?? false,
maxPostponedStateSizeBytes: parseMaxPostponedStateSize(
Expand Down
Loading
Loading