@next/codemod
16.4.6 · 9 Nov 2026MIT253.5k / weekRepositoryHomepagenpmAtom feed
297 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 12.x
12.1.5
12 Apr 2022Use
__non_webpack_require__to fetch partytown server-sideUse ReadableStream in client hydration for Firefox compatibility
Collect packages are used and eliminated in getServerSideProps
Core Changes
Use
__non_webpack_require__to fetch partytown server-sideUse ReadableStream in client hydration for Firefox compatibility
Collect packages are used and eliminated in getServerSideProps
Initial implementation of statically optimized flight data of server component pages
Fix
layout="raw"image element sizes propReset visible state when src/href changed
Add warning when importing "next" directly
Custom app for switchable runtime
Update repo to use react 18 by default
Fix Firefox flash of white on
next/imagewithplaceholder=blurFix data encoder and decoder to use
streamin rendererRevert "fix the dynamic routing of middleware"
Update: Add error message when for getServerSideProps invalid return value
Code refactoring
Add locale prefix to middleware preflight url
Emotion SWC Plugin - Allow for jsxImportSource to be configurable
Update polyfill of web streams
Add
.eslintrc.cjsto list of supportednext lintconfig filesUpdate webpack
Ensure minimalMode previousCache expire time is capped
Add test case for module resolution in node_modules from different contexts
Support shared component with next built-in client components
Use eager import to include client modules
Use renderToString for flush effects
Allow to provide postcss plugin options as a string
Fix leaking internal config to user-defined
loaderprop innext/imageSupport export all syntax in client components
Interpolate default exports
next-swc: Update swc crates
Interpolate default exports is now unnecessary
Do not add locale to link for api route and middleware preflight
Fix outputStandalone with optimizeCss
Interpolate module.exports as default import
next-url: Print properly using logger symbol
Documentation Changes
toBeInTheDocument is not a function
Revert "Improvements to the MDX Docs and replaced a leftover reference to babel"
Example Changes
with-mongodb: Change comment of MongoDB
clientingetServerSideProps
Misc Changes
Fix docs only check for performance metrics job
Add note to contributing about docs manifest
12.1.4
31 Mar 2022Only resolve page runtime for react 18 and error on read failure
next-swc: Update swc crates
Fix document styles with react 18
Core Changes
Only resolve page runtime for react 18 and error on read failure
next-swc: Update swc crates
Fix document styles with react 18
Fix router isReady and react 18 not being detected with no config
12.1.3
30 Mar 2022Add deprecated JSDoc comments for the previous middleware signature
Fix the dynamic routing of middleware
Don't override user-agent in fetch if specified
Core Changes
Add deprecated JSDoc comments for the previous middleware signature
Fix the dynamic routing of middleware
Don't override user-agent in fetch if specified
Fix Fast Refresh for React 18
Emotion css minify should not trim end spaces if item is not the last
Ensure the app shell is rendered before rendering the document
Prevent page to scroll to top during data HMR
Fix _document and getInitialProps with React 18
test(fix: Prevent page to scroll to top during data HMR)
Update to pre-compile use-subscription
Fix useStatic404 condition
Fix streaming SSR with multi-byte characters
Misc Changes
Fix next info test during stable release
12.1.2
28 Mar 2022RSC: Handle commonjs in flight loader
Update rsc refresh typing and doc example
Revert "Revert "Make concurrent features independent from the global runtime option" #35405"
Core Changes
RSC: Handle commonjs in flight loader
Update rsc refresh typing and doc example
Revert "Revert "Make concurrent features independent from the global runtime option" #35405"
Update terminal tree view for switchable runtime
Prevent spaces between expressions from being removed
Disable script worker in edge and fix rsc loader and runtime
enhance: Detect ESM by ast type
Clean up legacy react 18 tests
Fix server component render condition
Rename createRSCHook to createFlightHook
Ensure eslint plugins dont conflict
Misc Changes
Fix create-next-app failing without yarn installed
Fix hydration issue in the switchable runtime tests
12.1.1
25 Mar 2022- Removed
Remove
useMaybeDeferContenthook - Removed
Remove the special
_document-concurrentcomponent rsc: Clean client buffer cache after flushed
Core Changes
rsc: Clean client buffer cache after flushed
Ensure config's
experimentalfield existsOnly log experiments warning if user actually opted in to an experiment(s)
Add
unstable_useFlushEffectshookMock image path as
next/imageexpects itFix process polyfill on middleware
Ensure workers are not left open
Leverage existing component checking warning for streaming
Fix
next/imageincorrectly warning forposition: absoluteparent- Removed
Remove
useMaybeDeferContenthook Allow reading request bodies in middlewares
Update swc crates
react-dev-overlay: Export getErrorByType and add preventDisplay prop
Improve
next/imagewarnings to avoid printing more than onceSupport trailingSlash in middleware SSR
Update to latest version of jscodeshift
Don't import internally from types in
next-env.d.tsImprove type imports in server/render and optimize the Edge SSR loader
Remove commons chunk config
Add
cargo clippyandcargo fmtto CIFix rsc bootstrap buffer missing in the future renders
Match
redirectandrewritedestination typesMake sure
image-config.tsgets transpiled to ES5Normalize image optimizer error status codes
Fix CSS Loader Detection False Positives
Upgrade @napi-rs/triples to support android arm platform
Add proper headers to responses in web server
Produce source maps for middlewares
Reduce the size of web server
Collect telemetry for ESLint rules
Refactor entries generation in hot-reloader
Integrate tsec into the linting process
Add API config to allow disabling response size warning
#34030: Ignore non-checkable jsx spread attribute
Fix eslint-plugin-react version to avoid jsx-key error
#34711 ensure distDir inside project folder
Update to ncc dev overlay during build instead of pre-compile
Add warning for Yarn PnP v3 with Node.js < 16.14
Lock eslint-config-next dependencies
Clean-up error when starting next with non-existent dir
Ensure unstable_revalidate does not error from notFound: true
Update eslint-plugin-react to latest version
Fix flight loader for shared components
Fix only byte stream writing is allowed in CF workers
Only warn styles and scripts under next head in concurrent mode
Fix image optimization invalid internal upstream image
next-swc: Update swc
Simplify next-flight-server-loader
Ensure non-matching API routes can be rewritten
Optimize component type filters
Expose WASM bindings in Middleware
Provide page runtime parsing utils
Refactor export marks of server components
Fix
next/imagenoscript when blur and priorityFix named export missing from client components
Adopt react 18 rc1
Fix typescript 4.6.2 randomUUID()
Update ISR error handling
Handle de-duping revalidations in minimal mode
Allow dotenv default expansion
Support colons in Middleware NextResponse.rewrite path
Generate static html for bots
Enable import assertion syntax parsing
Split up & tweak
next/clientinitializationNormalize root path according to trailingSlash option in default next/image loader #21337
Fix animated png bypass from Image Optimization API
Watch node_modules
trace: Postprocess trace reporter for datadog
Fix to not call middleware with shallow push, fix middleware call wit…
Fix post request hangs when no body is consumed on middleware
hard-navigate when preflight request fails
Per-page runtime
Delay prefix flushing
Change to loadBindings for swc parse
Ensure mjs files are transformed with jest
Disable the functions manifest plugin
Adopt react 18 rc2
Convert server.js to module.exports
Fix
next/imagewhen src is webp but browser doesnt support itAdds try/catch to gracefully handle performance observer exception
Render resolved streaming content for static render result
next-swc: Update crates
Ensure that pages manifest contains pages of both runtimes
- Removed
Remove the special
_document-concurrentcomponent Adds web worker support to
<Script />using PartytownAdd new 'raw' image layout
SWC emotion transform plugin
enhance: Cover re-exported gsp cases for runtime fallback
Make concurrent features independent from the global runtime option
Update comments for the web server
Add libc fields to Linux platform packages
Drop browser field for edge runtime
Make router able to navigate between rsc pages
Revert "Make concurrent features independent from the global runtime option"
Update on-demand ISR to skip fetch locally
Use hasConcurrentFeatures instead of reactRoot as the condition of Fizz
Abstract out stream related utils from render and web/utils
Keep fouc tags for streaming
Change the timing for clearing the inlined data buffer
document: Accepts nodearray for head's children
Update to latest @vercel/nft and leverage new reason types
Add test to ensure
fs.readFile()works with Output File Tracingnext-swc: Embed target triple string
telemetry: Report swc target triple to telemetry
Update trace ignore check to check reasons correctly
SWC import modularization plugin
Reduce hello-world middleware bundle size from 128k to 88k
Update next/link error when no children are provided
Normalize ssgCacheKey for /index with minimalMode de-duping
Merge rsc queries handling
Upgrade react-server-dom-webpack
Fix styled transform in next-swc/emotion
Fix
next infoaccidentally printing stderr
Documentation Changes
Change showcase url
Support
pnpmwithcreate-next-app
Misc Changes
Add test for multiple cookies coming from middleware
Ensure rust-check skips on docs only change
Fix create-next-app Multiple calls to the function 'makeDir'
Fix react-dom type error in CNA typescript template
12.1.0
17 Feb 2022- Deprecated
Deprecate
concurrentFeatureswithruntime Relay Support in Rust Compiler
Fix eslint link-passhref rule
Core Changes
Relay Support in Rust Compiler
Fix eslint link-passhref rule
Update webpack
Flush buffered vitals metrics on page mount
Fix problem with HMR when middleware and page reference the same node_module
Refactor page component getter in web server
Update NextResponse default redirect status to 307 to match docs
Bug fix: dynamic page should not be interpreted as predefined page
Group streaming experimental apis
Encapsulate routing and initial hydration
Optimize offline condition judgment
Ensure external beforeFiles rewrites are handled with next/link
Fix parsing params for i18n optional route in minimal mode
Ensure browserslist extends works properly
Fix image cache race condition
Add support for Relay projects without
artifactDirectoryHandle jsxspreadattribute in inline-script-id eslint rule
next-swc: Update swc
Update to latest version of amphtml-validator
Warn in dev mode when script tags are added with next/head
Ensure optional chaining in swc matches babel
Use
react-dom/server.browserin Node.jsEnsure external middleware rewrite is handled correctly
Update Terser to v5.10.0, fix minification issues
Warn in dev mode when stylesheets are added using next/head
Use
ReadableStreaminRenderResultFix suffix ordering while streaming
Don't use yarn if a package-lock.json file is found
Do not warn when application/ld+json scripts are used with next/head
Babel & next-swc: Fix exporting page config with AsExpression
Detect per page runtime config for functions manifest
Add JSDoc to config options
Update font-stylesheet-gathering-plugin.ts
Add decoratorMetadata flag if enabled by tsconfig
Data url handling in css-loader
Place 'charset' element at the top of <head>
Fix detection of anchor click events inside svg
Allow passing nothing as custom jest config
Fixes #31240: Adding a recursive addPackagePath function in webpack-config
Require component rendered as child of
Linkto pass event toonClickhandlerAllow scroll prevention on hash change
Add support for async fn / promise in next.config.js/.mjs
Fix
lazyRootfunctionality fornext/imageChange SWC minify from beta to release candidate
Make
Routerstate immutableStop exposing internal
renderandrenderErrormethods fromnext/clientAdd api-utils helper for testing
next-swc: Update swc
- Deprecated
Deprecate
concurrentFeatureswithruntime Add check for resolveWeak to next/dynamic
Remove unneeded and broken plugin
Remove experimental warning from next/jest
Arrow function export in rsc client component
Use
renderToStreamwith React 18Fix static result being piped
Polyfill pipeTo and pipeThrough
Update to leverage response-cache for image-optimizer
next/imageusage fromnode_modulesFix included flight manifest on node runtime
Use
react-dom/server.browserwhenreactRoot: trueFix image-optimizer requires in next-server
Fix required files matching in rsc
Throw error when ts file contains css.resolve
Chore/stable swc compiler options
Fix bug with "Circular Structure" error
Add _document and _app pre-import
Ensure standalone server handles SIGTERM
Copy
.envfile in standalone modeFix reuse of inline flight response and 404 for RSC in node runtime
Use updated recursive rm fs method for image-optimizer
Fix link for "Delete Query Params in Middleware" error message in
next-server.tsEnable dynamic HTML in minimal mode
Fix uncaught error in getInitialProps when
runtimeis set tonodejsOptimize the web server size
Allow
node-sass@7as peer dependencyAdding step to build the app with docker in existing projects
Changed all occurrences of etc to match
Align reactRoot config between server and webpack config
Fix
<RouteAnnouncer/>shouldn't announce initial path under strict mode and React 18Fix flight root failed to hydrate in strict mode
Allow dismissing full refresh warning for session
Remove experimental image optimization feature
Add support for "type": "module" in package.json
next-swc: Update swc
Ensure invalid request to static page is handled correctly
Add Error Handing section for ISR
next-swc: Update swc
Improve opening a new issue flow
Ensure we don't poll page in development when notFound: true is returned
Add image config for
dangerouslyAllowSVGandcontentSecurityPolicyRevert swc css bump temporarily
Update webpack
Update server-only changes HMR handling
Fix
.svgimage optimization with aloaderpropAllow reading request bodies in middlewares
Revert "Allow reading request bodies in middlewares"
Update webpack
Fix chunk buffering for server components
Remove deprecation for relative URL usage in middlewares
Documentation Changes
Change
urltonextUrlinside delete-query-params-in-middlewa…
Example Changes
Update firebase in with-firebase
Don't wrap
profilein firebase example
Misc Changes
Fix flakey image-optimizer test
Add types to nextConfig in default template
create-next-app: Add default version
Fix functions manifest test
Add pnpm debug file in gitignore templates
Allow listening for page requests in tests
12.0.10
1 Feb 2022- Deprecated
Deprecate process.browser
Image optimizer hangs when invalid image is requested
Make
compressconfigurable in standalone mode
Core Changes
Image optimizer hangs when invalid image is requested
Make
compressconfigurable in standalone modeAllow certain variable names in development
Use swc parse for flight server and client loaders
Properly support custom 500 page in the web server
- Deprecated
Deprecate process.browser
Improve tests for streaming and server components
Fixes #33314 move is-plain-object for es5 compilation
Add
stale-while-revalidatepattern to Image Optimization APIAllow to delete URL search params in middleware rewrites
Ensure all CSS files are included for experimental critical CSS
Ensure non-error thrown in getStaticPaths shows correctly
Fix encoding error with location and refresh headers
Fix duplicate image src causing canceled request
Generate functions manifest
Enable jest hoist transform when using next/jest
next/image: Render valid html according to W3C
Example Changes
Broken npm install
Misc Changes
Use github action instead of bot
Fix syntax error in
lock.ymlFix rsc test suite runner
12.0.9
26 Jan 2022- Removed
Remove node fetch polyfill from base server
- Removed
Removed backticks on data fetching api titles
- Deprecated
errors/no-cache:
netlify-plugin-cache-nextjshas been deprecated
This upgrade is completely backward-compatible and recommended for all users on versions below 12.0.9
Vulnerable code could allow a bad actor to trigger a denial of service attack via the
/${locale}/_next/route for anyone running a Next.js app at version >= 12.0.0, and using built-in i18n routing functionality.How to Upgrade
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
Impact
Affected: All of the following must be true to be affected by this CVE
Next.js versions between
v12.0.0andv12.0.9Using next start or a custom server
Using the built-in i18n support
Not affected:
Deployments on Vercel (vercel.com) are not affected along with similar environments where invalid requests are filtered before reaching Next.js.
We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.
How to Assess Impact
If your server has seen requests to any route under the prefix
/${locale}/_next/that have triggered a heap overflow error, this was caused by the patched issue.What is Being Done
As Next.js has grown in popularity and usage by enterprises, it has received the attention of security researchers and auditors. We are thankful to our users for their investigation and responsible disclosure of the original bug.
We've landed a patch that ensures this is handled properly so the requested route no longer crashes and triggers a heap overflow.
Regression tests for this attack were added to the i18n integration test suite
A public CVE was released.
We encourage responsible disclosure of future reports. Please email us at
security@vercel.com. We are actively monitoring this mailbox.
Core Changes
middlewares: Limit
process.envto inferred usageUpdate webpack
Abstract out native filesystem usage from the base server
Use text data url instead of base64 for shorter encoding
Fix global process testing for the process polyfill
Update swc
Improve full refresh overlay
Custom app for server components
Update yarn PnP tests and disable swc file reading for PnP
Base Http for BaseServer
Update swc
Update check for fallback pages during export
Pre-compile more dependencies
- Removed
Remove node fetch polyfill from base server
Replace regexp to plain string for optimization render HTML
Fix broken html on streaming render for error page
Disable cache for rsc pages
Fix pre-compiled check from copying react-refresh-utils
next-swc: Update swc
Move middleware handling to node server
Enforce absolute URLs in Edge Functions runtime
next-swc: Update swc
Update main field for nccd jest-worker
Move static serving to next server
next-swc: Update swc
Fix multiple calls to image
onLoadingComplete()Refactor base server to remove native dependencies
Update swc
Implement abstract methods to get manifest files in the base server
Simplify getMiddlewareInfo calls
Fix static file check with i18n
Bump styled-jsx
Ensure optional value normalizing is correct for index
Add
next-multilingualexampleRemoved the s from NextConfig
next-swc: Update swc
Fix rsc export component name detection
Upgrade webpack
Ensure fetch polyfill is loaded in next-server
next-swc: Update swc
Add
lazyRootoptional property tonext/imagecomponentnext-swc: Update swc
Implement web server as the request handler for edge SSR
Relay Support in Rust Compiler
Revert "Relay Support in Rust Compiler"
Documentation Changes
- Removed
Removed backticks on data fetching api titles
- Deprecated
errors/no-cache:
netlify-plugin-cache-nextjshas been deprecated
Misc Changes
Add link to security email directly.
Fix getServerSideProps hanging in dev on early end
12.0.8
12 Jan 2022- Removed
Remove anonymous default export rule from Babel
Fix no-server-import-in-page eslint rule for subfolder middleware
Create Base Server
Core Changes
Fix no-server-import-in-page eslint rule for subfolder middleware
Create Base Server
Revert support for render prop in
<Main />Refactor FS references in the Base Server
telemetry: Collect feature usage for linting during build
Chore/load bindings improvements
NODE_ENV: Warn when launching start or build on development
Fix crash in no-page-custom-font eslint rule when default export is unnamed.
Add docs for leveraging outputStandalone config
Replace raw-body with get-stream and bytes
Update to latest ncc and ensure caniuse-lite data is external
Update swc
Simplify custom
WritableAdd shake exports transform to next-swc
Revert "Replace raw-body with get-stream and bytes"
Re-open chore(deps): upgrade browserslist
Fix RSC link navigation
Compile escape-string-regexp
Add unstable_useRefreshRoot
Upate swc
Fix unstable_useRefreshRoot typing
next-swc/styled-jsx: Fix
nthRename experimental vital hook
Inline server data response with partial hydration
Update
jsxtransform of swcFix running server with Polyfilled fetch
Fix dynamic routes with pages under index folder
Fixes #32338 missing Document components trigger an error for production builds
Fixes for inline embedding data in the web runtime
Add vitals and rsc to npm files
Fixes to allow lazy compilation for import()
Upgrade webpack and watchpack
Update to filter loader specific files from traces
Fix server data cache key
Fix hydration for rewrites to dynamic pages
Ensure image-optimizer is traced for standalone mode
Remove unused classnames dependency from react-dev-overlay
next-swc: Emit errors and add tests to next-ssg
Include message body in redirect responses
Prevent NEXT_PHASE env change in workers
Check stack property for page export exceptions
next-swc/styled-jsx: Fix interpolation in media query
Update swc
Add turbo / improve Rust build caching in GitHub Actions
Fix ReadableStream.pipeTo() being unimplemented in the web runtime
Ensure AMP optimizer is only excluded from trace when not used
Upgraded next-env dependencies
Feat/14701 full reload notification
Move fs API for inc cache to node server
Add options to defaultGetInitialProps and upgrade styled-jsx-with-csp example
Fix
style.filteron image withplaceholder=blurFix writing strings to the writable stream writer
next/jest: Do not watch
.nextfolderPre-compile more dependencies
Upgrade react 18 to rc, drop prerelease warning
next-swc: styled-jsx error checking and reporting updated (invalid-styled-jsx-children.md)
Fix style reset on image with
placeholder=blurPre-compile more dependencies continued
Web runtime: add AbortController & AbortSignal
Don't swallow test failures caused by POSIX signals
Escape from next head in rsc _error page
Fix popstate detection for safari when basepath is present
Bust cache for RSC in each render
Update web runtime externals
Reduce styled-jsx size in client bundle
Bump nft to version 0.17.1
- Removed
Remove anonymous default export rule from Babel
eslint: Allow
afor internal url whentarget="blank"presenteslint-plugin-next: Broken links in eslint output
Adds lint rule to flag usage of
<head>Ignore .d.ts files inside pages folder
Fix
next/imagenoscript tag to only render when lazySimplify trace span id generation
Move resolve-url-loader into Next.js
router: Scroll to top when
href="/"and hash already presentRemove un-needed test dependency
Fix issue with escape-string-regexp in IE11
Allow to opt-out from preflight cache
Ensure setImmediate and punycode are polyfilled
Fixes issue with makeStylesheetInert
Reduce install size for linux glibc/musl
Ensure middleware is output in standalone mode
Revert "Reduce install size for linux glibc/musl"
cli: Introduce
next infoCLI commandEnsure NODE_ENV is not inlined for next/jest
Converted the old tailwind css example to typescript
Ensure revalidation error is logged from response-cache
Add util for generating new tests/error documents
Fix middleware at root in standalone mode
Update swc
Use a separate webpack runtime for middleware
Allow dependencies to use environment variables in middlewares
next-swc: Fix ssg code elimination when used in render
Drop dynamic import with
ssr: falseon server-sideFix broken yarn pnp
Add util for normalizing errors
Example Changes
Setup prismic image host
Add .web.jsx extension support in react-native-web example
Typescript example supporting strict w/ version >= 4.4
Misc Changes
Ensure wasm dev artifact uploads even on cache hit
Ensure test wasm does not fail for docs only change
Fix styled-jsx tests from swc bump
Fix flakey next/link react streaming test
Added docs issue template
Ensure experimental SWC options invalidate the cache
Add test case for middleware rewrite to fallback: true page
Ensure device IP is used for safari browserstack test
Run prettier on with-jest and with-jest-babel examples
12.0.7
5 Dec 2021Add test for TailwindCSS JIT mode reloading
Ensure conf type for createServer is not changed
12.0.6
4 Dec 2021Fix document type import path
12.0.5
3 Dec 2021- Removed
Remove trace_target env var in favor of .next/trace
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
This upgrade is completely backward-compatible and recommended for all users on versions below 12.0.5. A backport of the patch to Next.js 11 is available as 11.1.3.
When a URL is provided to
next-serverthat cannot be parsed, anunhandledPromiseRejectioncould occur. On Node.js versions <v15.0.0this isn't a fatal issue as only a warning is shown. However, in Node.js versions >v15.0.0, this causes the server process to exit, which can result in unexpected server crashes.How to Upgrade
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
Impact
Affected: All of the following must be true to be affected
Next.js versions above
v11.1.0and belowv12.0.5Node.js above
v15.0.0being usedUsing
next startor a custom server
Not affected: Deployments on Vercel (vercel.com) are not affected along with similar environments where invalid requests are filtered before reaching Next.js.
We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.
How to Assess Impact
If you are running Node.js >
v15.0.0with Next.js, you can filter any server error logs forERR_INVALID_URL.What is Being Done
As Next.js has grown in popularity and usage by enterprises, it has received the attention of security researchers and auditors. We are thankful to GitHub user
hopeless-programmer-onlinefor their investigation and discovery of the original bug.We've landed a patch that ensures this is handled properly so the
unhandledPromiseRejectionissue no longer occurs.Regression tests for this attack were added to the security integration test suite
A public CVE is requested.
We encourage responsible disclosure of future reports. Please email us at
security@vercel.com. We are actively monitoring this mailbox.
Core Changes
Add a swc transform for removal of
console.*calls.Support ESLint v8
Allow
next lintwithouteslint-config-nextinstalledRemove TextEncoder and TextDecoder wrappers
Simplify output messages
Update webpack
NextResponse: Add
.jsonstatic methodUse _error for development in streaming
Refactor the middleware SSR loader
Add detection for
Google-PageRendererbotClick-to-open error state for development overlay #14461
Ensure only one doctype is rendered
Update swc
Add/wasm build
telemetry: Track usage of 'optimizeFonts'
Make missing
Documentcomponents an errorAdjust AVIF size so that its smaller than WebP size
Fix unhandled rejection on route change in dev
Re-add native package folders and ensure wasm artifacts are downloaded
Fix HMR for middleware #30791
Minor simplifications to
renderToWebStreamFix accessing router before ready for HMR ping
Implement SWC port of next-page-disallow-re-export-all-exports
Prevent
no-html-link-for-pagesfrom warning for static filesMove root div to an app wrapper
Add types for geo lat and long
Fix non-concurrent function _document
Remove outdated comment about string children being deprecated in
next/linkmiddleware: Consider localhost variations
Update swc
Extract next-swc Rust code into its own package
Fix dev router usage before router initializing
Avoid mutating response.cookie options
Add cookies and headers for request using in RSC
- Removed
Remove trace_target env var in favor of .next/trace
Add error link when hydration error occurs
Fix initial compile timing incorrect measurement
Lazily init getStaticPathsWorker
Remove noop import
Update webpack
Fix wasm loading
Remove some watcher hacks and update version
Improve and refactor some types
Read file in swc when no loaders follow the next-swc-loader
Lazy-load postcss
Update webpack
Ensure middleware order is preserved
Refactor sandbox module cache
Fix hydration middleware effects
Support function components in _document in no-page-custom-font
Add support for removing React properties.
Include submodules in exported type definition
Move require.resolve into the module scope
Fix amp validator message format
Fix auto export condition in edge SSR
bugfix: Href value is not defined when typing out the href
Do not load external binding if local was found
Rsc headers
Add port and hostname options to Next Server
Cannot assign to read only property 'children'
Fix disabling of built-in CSS support if there is a custom loader
Include no-document-import-in-page rule in plugin index
Account for platform/arch not supported by napi-rs
Removng prop writable checking in prod
Enable default functional document when concurrentFeatures is enabled
Stop using environment variables in
pages/_documentFix image related link prop warning with react 18 beta
Escape string when converting to regexp
Add TS types for NextMiddleware
types: Add missing ua type for NextRequest
Ensure that external modules are not bundled into the client for RSC
Resolve streaming data for flight requests
Allow pre-release React 18 as peer
Link: Do not ignore onMouseEnter prop with absolute href
Add experimental.swcFileReading flag to disable file reading in swc
Fix middleware types with skipLibCheck: false
Include page for export errors for easier debugging
Avoid retaining webpack config too long
Skip warnings for Image not rendered to the dom
Improve exported root definitions
Fix running server with Polyfilled fetch
Ensure invalid URLs respond with 400 correctly
Remove future.strictPostcssConfiguration config
Revert "Fix running server with Polyfilled fetch (#31935)"
Misc Changes
Revert "Add docs for the Rust Compiler (SWC)."
Ensure wasm package.json is written before publish
Add docs for the Next.js Compiler written in Rust (leveraging SWC)
Fix prettier linting
Fix labels for release sections
Fix musl build
Enable require for swc_bundler
Add test case
Add next-swc to labeler
Add Rich, Maedah, and Ismael to the docs label
Fix copying swc binary for isolated tests locally
Fix the testall npm script
12.0.4
15 Nov 2021Update middleware eval checks
Optimize the SSR middleware runtime size
Improve error handling in the SSR middleware
Core Changes
Update middleware eval checks
Optimize the SSR middleware runtime size
Improve error handling in the SSR middleware
Ensure decode error in minimal mode responds with 400 not 500
Update ServerlessPlugin to use chunkGraph
Fix custom 404 page when concurrentFeatures is enabled
Upgrade React alpha and experimental dependencies to latest
Change disabled SWC message to Log.info
Add render prop support to
<Main>Change .web extension of document page to part of path
Enable code splitting for the web runtime build
Give priority to document.title over h1 when announcing page change
Add webpack5 namespace to fix type errors
Add warning when image has unused
sizespropAdd experimental next-swc jest transform
Support --cache-strategy ESLint argument (fixes #29926)
Fixes #31060: NullReferenceException
Use loader-utils 2 for resolve-url-loader to fix
./data:urls in sassUpdate reason message for isolatedModules and esModuleInterop
Add input/output test for 30091
Fix
useIdmismatches on hydrationDo not hide body when concurrentFeatures is enabled
Fix middleware i18n rewrites
next-swc: Add
displayNameAndIdofstyled-componentsUse require.resolve to detect "framework" packages (fix pnpm)
Add all cases where webpack5 type is used
Add test for styled-components SWC transform disabled
Add initial standalone build handling
middleware: Expose
CryptoKeyandglobalThis.CryptoKeyDisable styled-components displayName in production
31013: Add base path to preflight request url
Share collections in middleware vm context
Support assetPrefix specific protocol
Upgrade webpack
Update swc
Run middleware parser handler only for middleware modules
Update swc minifier
Fix process.env overriden in web runtime
Replaced useless let
Experimental next/jest config helper
Correctly assess node equality when nonce attribute is present
bugfix/i18n Do not support the second locale in the pathname
Ensure next/jest is published
Update swc for
jsc.pathsnext/jest: Ensure typeof window is not transformed in jsdom environment
Output where preference is saved
Upgrade webpack
Ensure asPath is correctly normalized in minimalMode with i18n
Automatically using different port to start dev server for non-explicit port
Resolve stream piper on complete shell for renderToReadableStream
middleware: Fetch resource may be a URL instance (or any stringifiable value)
Ensure NODE_ENV is replaced correctly with swc
Add support for jsxImportSource in tsconfig/jsconfig
30724: Clear "x-middleware-next" header when chaining middlewares
Add eslint rule to prevent importing next/server outside of _middleware
Don't proxy middleware if host is the same
Add support for legacy decorators through tsconfig/jsconfig
Update swc & fix
styled-jsxShow
(middleware only)when a middleware is added to the compilerAdd minify debug env var to investigate minifier bugs
Add filename to babel warning about anonymous function default exports
Refactor server/render for SSR streaming
Remove moment locale replace from craCompat as it's a default in Next.js 12
Fix basePath replacing server-side and
normalizeLocalePath()when path is empty stringClose stream when fatal error occurs
middleware: Add request referrer support
Misc Changes
Fix test-pnp stalling in CI
Fix failed-loading-swc link in Troubleshooting
Ensure Git feature.manyFiles is enabled
Ensure swc dep is copied for isolated tests
12.0.3
5 Nov 2021Improve error message for importing native Node APIs in the edge runtime
Keep attempting to load binary files after failure
Fix Invalid character in header ["Content-Disposition"]
Core Changes
Improve error message for importing native Node APIs in the edge runtime
Keep attempting to load binary files after failure
Fix Invalid character in header ["Content-Disposition"]
Relax restriction of
images.pathin next.config.jsPrevent storing page props cache when in SSG + preview mode
Optimize other fonts provide by Google
Update swc
Add regenerator path
Update loader-utils
Re-enable minifying middleware chunks
Don't require source files to be writeable in dev mode
Fix incorrect
_document.jserror whendisableStaticImages: trueImprove error message for importing unsupported native modules
Update mini-css-plugin and remove experimentalUseImportModule
Ensure dev react bundles are not ignored in traces
Fix client component imports are not being correctly tracked
Update swc
Fix lost combinator before global
Add Next.js version to trace
Update swc
Edge Functions: Expose
globalThisMove browserslist loading webpack-config.ts
Add linux-x64-musl to napi array
Re-enable linux-musl-x64 build target
Add config support for build activity indicator position
Update to use repo specific napi instead of npx
Fixes #30604 - Cannot read properties of null (reading 'tagName')
Update to use project dir for file tracing base
Fix styles that should not be made dynamic
Account for
assetPrefixwhen initializing HMR connectionUpgrade webpack-sources
next-swc: Add.bundle()Fix preset name for improved performance
Use absolute document and app paths for the middleware SSR loader
Fix version in trace
Update resolving for node_modules trace pass
Fix code splitting and build target for the server-web build
Pass Buffer directly to Rust
Misc Changes
Ensure dev binary download skips for docs only change
Fix a couple more missing doc only checks
Add Node.js 17 to CI
Add postinstall script to install native packages
Ensure correct tmpdir is used for install-native
Fix flakey preload test
12.0.2
31 Oct 2021Update tsconfig correctly when compilerOptions is not set yet
Update swc
Fix external fallback for invalid packages
Core Changes
Update tsconfig correctly when compilerOptions is not set yet
Update swc
Fix external fallback for invalid packages
Update swc
Remove console.log
Relax warning for
next/imageparent elementMake sure externals is an array
Fix native-url containing non-es5 usage
Fix issue with placeholder followed by numbers
Share resolve logic for trace and externals
Update to copy necessary RSC files from dep
Update swc
Update swc to fix minifier issue
Exclude musl from target
Revert "Update swc to fix minifier issue"
Fix file path overflowing in error popup
Add warning to update featureName in FEATURE_USAGE backend
Update publish-native to not block on error
Simplify concurrent features related configurations and fix tests
Split Set-Cookie header correctly
Relax warning for
next/imageloader widthFix publish native including non-packages
Fix redundant styled-jsx global issue
Add buffering for streaming until the shell is completed
Check react 18 flags and add more tests
Update to latest shell-quote
Relax warning for
next/imageloader width even moreMake sure "webpack" exists in the repo for typings
Chore/rust workflow
Update webpack
Update output tracing to do separate passes
Revert incremental config to fix missing types
Fix check compiled step
Fix missing dev option for the middleware SSR loader
Fixed "Expected jsx identifier" error on TypeScript generics & angle bracket type assertions in .ts files
Add auto-commonjs and update swc
Provide default fallback _document and _app for for concurrent mode
Remove isCommonJS check as it has been moved to next-swc
Update swc
Misc Changes
Add
incrementalto template/tsconfig.json to avoid changes on first buildFix playwright trace names
Fixed grammatical errors in contributing.md
Ensure native binary is available for release stats
12.0.1
27 Oct 2021Add new target for middleware
Clear up confusion around SWC being disabled for Babel while swcMinify is on
Fix missed hmr events
Core Changes
Add new target for middleware
Clear up confusion around SWC being disabled for Babel while swcMinify is on
Fix missed hmr events
Update SWC OS and CPU fields
Fix flight loader parsing
Keep sortedMiddleware intact as it's used by the runtime
Fix rsc on windows
lint: Remove unused variable
Fix exportRuntime and react-18 concurrent tests
Disable loading of
.swcrcFix PerformanceObserver usage for older browsers and CI
Misc Changes
Ensure linux-aarch64-musl swc target skips when cached
Ignore incremental TS compilation build info
Revert "Make check release job parallel to build job"
12.0.0
26 Oct 2021- Deprecated
Deprecate webpack 4 support
Remove .next/traces directory as it's not used
Update css-loader runtime to use compiled files
Core Changes
Remove .next/traces directory as it's not used
Update css-loader runtime to use compiled files
Fix typings of dynamic suspense
Ensure build trace handles mixed modules
Updates
no-document-import-in-pagerule to usepathseparatorsAdding generic typing for previewData
Add
RenderResultclassReuse warning from postcss-loader
mini-css-extract-plugin should not bundle webpack code
Add tracing for css-loader
Simplify static + dynamic HTML generation
Support single-file linting in
next lint(necessary forlint-staged)Webpack rule to block importing images into _document
Remove outdated webpack conformance experiment
Remove unused profiler
Remove unused dependencies
Update concurrent tests and enable experimental streaming
Fix/swc minify
Ensure timed out prefetches are cleaned up correctly
Simplify
RenderResultShould allow optional properties for
imagesoptionAdopt context based experimental styled-jsx version
Fix ensurePage race condition
Support node-sass@6
Update swc
Update swc in next-swc
Ensure cache-control is correct for notFound: true with revalidate
Update gSSP type to support props as a promise
Use
Writableinstead ofObservablePass code as buffer to swc minify
- Deprecated
Deprecate webpack 4 support
Make next-ssg optional
next/dynamic: AcceptpagesDirUpdate test set-up to leverage playwright when able to
Make traces in development reliable
Fix webpack version and safari test and update compiled
Throw error if res is accessed after gSSP returns
Fix/upload binary artifact
Add crossOrigin type to the NextConfig
Reload the page to show 404 when receiving
invalidevent from on-demand-entriesAdd stats config for SWC
Fix host segment replacing for custom routes
Add/styled jsx swc
Update styled-jsx
Remove inert font tag in font optimization
Remove log from failing to parse source map
Development tracing improvements
Update trace ignores for next import
Fix partial one off global selectors
Update next-swc binaries
Fix transform of ` in styled-jsx
Update next-swc binaries
Ensure Next.js dist files are commonjs compatible with swcLoader enabled
next-ssg: Don't inject
__N_SSPfor files without server props.Build next-swc binaries
Add crawler blocking for fallback: true
Upgrade to typescript 4.4.3
Ensure traces are flushed in development when there is an error
Add name to invalidated span
Suggest incremental typescript for typescript >= 4.4.2
Make code consistent with babel externals
Add support for new URL()
Fix bug where returning
{ notFound: true }from GSP brokenext exportFix #11107 - don't prefetch preloaded modules
Fix array query value has matching
Remove useless getComputedStyle call.
Preserve
next-env.d.tsline endingFix compilation span relationship
Add spans for hot-reloader start
Fix dynamic style issue
Ensure trailingSlash is correct for index with query
Migrate prerender tests to new set-up
Fix resolving href with query and matching as
Fix basePath: false not being honored for client-side redirect
Fix default static /500 with i18n
Remove docker usage for running development tests
Remove collect-dependencies span as it balloons trace size
Initial work for using webpack 5 typings
Rename experimental tracing to
outputFileTracingAdd internal mode for debugging Next.js core webpack
Fix invalid project dir casing breaking Next.js on Windows
Fix add-entry span duration
Update to latest @vercel/nft and use async fs methods
Allow setting custom tsconfig file
Ensure static image works correctly with basePath
Use webpack resolve with nft
Experimental: Hook version of reportWebVitals
Enable unsafeCache for better incremental build performance
Upgrade webpack and enable experiments.cacheUnaffected
Fix
onLoadingComplete()callback when image src is Data URLAdditional bench tracing improvements
Remove inline-source-map for Windows
Ensure blurDataURL is correct in dev with basePath
Update swc
Build next-swc binaries
Ensure initial imports are included in traces correctly
Rename
onReadyToStreamtoonCompleteShellUpdate css parser
Update webpack
Parallelize
requirePagewhen loading componentsInvalidate webpack cache when swc options are enabled/disabled
Update output tracing resolving
Remove error that is too strict in next/dynamic swc transform
Make client and server independent for on-demand-entries
Update resolve options for nft
Fix root global jsx style
Fix custom app file regex
Upgrade swc deps
Ensure all package.json files are traced correctly
Add page mapping for Server Components
Fix ie11 from untranspiled vitals
Update version @babel/runtime
Upgrade webpack
Include param vars in nearest scope bindings
Update
swc_css_parserUpgrade swc deps
Fixes #29553
Add trace file for "next dev"
Update to latest version of node-file-trace
Update swc crates
Fix missing trace items and migrate required files test
Create TelemetryPlugin for collecting feature usage metrics
Fix grammar in conflicting paths error
Update webpack
Bump squoosh to the latest version
Remove webpack 4 support
Ensure conditional resolve alias does not affect server
Chore/update swc
Remove isWebpack5 checks
Prevent image redirection when trailingSlash is set
styled-jsx: Use correct SyntaxContext for identifiers
Use correct arg for require.resolveWeak
Update webpack
Update webpack
serverOnlyChanges should be determined when both compilers are done
Hmr DX improvements
Add trace span for module readFile
Fix bug with getServerSideProps when swcLoader is enabled
build/swc: Add debug utilities
Fix bugs of
styled-jsxandswcFix swc tests
Fix
styled-jsx: Don't drop extra selectorsShow partial compiled message and correct module count
Avoid using absolute paths in import/require
Update swc
Pass sourcemap when swcMinify is enabled
Hide build error when returning to old build
Only schedule pages for disposing and dispose on next compile
Reduce default maxInactiveAge to 15s
Add summary logging option
Handle new hmr connection as heartbeat signal
Allow to reload disposed client pages
Collect feature usage for optimizeCss
Add support for AVIF to
next/imageUpdate swc
Avoid TypeError when comparing path param
jsconfig-paths-plugin: Resolve paths synchronously
Update swc
Update swc
Added more examples to Response Helpers page
Update webpack
Add experimental option to enable fullySpecified
Only listen to drain even once
Update swc & Improve CI time
Enable esmExternals by default
Refactor Document to prep for classic streaming
Update to latest @vercel/nft
Remove unused options from swc-loader
Update swc
Upgrade strip-ansi in react-dev-overlay
Add revalidate to the GetStaticPropsResult
Migrate server-sent events HMR connection to WebSocket
Upate swc to allow line comments in css
Bump "engines" to node >= 12.22.0
Update webpack target to node12.22
Add ESLint docs URLs
Use import() to load next.config.js
Fix config import on Windows and disable test in failing envs
Update swc
Fix identifier handling of
styled-jsxUpdate swc to fix minifier
Remove obsolete prerender indicator code
Update swc
Update swc
Compile native-url and node-libs-browser
Update swc to fix regenerator issue
Update tracing to collect from reasons
Fix eslint loading on Windows
Fix
next/imagewhen parent is<p>Fix trace when initial file is also child
Update react 18 streaming api
Update manifest to include notFound revalidate info
Sanitize the path to the user config before importing
Update swc
Update swc
Update swc
Prevent inherited styles on
next/imagewrapper or sizerUpdate webpack
Print error when
images.loaderis assigned butimages.pathis notUpdate swc
Enable fast refresh transform when using SWC
Implement Middleware RFC
Enable shared worker pool by default
Use xxhash64 by default
Adds temporary error message for ESLint v8
Improve production error message printing
Simplify export statement
Automatically enable managed paths for all node_modules
Skip minifying middleware
Fix creation of styled jsx ids
Update swc
Avoid showing empty
Import trace for requested moduleFix pageKey and compiling output for on-demand-entries
Add experimental.urlImports option
Update swc
Ensure we dont attempt minifying middleware-chunks
Update middleware chunk handling
Ensure error message prints
next.config.mjsUse default
next.config.jsif not foundAdd warning when using middleware
Test and fix error reporting for stack overflows and other fatal errors
Add add
next/scriptsupport forno-unwanted-polyfillioruleMake static image import output path consistent with other media
De-dupe inflight getStaticProps requests
Update include/exclude handling for output tracing
Make import trace consistent between runtime and build
Add middlewareCount info to build optimized
Change AVIF to opt-in via configuration
Add page config swc transform
Move tracing next-server to next build
Update to latest caniuse-lite version
Remove
all: initialin favor of specific styles onnext/imageUpgrade styled-jsx for react 18 improvement
Enable SWC by default when there is no custom Babel config
Enable outputFileTracing by default
Add isDevfallback to cache name to create a separate cache for the fallback compiler
Use SWC for middleware
Update swc
Add deprecation note for target
Add initial documentation for output file tracing
Partially migrate to webpack 5 types
Hide next-middleware-loader in import trace
Fix some labels for middleware stuff
Use
Log.warn()instead ofconsole.warn()in next-serverTest, fix and document all possible import types for URL imports
Ensure isServer is true when compiling middleware
Add initial test trace outputs
Move swcMinify out of experimental
Add events polyfill
next-swc: Support more platforms
Update error for failing to load SWC bindings
Update webpack
Fix middleware on windows
Add warning for large amount of page data
Add warning when LCP image is missing
prioritypropNew Middleware API signature
Fix trace case with tsconfig/jsconfig baseUrl
Warn when mutating res if not streaming
Chore/publish all swc
Update swc-minify-enabled link
Fix middleware header propagation
Move outputFileTracing config up
Track usage of swc features
Ensure null bytes in resolved path are handled
Improve deprecation errors for new middleware API
Example Changes
with-sentry example: Small tweaks
Cover image redirect to undefined
Misc Changes
Fix
next lintno-document-import-in-page on WindowsFix lerna publish for automation token
Add line break to typescript template
Fix create-next-app tests from example change
Ensure browser instances are not re-created un-necessarily
Ensure we only ignore .git cache for check-precompiled
Ensure actions/cache paths match for restoring
create-next-app: Starter styling errors
Fix test/integration/app-document-remove-hmr flake
Add automated bench script for nested-deps
Avoid running multiple test from the same directory in parallel
Add rich to codeowners for docs
Add native build caching to main workflow also
Add trace-to-tree script to allow to visualize traces on the commandline
Fix repo-setup when .DS_Store exists
Add necessary workflow job dependencies
- 11.x
11.1.4
27 Jan 202211.1.3
4 Dec 2021See github.com/vercel/next.js/releases/v12.0.5 for details about this patch.
11.1.2
31 Aug 2021getServerSideProps should support props value as Promise
Ensure custom app regex is correct for Windows
Core Changes
getServerSideProps should support props value as Promise
Ensure custom app regex is correct for Windows
11.1.1
30 Aug 2021Next.js swc publish flow
Ensure config file message is only shown once
Add missing fields to
NextConfigtype
Core Changes
Next.js swc publish flow
Ensure config file message is only shown once
Add missing fields to
NextConfigtypeUse a shared worker pool for collecting page data and static page generation
Use @next scope for native packages
Fix
generateBuildIdtype that can be async functionFix image optimization encoding url
Clean up
Documentin preparation for streamingRender as a concatenation of streams
Add support for dynamic HTML
Support suspense in next dynamic
Handle blob urls in image component
Bypass webpack compilation for precompiled @next/polyfills-nomodule
Remove duplicate doctypes
Fix revalidate for initial notFound: true paths
Add proper error when failing to load next.config.js
Wrong link error message
Add support for Jaeger trace target
Enable pure client suspense in blocking rendering
Add entrypoint tracing
Add module type to build-module trace
Update to latest babel versions
Improve jaeger traces
Fix development mode bug with pages with "+" and other special characters
Let loaders automatically infer source map setting
Avoid fs write
next-env.d.tson read-only filesystemsDocument usage of suspense option of next/dynamic
Add warning when parent styles break
next/imageUse
zen-observablelibraryFix HMR when custom _app or _document is removed
Add relationship between issuer and module to traces
Update generating next-server dependencies
Fix
next/imageblur placeholder when JS is disabledEnsure adding _app/_document HMRs correctly
Adds
process.exittonext lintsuccess outputFix next env vars injection in dynamic
Add layout to data-nimg attribute
Add data attribute to script component
Ensure @babel/core is de-duped when nccing
Fix forked NODE_OPTIONS except for inspect
Enable caching by default
Update test config to leverage swc
Add missing
typescriptproperty toNextConfignext/script fix duplicate scripts
Ensure error is shown correctly for empty headers field
Add default trace format that is exported automatically
Update i18n locales limit to warning
Fix handling for 204 status code with a body
Update warning when parent styles break
next/imageSupport for functional Document components
Ensure dev server side errors are correct
Add CSP to Image Optimization API
Example Changes
Changing import syntax slightly to ensure success with
create-next-app
Misc Changes
Fix publish native script
Fix gh action workflow when docs changed
Add setup for m1 build
Fix crash of lint rule no-document-import-in-page
Ensure all packages are packed while tracing
11.1.0
11 Aug 2021We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --saveAffected: Users of Next.js between 10.0.5 and 10.2.0
A security team from one of our partners noticed an issue in Next.js that allowed for an open redirect to occur.
Specially encoded paths could be used when
pages/_error.jswas statically generated allowing an open redirect to occur to an external site.In general, this redirect does not directly harm users although can allow for phishing attacks by redirecting to an attacker's domain from a trusted domain.
We recommend upgrading to the latest version of Next.js to improve the overall security of your application.
How to Upgrade
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
Impact
Affected: Users of Next.js between 10.0.5 and 10.2.0
Affected: Users of Next.js between 11.0.0 and 11.0.1 using
pages/_error.jswithoutgetInitialPropsAffected: Users of Next.js between 11.0.0 and 11.0.1 using
pages/_error.jsandnext exportNot affected: Deployments on Vercel (vercel.com) are not affected
Not affected: Deployments with
pages/404.js
We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.
How to Assess Impact
If you think sensitive code or data could have been exposed, you can filter logs of affected sites by
//(double slash at the start of the url) followed by a domain.What is Being Done
As Next.js has grown in popularity and usage by enterprises, it has received the attention of security researchers and auditors. We are thankful to Gabriel Benmergui from Robinhood for their investigation and discovery of the original bug and subsequent responsible disclosure.
We've landed a patch that ensures path parsing is handled properly for these paths so that the open redirect can no longer occur.
Regression tests for this attack were added to the security integration test suite
We have notified known Next.js users in advance of this publication.
A public CVE was released.
We encourage responsible disclosure of future reports. Please email us at
security@vercel.com. We are actively monitoring this mailbox.
Release notes
Core Changes
Don't test image domains in test env
Fix props not updating when changing the locale and keeping hash
Allow user to override next-image-loader
Add logging when a custom babelrc is loaded
Add comment to not edit in next-env file
Add trace url on bootup
Add check for ObjectExpression when iterating on <link> tags for font optimization
Fix GSP redirect cache error
Correct statusCode when visiting _error directly
Next dynamic with jest
Ensure API routes are not available under the locale
Fix image content type octet stream 400
Adds --max-warnings flag to
next lintSimplify
next-dev-serverimplementationMove code shared between server/client to "shared" folder
Move next-server directory files to server directory
Support new hydrate API in latest react 18 alpha release
Add upstream
max-ageto optimized imageFix blurred image position when using objectPosition
Leverage blocked page for _error
Detect loop in client error page
Add
onLoadingComplete()prop to Image componentAdd "Vary: Accept" header to /_next/image responses
Add additional tests for image type detection
Fix immutable header for image with static import & unoptimized
Make sure 404 pages do not get cached by a CDN when using next start
Don't emit duplicate image files
Warn when response body is larger than 5mb
Added the key property to the pre next scripts
Ensure API route errors are propagated in minimal mode
5MB -> 4MB body size limit
Update default
.eslintrcfile created to have.jsonformatRefactor decode failures
Add initial
ResponsePayloadsupportMore explicit typing for
IncrementalCacheAPIFix merge issue and use
respondWith(next/image): Merge query string params in imgix loader
(rewrites) incorrect parsing of destination query
Fix forward slash encoding while interpolating
Rename
next/scriptinterface Props to ScriptPropsDon't lazy-load already-loaded image in client-side transition
Loosen
next/imageTS types forwidthandheightAdd
dangerously-unoptimizedloader for next/imageFix hash change events not firing with i18n
Loosen
next/imageTS types forsrcProvide Next.js postcss version to cssnano-simple
Rename next/image
dangerously-unoptimizedtocustomand warn when applicableAdd newline to the end of
next-env.d.tsAdd performance tracing for next-image-loader
Include message body in redirect responses
Add support for esm externals
Enhance
next devperformance with placeholder=blurAdd batching to zipkin reporter
Bind sendBeacon to navigator
Fall back to fallbackSend when send is false
Prevent timeout when loading routes in development
Workaround for Node.js 16+ on Apple Silicon M1
Replace
withCoalescedInvokewithResponseCacheAdd some missing fields to the NextConfig type
Update redirect regexes to not match _next
Bump babel target to Node.js 12
Use SWC to compile Next.js core server files
Fix css minify incorrectly duplicating variables
Fix gsp generation with file extension
Add
minimumCacheTTLconfig for Image OptimizationFix Script beforeInteractive on navigation
Improve static generation UX
Add warning for large number of routes
Add x-forward headers to external rewrites
Remove error when file patterns are unmatched + ESLint setup changes
Fix inline scripts being duplicated when used with
next/scriptcomponentFix
minimumCacheTTLso it doesn't affect browser cachingFix default server host value causing issues on Windows
Fix
placeholder=blurinside<noscript>Fix type NextWebVitalsMetric
Add
RequestContextFix ISR page re-rendering after revalidate expiry (Fork of #24807)
Update NextConfig type to not require experimental or future fields
Allow enabling worker threads on dev server
Refactor i18n checks on request handling
Add configuration for ISR Memory Cache Size
Rename spr config to ISR
Add
keepAlivetonode-fetchpolyfillFix external redirect with i18n domains
Don't cache
nullresponsesUse Sharp if available for Image Optimization
Fix typo in error message
Add
lazyBoundaryprop to Image componentEnsure generateBuildId is not required in config type
Add eslint config options to
NextConfigtypeWait for getFilesForRoute promise to fulfill before timeout in dev mode
Add config check for invalid duplicate locale domains
Add warning when
next/imagecomponent hasstylepropAdds
--formatflag tonext lintESLint: Custom directories from next.config.js
Updated the Error message describing the alternative and added styles…
Clarify error message in isSerializableProps
Update eslint doc comment
Make router ready in case of custom _app getInitialProps
critical CSS: Use the assetPrefix in the critters config
Add initial next swc package with first transform
Add
RenderResultDocument i18n locale limit
Added the content-disposition header
Use SWC for Next.js core client files
Upgrade to webpack 5.47.0 and webpack-sources 3.1.1
Persistent cache need to be invalidated when source-maps are enabled
Update report to leverage new variables
Update Terser
Ensure Next.js core development sourcemaps use correct input file
Undo sourcemap change
URI-encode url parameter in image optimizer
More React 17 clean up
Enforce source/destination limit for custom routes
Add naturalWidth/naturalHeight to
onLoadingComplete()callbackUpdate webpack-sources to 3.2.0 for bugfixes and performance
Add
next.config.jsoption to override defaultkeepAlivePort next-ssg getStaticProps/getServerSideProps tree shaking Babel transform to rust
Add handling for repeated slashes
Add/amp attribute patcher
Add missing
removeHeader()function to image optimizer mock resFix html validation for Image component sizer
Update has query encoding when used in path
Introduce a new setup process when
next lintis run for the first timeRemove unecessary fs.stat calls from recursive-readdir
Wrap last return statement in
elseto fix tree shakingUpdate client error to show link in console
Upgrade styled-jsx
Add experimental SWC minify and SWC loader options
Use @vercel/fetch for run-tests requests
Add next dynamic swc transform
Add Import trace for requested module when it fails to resolve
Disable cache compression as it slows down the build
Remove extraneous fs.stat calls
Replace
placeholderwithblurDataURLin globalStaticImageDatatypeFix
next/scriptunhandled promise rejectionUpdate to webpack 5.50.0
Remove duplicate type for StaticImageData
Add data-nimg attribute to image component
Add experimental
concurrentFeaturesconfigAdd warning during
next buildwhen sharp is missingNext swc publish flow
Documentation Changes
Revert "Update data-fetching.md"
Example Changes
Hydration warning in with-mobx-state-tree-typescript example
Revert "Drop react-is dependency in styled-components example (#27527)"
Misc Changes
Fix error message during create-next-app
Add page with next/image to stats-app
Add test for
placeholder=blurwithassetPrefixAdd additional stats app pages
Add NextPage type to create-next-app typescript template
Support multiple pages directories for linting
Add --dev flag to bundle-analyzer install command
ESLint Config: Adds some more basic a11y rules
Fix eslint config next/core-web-vitals
Add sourceFileName for SWC compiled core files
package.json: Add contributor-friendly lifecycle scripts
Add type annotation for NextConfig to CNA typescript template
Add rootDir setting to eslint-plugin-next
Revert "Next swc publish flow (#27932)"
Revert "Add warning during
next buildwhen sharp is missing (#27933)"
11.0.1
22 Jun 2021- Breaking
Follow the breaking change of jest-config
Fix failing Runner import
Fix babel-loader failing on JSON5 syntax
Core Changes
Fix failing Runner import
Fix babel-loader failing on JSON5 syntax
Fix eslint version check for older versions
Use a client-side navigation when redirecting to a rewriten URL
Fix next/image noscript src path with loaders
Fix long URLs causing 400s with dynamic routes/rewrites
Ensure has query encoding is normalized
Fix Show error when user put wrong values in width or height
Update to latest TypeScript version and de-dupe versions
Automatically use createRoot for React@>=18
Omit svg static imports if custom webpack config is defined
Adds
--quietflag, TypeScript resolver and bug fixesAdd runtime to hotUpdateMainFilename
Add check for startLatency in fast refresh
Ignore invalid accept-language header
Fix domain locales not available on client
Update to only add image import types when enabled
Strongly type
Router.events.onandRouter.events.off
Example Changes
- Breaking
Follow the breaking change of jest-config
Upgrade react-test-renderer version to 17.0.2
Misc Changes
Ensure image-types file is included
11.0.0
15 Jun 2021- Removed
Remove deprecated features
- Removed
Remove experimental tag from Script component
- Removed
Remove feature flags for static image and blurry placeholder
Core Changes
types: Allow nonpromise return types for static functions
Ensure history navigates correctly with dynamic routes + basePath
Fix external check for non-local next import
Ensure providing only query on dynamic route works as expected
Assume a recent
react@experimentalifreactRootis setUpdate to latest webpack 5 and webpack-sources
Set default webpack publicPath value to override auto
Add helpful error for link with multiple children
Ensure rewrites are resolved correctly through history
Fix rewrite and dynamic params on navigating to initial history entry
Enable serial build by default
Don't show webpack version message in production server
Font optimization add preconnect
Enable new babel mode
- Removed
Remove deprecated features
Disable split chunks in webpack 5 in dev mode
- Removed
Remove experimental tag from Script component
next lint+ ESLint in Create Next AppBump "engines" to node >= 12.0.0
Support for static image imports
- Breaking
Bump minimum React version to
^17.0.2 - Removed
Remove feature flags for static image and blurry placeholder
Add note to upgrading guide about React version
Fix "env" key in babelrc with new Babel mode
Enable webpack5 for all apps
Fix types for static image
Do not remove placeholder for data URL
Add warning for older TypeScript versions
Prevent node inspect from causing webpack check to fail
21606: Consider scroll option when using shallow routing
- Removed
Remove opentelemetry/api
Adjust JPEG quality when generating placeholder
Improve check for eslint version
Refactor image optimizer static immutable header
ESLint Updates
Fix immutable header on static image
ESLint: Updates disable ESLint message during builds
Remove
@types/comment-jsonAdd delay to placeholder removal
Add experimental cra-to-next transform in codemod cli
Add global callback for refresh latency
Add css blur when
placeholder=blurESLint: More updates and bug fixes
Add errors for invalid
placeholder=blurusageFix delay between blur image and high res image
Update
json5and remove@types/json5Disable prerendering /500 when _error has getServerSideProps
Update comments for clarity & grammar in router.ts
Include lib folder when publishing next-codemod
Update client-side default error
Add gitignore template to published files for codemod
Fix Firefox image decode error
Enable optimized loading strategy
- Removed
Remove deprecated features and enable future flag
Remove unsupported examples
Remove React version checks and warnings that are no longer needed
Don't create .eslintrc if package.json contains eslintConfig
Add lint checking events
Update to latest version of webpack 5
Example Changes
Bump styled-components version on examples
Added typescript dependency in next-sitemap example
Move viewport meta tag to head in _app.js
Use key while rendering arrays
Misc Changes
ESLint Config: Adds
alttext rule for ImageEnable Strict Mode in new
create-next-appprojectsFix occasional test failures
Have .tsx be in ts template for create-next-app
Ensure correct browser env is used
Fix react@next and react@experimental tests
- 10.x
10.2.3
24 May 2021Lazy load postcss plugins
Add missing i18n types in gip context
Ensure externals are correct for mini-css-extract-plugin
Core Changes
Lazy load postcss plugins
Add missing i18n types in gip context
Ensure externals are correct for mini-css-extract-plugin
Update beforeFiles rewrites to continue
Misc Changes
Fix ie11 has rewrite test
10.2.2
20 May 2021Server doesn't need to be contenthashing at all
Restore webpack defaults for managed/immutablePaths
react-loadable-plugin. Handle undefined opts.caller
Core Changes
Server doesn't need to be contenthashing at all
Restore webpack defaults for managed/immutablePaths
react-loadable-plugin. Handle undefined opts.caller
Misc Changes
Ensure CNA install succeeds with npm and example flags
10.2.1
19 May 2021- Removed
Remove experimental babel flag
Remove unnecessary optimizeFonts key from type
Fix Image compatibility issue when using
sizes
Core Changes
Remove unnecessary optimizeFonts key from type
Fix Image compatibility issue when using
sizesReplace regex lexer with minimal regex for named groups
Remove un-used lib files
Adds ESLint with default rule-set
Don't swallow MODULE_NOT_FOUND error
Fix/link router 24075 take asPath instead of pathName in router
Add experimental blurry placeholder to image component
Update webpack to 5.36.2, use dependOn
Add type checking events
Fix memory leak in require.cache
Don't throw 500 error when Content-type is invalid
Land - Font optimizations - Adobe Fonts / Typekit support
Updated zustand example
build: Log whether type checking is actually performed
Webpack 5 externals fixes
- Removed
Remove experimental babel flag
Cache typechecking with incremental compilation
Ensure next/dynamic transpiles for tests
Handle compression for custom-server render calls
Refactor experimental-script component
Non-writable pages/_app breaks build
I18n context initial props
Ensure webpack cache is invalidated for alias change
Documentation Changes
create-next-app: Add
--ts, --typescriptsupport
Example Changes
with-passport example dependency issue
Misc Changes
next-storybook: Make rules an array in webpack config
Fix rewrite shape in Storybook
Add label for chrome automatically to PR
10.2.0
28 Apr 2021Ensure default fallback values are correct with i18n
Font optimization
Stop mutating
resolvedAsPath
Core Changes
Ensure default fallback values are correct with i18n
Font optimization
Stop mutating
resolvedAsPathFix webpack5 cache distDir
Ensure basePath is not applied for external GSSP redirect
Ensure fallback rewrites dont match over pages with i18n
Ensure no-op export returns without error
Upgrade to webpack 5.31.0
Babel fast mode
Resolve new babel loader through require.resolve
Reduce the number of write syscalls by buffering
Remove bugfix needed for webpack 4 when webpack 5 is used
Ensure no-op rewrite matches dynamic route with i18n correctly
Ensure minimal mode SSR 404 handling is correct
Enable webpack5 by default
Add request deduplication to image optimizer
Use regex lexer for gathering named groups from has
Clean up eventsource initialization
Add react@experimental testing
Upgrade cssnano/postcss version
Fall back to default components when a top-level error occurs
Improve pr stats action
Fix IE11 incompatibility due to string litterals
Fix fallback: false triggering 404 before rewrites
Use same num workers between export and build
Fix serving Images through external rewrite with Image component
Ensure locale is not duplicated from differing casing
Add error for getStaticPaths on non-dynamic page
Ensure query for static pages with rewrites is updated correctly
Startup performance improvements
Disable strictExportPresence when webpack 5 is enabled
Omit un-necessary stack trace from invalid routes
Babel Turbo Loader, Part 2
Ensure locale cookie does not error with similarly named cookie
Add event for webpack 5 usage
Fix metrics measurements under new root API
Add type to previewData
Improve react-loadable-plugin
Webpack 5.35
Ensure locale key not duplicated when navigating back to root path with a query or hash value
Adding script loader files to package.json
Bump next-babel-loader cache key
Ensure dev overlay is triggered for more _app/_document errors
Fix not exposing server errors in hot reloader
experimental: Remove legacy plugin system
Replace experimental
reactModewithreactRootUpdate initial config message
Upgrade eslint to the latest version
Ensure proxy rewrite does not hang on error
Font optimization bug fix
Ensure stalled CSS triggers fallback navigation
Remove experimental note for has routes
Test fixes for Babel mode
Upgrade postcss
Example Changes
Codeblock Syntax Highlighting
Add with-reflexjs example
Object Destructuring Error
Bump styled-components lib version examples
Misc Changes
Add css to the stats-app
Fix types of next-webdriver
Add test for top-level _document error
Fix side effects in router-is-ready tests
10.1.3
2 Apr 2021Fix memory leak in image optimization
Mark this.router protected
Ensure has segments are allowed in destination
Core Changes
Fix memory leak in image optimization
Mark this.router protected
Ensure has segments are allowed in destination
Update decoder to correctly handle grayscale PNGs
Clean up RenderOptsPartial
10.1.2
30 Mar 2021Temporarily remove experimental ESLint integration
10.1.1
29 Mar 2021Make eslint opt-in until it lands on stable
Core Changes
Make eslint opt-in until it lands on stable
10.1.0
29 Mar 2021- Removed
Remove
visibility: hiddenfrom the image component - Removed
Remove
visibility: inheritfrom the image component Revert "Revert "[a11y] Route Announcements""
Core Changes
Revert "Revert "[a11y] Route Announcements""
Upgrade jest-worker
Update webpack, fix runtime location, fix undeclared variable, omit env vars from cache version
Add env var to enable advanced webpack logging and profiling
Get files from entrypoints instead of from chunks
Rename to NEXT_WEBPACK_LOGGING
Improve image optimizer to only create 1 worker thread
Ensure process exits after build completes
Fix invalid console.error link
Experimental feature for allowing importing Typescript files outside of the root directory
Add separate progress output for typechecking
Fix wrong source path resolved from the stack frame to not expose internal code
- Removed
Remove
visibility: hiddenfrom the image component Add fallback for <Image /> component when JavaScript is disabled in browser
Add polyfills for node_modules that are covered in webpack 4 to webpack 5
Add ESLint to Next.js
- Removed
Remove
visibility: inheritfrom the image component Automatically enable webpack 5 when possible
Add has route field
Make sure the image optimization endpoint only response with images
Run server client/server builds serially
Add handling fo beforeFiles, afterFiles, and fallback rewrites
Update err.sh links to use nextjs.org/docs/messages instead
Add os-browserify dep
Temporarily remove the automatic opt-in for webpack5
Example Changes
lib/db: Type mismatch
Add exemple with redux toolkit in typescript
Misc Changes
Add PR template
10.0.9
15 Mar 2021Fix idleTimeout error being thrown in route loader
Dedupe in-flight server data requests
Ensure /404 is not exported during build un-necessarily
Core Changes
Fix idleTimeout error being thrown in route loader
Dedupe in-flight server data requests
Ensure /404 is not exported during build un-necessarily
Remove extra work on cli functions
Upgrade webpack 5
Ensure env is loaded before next config
Update /500 page exporting when _error has custom GIP
Add appDir field to server files manifest
Fix next/image being downloaded multiple times on Safari
Telemetry-compatible tracing
Silence trace debug messages
Ensure export only triggers when static pages are present
Ensure i18n index prefetch is correct with trailingSlash
Update README to fix broken links.
Update error message for next export and next/image.
10.0.8
5 Mar 2021Use absolute paths for require hook
Experimental feature - fix optimizeCss flag for serverless deployments
next/image: Remove
sharpfor wasm variant
Core Changes
Use absolute paths for require hook
Experimental feature - fix optimizeCss flag for serverless deployments
next/image: Remove
sharpfor wasm variantAdd isPreview field to router
Delay server compilation until client compilation is done in development
Reduce webpack watcher aggregate timing
Add generating static 500 status page
Ensure static 500 hydrates correctly with query
Ensure rewrites are resolved while prefetching
Allow smaller sizes in srcset for image with fill layout and sizes prop
Experimental script loader changes
Ensure component load order
Fix index revalidate with dynamic route in minimal mode
Misc Changes
Fix issue templates
Correctly handle fallbacks for webpack 5
Fix experimental optimizeCss for SSR
Add link to TypeScript docs from API Routes section
Load webpack hook before config is required
Add use cases for API Routes to documentation.
Fix typescript-eslint-jest example to remove Prettier package causing errors
Add note about other redirects to
next.config.jsdocs.Fix grammar in next/amp API reference
Add note about preloading to routing introduction.
Add note for using
getStaticPropswith404.jsEnsure optional params are normalized in minimal mode
Add example prepr cms
10.0.7
15 Feb 2021Fix #top anchor link scroll
Add declarations for compiled webpack and loader
Add stats config option
Core Changes
Fix #top anchor link scroll
Add declarations for compiled webpack and loader
Add stats config option
Update stats flag default
Add webpack type to ncc bundle
Rename package build scripts to dev
Add version for stats
Implement webpack require hook
Make experimental stats file approximately 90% smaller
Update reasons array to use module id instead of identifier
Make sure all modules are included in the stats file
Fix profiling plugin for next build
Ensure error is passed up in minimal mode
Add nccing AMP optimizer
Only create locale domain links if on locale domain
link: Cancel idle callback on unmount
Check if parentspan is provided in profiler
Upgrade to lerna 4
Documentation Changes
Revert "Fix docs for sample query parameters"
Example Changes
Send url to gtm.pageview
Misc Changes
Fix getting latest stable tag for stats
10.0.6
29 Jan 2021- Breaking
Bump minimum suggested React version
Update profiling approach to cover webpack runs
Prevent unpredictable dependency hosting by explicitly resolve module path on webpack.ProvidePlugin
Core Changes
Update profiling approach to cover webpack runs
Prevent unpredictable dependency hosting by explicitly resolve module path on webpack.ProvidePlugin
Replace all backslashes when normalizing path in getFormattedDiagnostic
Error when exporting to
staticdirectorynext: Always enable absoluteRuntime when running under webpack
next: Use require.resolve instead of resolve
css: Add strictPostcssConfiguration flag
Add proper error when conflicting paths are detected
Font optimization - remove warning message
Wrong index path revalidation timer
Fix image cache for vector and animated images
Webpack inlining with configuration for v4 / v5
Bump node-sass peer dependency
Webpack 5 and worker-loader support
Webpack loader inlining
- Breaking
Bump minimum suggested React version
Resolve two peer dep install warnings
Fix hydration mismatch on href for url with anchor refs
Minimal mode normalizing
Use webpack resolve api to resolve in externals config
Improve splitChunks config for webpack 5
Add codemod for files that do not support the new React JSX transform
Fix webpack 5 warning + disabling of profiling
Fix splitting page path by buildId
Upgrade webpack 5 for empty entrypoint fix
Add experimental per-page option to disable JS preloads
Preserve asPath while resolving rewrites
Fix shallow routing scroll
next: Respect extends in tsconfig with exclude and include
Fix hostname message in dev/start
Upgrade pinned deps for tests
Require only build directory to be writeable for build
Critical css fix
Fix aspath for getInitialProps
Expanded on No Router Instance
Fix to parse REACT_EDITOR in env
Remove mkdirp
Change type of GetServerSidePropsContext.req.cookies the be the same as NextApiRequest.cookies
Allow
undefinedbody sent tosendData()Font optimization - Pass nonce to inlined font definition
Ensure prerender-manifest contains all i18n revalidate values
Improvements to webpack tracing, including hot-reload
Experimental feature changes
Misc Changes
Fix "rule.test.test is not a function" in @next/plugin-storybook
Fix tests for React 16 + Webpack 4/5
Lint
Lint
Add additional dynamic route hash tests
Add a VSCode Launch configuration for debugging examples
Fix docs only check for CI
Fix and add test filterModuleRules for next-plugin-storybook
10.0.5
6 Jan 2021Remove extra redirect for index with i18n
Update revalidate checks
Ensure query is present with i18n and history navigation
Core Changes
Remove extra redirect for index with i18n
Update revalidate checks
Ensure query is present with i18n and history navigation
Ensure index rewrite is matched with i18n correctly
next/image: Inherit parent visibility
Fix Fast Refresh tests with webpack@5
Ensure path encoding is handled consistently for prerendered pages
Remove import type syntax from core files
Add error for invalid webpack 5 version
Ignore emacs lockfiles
next/image: Ignore typography prose styles
Clean up webpack 5 version error
Update sharp optional dependency to support NPM 7
Remove unnecessary unfetch polyfill for dev
Add profiling to webpack loaders
Ensure next/image loads correctly with basePath
next/link: Reset scroll before lifecycles
Refactor GS(S)P notFound client-side handling
Ensure index basePath is detected correctly
Ensure domain locales are redirected client-side
build: Require test files be full name or extension
router: Consistent scroll behavior for Link/Router#push
next/image: Reduce byte waste for 3x screens
Fix memory leak in useIntersection
next/image: Preload priority images
Move CSS Preloads to top of head at document render
Ensure SSG data 404 handles correctly for non-notFound
Fallback font tag repetition
Upgrade to ncc@0.26.1
Ensure href is updated for locale domain
experimental scroll: Use
sessionStorageinstead ofhistoryAdd isReady field on router
overlay: Skip disable & upgrade platform
Fix react-dev-overlay rem style conflict
next/image: Do not pass-through srcSrc on lazy image
Ensure all entries are cleared from cache on runtime change
Update error when internal href and external as are used
source map: Correctly generate source maps
next/babel: Read env from caller, not process
Don't dedupe meta tags with the same name but unique keys
Ensure isReady is set correctly for auto static dynamic route
Call res.write('') inside apiRes.redirect() helper to prevent an edge case
next: Add missing peer dependencies for sass support
next-mdx: Resolve webpack loader
Move sizes var declaration just before used
next/head: Assign bool attrs to match server
Fix notFound false pages returning 404
Add pr section to azure config
Support for custom image loaders via image component prop
Ensure path starts with / when deleting index basePath with query
Ensure i18n + API rewrite is handled correctly
Update error for mis-matching path in getStaticPaths
Only prefetch Link if router is in context
Add missing isReady declaration to NextRouter type
Example Changes
Build time error for with-mysql example #19635
Add Twilio Paste example
Misc Changes
Ensure webpack 5 test set-up matches integration flow
10.0.4
22 Dec 2020Ensure next commands respect termination signals
Break up the serverless loader into typed handlers
Revert #18921 and inline absolute babel runtime only for YarnPnp
Core Changes
Ensure next commands respect termination signals
Break up the serverless loader into typed handlers
Revert #18921 and inline absolute babel runtime only for YarnPnp
Fix cloudinary default quality to use q_auto
Css optimizations
Script loader component
Error Message Clarity
Update @ampproject/toolbox-optimizer to latest version
Making font optimization as default
Ensure i18n custom routes resolves correctly
Improve way cache version string is created
Custom Server with bodyParser, don't parse body again in API Route
Ensure trailingSlash redirect applies correctly for i18n
Remove aliases that are no longer needed
Fix failing Azure tests
Clear up production build missing message for
next startandnext exportFix double-quoted hotlinks in dev error panel
Update logo for dark mode
Upgrade Terser
Image sizes property becomes 100vw by default
Ensure href resolvedAs is correct with locale
Update terser-webpack-plugin to support webpack 4
Fix prefetching for URLs including trailing slash
Update import to prevent loader from erroring in webpack 5
Update font-stylesheet-gathering-plugin to be webpack 5 compatible
Add required server files manifest
Upgrade
http-proxydependencyAdded flag to identify shallow router events
Move productionBrowserSourceMaps out of experimental
Upgrade webpack-bundle-analyzer
Extend IncomingMessage type to include cookies from middleware
Update experimental profiling
temporary: re-flag font optimization
Ensure only backslashes are in pages-manifest with i18n
Fix webpack 5 terser compat
Set empty document files for amp first
Example Changes
progressive-web-app example
10.0.3
24 Nov 2020Remove old modern mode experiment
Rewrite locale : fix wrong error message
Fix serverless with next start error case
Core Changes
Remove old modern mode experiment
Rewrite locale : fix wrong error message
Fix serverless with next start error case
Correct errsh links in config checks
Ensure non-configured i18n locales 404
Ensure export progress handles less pages than segments
Ensure i18n + trailingSlash works for different page types
Exclude well known files when trailing slash: true
Update fallback locale for locale: false
Use
renderafterhydrateUpdate vitals URL
Misc Changes
Ensure dist-dir test has fresh start
10.0.2
18 Nov 2020Fix router not working on some protocol
Remove @babel/preset-modules
Omit ignored property from <Image/ > to prevent confusion
Core Changes
Fix router not working on some protocol
Remove @babel/preset-modules
Omit ignored property from <Image/ > to prevent confusion
Update Image docs with links to examples
Print error when Image src is protocol-relative
Disable image optimization for Data URLs
Ncc inlining optimizations
Ensure redirects are handled properly from cache
Update ncc
Speed up SSG prefetching
Make getInlineScriptSource arg Readonly
Upgrade browserslist
Ncc Babel inlining
(docs) Add format to
notFoundfor consistencyAdd props
objectFitandobjectPositionto Image componentFix chromedriver set-up to test electron separately
Yarn dev regression fix, ncc revert
Fix lazy loaded images on IE 11 when no IntersectionObserver detected
Ensure we prefetch on hover
Ncc 0.25.0 upgrade and fixes
Upgrade cssnano
Load CSS early instead of only preloading
Ensure correct target is used for ncc'ing web-vitals
Control <Image /> prefetching with React
Fix redirect query handling for param like values
Fix html validation for Image component
Ensure auto-export dynamic routes work with i18n next start
Export ImageProps from Image component
Fix false positive in isSerializable with shared references in arrays
Add etag header to optimized image response
Remove
next-head-countFixed wrong function name in error message
Ensure correct defaultLocale is provided for locale domain
Ensure basePath behavior with GS(S)P redirect
Update chokidar to latest
next: Resolve absolute path to @babel/runtime
Print error during
next exportwith default image loaderReplace page loader with new route loader
Ensure params and locale are parsed correctly in fallback mode
Add test and errsh for mixed notFound/redirect error
Add experimental Next.js plugin version locking
Ensure i18n with basePath works properly
Upgrade use-subscription for React 16/17 bicompat
Adjust how CSS files are fetched
Update node-html-parser lib
Fix grammar in isSerializableProps
Issue #18338 - don't add a trailing slash to external links
Ensure optional catchall prerendered indexes and i18n
Fallback to default config to enable testing Image component
Remove preload for priority images
Fix component lifecycle order for style swap
Add missing
sizesprop on image componentRespect next/babel user provided runtime option
Add "nonce" from <Head> to the injected <style> to satisfy CSP
Upgrade Cosmic example to Next.js 10, image load fix, post sorting by -created_at
Add locale: false for custom-routes + i18n
Enable handling for revalidate and notFound
Fix minifying inline CSS comments
Fix prefetching in IE11
Upgrade
styled-jsxEnsure data prefetch for default locale is correct
Ensure i18n + trailingSlash: true handles correctly
Example Changes
Issue #18256 - examples/with-firebase-authentication: fix to use getIdToken to get the token
Misc Changes
Fix production test compatibility for ie11
Fix relay-analytics test on Azure
Add additional tests
Update create-next-app to init with main as initial branch
Add test for
.icoimage bypassFix incorrect example
10.0.1
3 Nov 2020- Deprecated
Deprecate Image
unsizedproperty and addlayout="fill" Add err.sh for missing images domain
Unlazify images if no intersection observer found
Core Changes
Add err.sh for missing images domain
Unlazify images if no intersection observer found
Add err.sh for image config errors
Add err.sh for i18n config errors
Ensure custom routes handling with i18n
Ensure i18n context values are provided for blocking 404
Add layout prop to Image component
- Deprecated
Deprecate Image
unsizedproperty and addlayout="fill" Add all deviceSizes to srcset for responsive and fill
Avoid calling setState in callback ref
Ensure correct params are used with i18n revalidation
Fix image format for Safari and old browsers
Update 3rd party image loaders to prevent upscaling
Add missing dot to err.sh/nextjs
Remove the static optimization indicator
Rotate image from EXIF data
Ensure preload works correctly with locale option
Ensure html lang is updating on locale transition
Ensure getStaticProps isn't called without params with i18n
Ensure localeDetection: false doesn't detect from header
Allow passing statusCode for GS(S)P redirect
Ensure correct locale is used for non-prefixed path
Ensure locale is added/stripped correctly
Update default widths configuration to handle 2x/3x DPI
Ensure multi-level basePath works properly
Fix dynamic css unloading
Prevent Next.js from removing all of its styles on hydration
Ensure redirect from GS(S)P doesn't render
Example Changes
Order
moduleFileExtensionsleft-to-rightIssue #18360 - loading spinner not showing up
Misc Changes
Fix Symbol.prototype.description
Fix Symbol.protype.description polyfill
Add default tags for issue templates
Add rewrites in storybook preset
10.0.0
27 Oct 2020- Removed
Remove multi-host support for image component and support quality pass-through
- Security
Update resolve-url-loader to fix vulnerability
Add handling for domain to locale mapping
Core Changes
Add handling for domain to locale mapping
Make sure locale detecting is case-insensitive
Fix a couple i18n cases
Font optimization for webpack 5
Allow pages to be async modules to enable top-level-await
Update redirect handling for locale domains
Image component foundation
Resolve to real path before checking for path inequality
Handle preferring default locale over accept-lang preferred locale
Add locale prop for transitioning locales client side
Make sure that params are properly passed to hybrid amp pages
Add i18n items to routes manifest
Add support for returning 404 from getStaticProps
Ensure i18n support with AMP
Call Web Vitals reporting at correct time
Fix initialRevalidateSeconds manifest field with i18n
Add support for Image Optimizer
Add missing next/image package file
Only load plugins with @next prefix
Update default configuration to match image optimization
Fix width param name for Image Optimizer
Unify config.image.breakpoints to config.image.sizes
Improve types for Image Component
Add perf data experiment
Make sure
wparameter is only included when a width is provided.Image component lazy loading
Make sure animated assets aren't de-animated by optimizer
Fix types for lazy image component
Update to postcss-loader 4.0.2.
Update handling for relative files in image-optimizer
Ensure correct default locale is detected for domain locale
- Removed
Remove multi-host support for image component and support quality pass-through
Add
widthandheightprops to Image componentEnsure root index GSP page's revalidate is recorded
- Security
Update resolve-url-loader to fix vulnerability
Pass locales to getStaticPaths for i18n
Add
unsizedproperty to Image componentFix css dependency in /_error
Move sharp to optionalDependencies
Update to PostCSS 8.
Update peerdependency to account for React 17
Upgrade to Chokidar 3.
Upgrade @ampproject/toolbox-optimizer
Fix precompiled code
Image Component: Support for Akamai image CDN
Fix Image component defaults & remove autoOptimize
Fix merge conflict
Update fallback 404 handling to prevent reload loop
Make lazy-loading the default for next/image
Add locale false handling
Bypass image optimization for vector images
Add support for string width/height on Image component
Fix flashing of no-src image when using next/image
Ensure 404 with SSG is rendered correctly with notFound
Update use-subscription to account for React 17 peerDependency
Separate config into
deviceSizesandiconSizesAdd config limit checks for image optimizer
Fix Image
srcsetto ensure the component'swidthis the largest possible imageAdd next/image default loader errors
Image Optimization API should 404 when loader is not default
Adjust configuration option placement
Remove unstable_ prefix from unstable_blocking
Fix browser back issue of redirects from getServerSideProps / getStaticProps
Add support for notFound in getServerSideProps
Improve type for GSP return type
Remove unstable_ prefix from unstable_redirect
Re-add domain locale redirect handling
Remove unstable_ prefix from unstable_notFound
Add fetching 404 SSG data on fallback notFound
Expose configured default locale in GS(S)P methods
Adjust default image quality to 75
Add support number quality on Image Component
Rename iconSizes to imageSizes, remove size limitation
Record leveraged configs
Fix trailing slash for default image loader
Ensure getStaticProps is called for SSG 404 in blocking mode
Enable feature flag
- 9.x
9.5.5
10 Oct 2020Update to have default locale matched on root
Handle css-loader file resolving change
Core Changes
Update to have default locale matched on root
Handle css-loader file resolving change
9.5.4
7 Oct 2020- Removed
Remove left-over api-utils method
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
This upgrade is completely backwards compatible and recommended for all users on versions below 9.5.4. For future security related communications of our OSS projects, please join this mailing list.
A security team from one of our partners noticed an issue in Next.js that allowed for open redirects to occur.
Specially encoded paths could be used with the trailing slash redirect to allow an open redirect to occur to an external site.
In general, this redirect does not directly harm users although can allow for phishing attacks by redirecting to an attackers domain from a trusted domain.
We recommend upgrading to the latest version of Next.js to improve the overall security of your application.
How to Upgrade
We have released patch versions for both the stable and canary channels of Next.js.
To upgrade run
npm install next@latest --save
Impact
Affected: Users of Next.js between 9.5.0 and 9.5.3
Not affected: Deployments on Vercel (vercel.com) are not affected
Not affected: Deployments using
next export
We recommend everyone to upgrade regardless of whether you can reproduce the issue or not.
How to Assess Impact
If you think users could have been affected, you can filter logs of affected sites by
%2Fwith a 308 response.What is Being Done
As Next.js has grown in popularity, it has received the attention of security teams and auditors. We are thankful to those that reached out for their investigation and discovery of the original bug and subsequent responsible disclosure.
We've landed a patch that ensures encoding is handled properly for these types of redirects so the open redirect can no longer occur.
Regression tests for this attack were added to the security integration test suite.
We have notified known Next.js users in advance of this publication.
A public CVE was released.
If you want to stay on top of our security related news impacting Next.js or other Vercel projects, please join this mailing list.
We encourage responsible disclosure of future issues. Please email us at security@vercel.com. We are actively monitoring this mailbox.
Core Changes
Make the image post-processor ignore SVG images
Only update lookups for dev overlay if mounted
Ensure interpolating dynamic href values works correctly
Add automatic reloading when editing GS(S)P methods
Update to show build indicator while re-fetching GS(S)P data in dev
Make parseRelativeUrl return a UrlObject
Add tests for searchParams dev warning
Fix invalid config export errors
Correct client rewrite resolving with query
Fix href resolving with trailing slash enabled
Divide export build output into 4 segments instead of showing it one by one
Include additional query values when interpolating href
Correct page path for GS(S)P data refreshing
Fix align documentation with the code
Remove
next-head-countAdd Support for CSS Module Value Imports
Fix resolving href with a rewrite
Correct query behavior for falsey values to pre 9.5.1 behavior
Importing CSS from Third Party React Components
Add error when href interpolation fails
Security upgrade node-fetch
Upgrade sass loader
Prefer builtin optional chaining and nullish coalescing
Upgrade cacache of terser-webpack-plugin
Upgrade web-vitals
Remove false positive in circular structure detection
Fix Webpack 5 configuration for v5.0.0-beta.30
Improve custom document error message
Use babel 7 jsx syntax
webpack@5.0.0-beta.30: Invalid configurationNormalize asPath for GS(S)P pages
Polyfill missing std lib fns for module browsers
Provide resolvedUrl to getServerSideProps
Fix API page check during SSG page collecting
Update webpack 5 resolving
Separate resolved asPath from resolved URL for GSSP
Fix export-cli progress label default value
Improve server performance by skipping decode/re-encode
Remove extra check in config loading
Expose dotenv loading under separate package
Fix empty title in head
Ensure optional-chaining/nullish coalescing is included
- Removed
Remove left-over api-utils method
Add warning when exporting with custom routes
Normalize optional catch-all fallback: true page params
Update to use hasNextSupport for custom-routes in next export check
Misc Changes
eslint-plugin-next: Support src/pages folder in no-html-link-for-pages rule
9.5.3
1 Sep 2020Add codemod documentation
Remove tslint disables
Strongly type PageLoader
Core Changes
Add codemod documentation
Remove tslint disables
Strongly type PageLoader
Strongly type Head Manager
Improve page loader types
Dedupe ComponentRes type
Remove unused router method
Add initial handling for dynamic route href resolving and rewrites on the client
Reduce router code
Convert performance relayer to TypeScript
Convert next/client to TypeScript
Remove unused dependency
Share NEXT_DATA type instead of recreating it
Modify low priority files in manifest
Add missing dependency caniuse-lite
Refactor <Document> files
Update rewrite params query appending
Update to Terser 5
Make css-minimizer compatible with webpack 5
Fix data URL with root-catchall and basePath
Handle cases where
configis exported after its declarationUpdate stylesheets on page navigation
Fix forEach error in CSS commit in ie11
Allow React experimental version without warning
Add experimental webpack 5 cache option
Fix old TypeScript version compatibility
Replace broken
prop-types-exactpackageForce browser to recompute layout on page nav
Add
<link>attributes in proper orderAdd at attribute to image preload link
Fix IE11 CSS Compatibility
Make
loadPagetrack success of script loadingNormalize request URL/asPath for fallback SSG pages
Reduce filesystem lookups during bootup
Fix basePath and public folder check ending routes early
Fix page checking failing with trailingSlash
Add serialization for mini-css-plugin webpack 5 caching
Correct comment on --help
Fix mini-css-plugin webpack 5 deprecation warnings
Add debug flag for extra build output
Warn on duplicate Sass deps
Ensure unknown static paths 404 for data request
AMP compatibility for Font optimization
Solve last mini-css-plugin webpack 5 warning
Fix optional catch-all
/indexrevalidate paramsDo not alias Node modules for webpack 4
Fix un-transpiled client file with rewrites
Make sure to break rewrites chain when dynamic route matches
Fix render cancel behavior
Add webpack 5 caching for css optimizer
Correct shallow routing behavior through history
Correct initial fallback route param values
Add webpack 5 cache invalidation
Add error when document component isn't rendered
Update Fast Refresh warning
Store css file dependencies info for dynamic imports and apply it at SSR
Enable webpack 5 caching by default
Reuse existing
<link rel=stylesheet>on navReplace <link rel=stylesheet> client-side transitions with <style> tags
Do not rely on
cssTextRemove unneeded error
Promise.prototype.finally is object
Auto enable React's new JSX transform on 17.x
Promise.prototype.finally is object
Export return type for GetStaticPaths
Revert #14580
Example Changes
with-firebase-authentication event listener
Upgrade react-intl workflow in example
Fix hashing algo and locale value hydration
Misc Changes
Add test case for preloading buildManifest
Fix module not found test
CNA: Add warning about permission
Add tests for preview mode caching
Add missing gitignore files
9.5.2
10 Aug 2020Fix hot reloader edge case with broken webpack plugins
Add additional pageProps check
Error overlay should not be dismissable for a server error
Core Changes
Fix hot reloader edge case with broken webpack plugins
Add additional pageProps check
Error overlay should not be dismissable for a server error
Strictly type
react-dev-overlayFix wrong asPath on 404
Complile for ES5 in webpack 5 build
Remove unused error
Fix asPath of rewrite without basePath
Improve router types
Fix dotenv loading with cascading values
Solve large portion of webpack 5 deprecation warnings
Fix some webpack 5 deprecation warnings
Rename exportTrailingSlash to existing trailingSlash property
Support persisting the dev cache buster
Fix CSS grid-column shorthand syntax
Add missing nomodule polyfills and suggest using features only up to ES2019 for browser compatibility
Bug fix: Font optimization
Progress bar for static build
Incremental static generation and regeneration in build output table
Add support for
fallback: 'blocking'Fixed issue with runtime-config returning undefined when building or in a development environment
Disallow basePath: false for internal routes
Run Fast Refresh Loader in Babel Loader
Add experimental image post-processing
Allow absolute urls in router and Link
Enhance module not found error
Normalize serverless asPath value
Adjust overlay modal padding on mobile
Disallow re-export all exports from Next.js pages
Delay server start message until it's listening
Warn when Fast Refresh is disabled (React <16.10)
Remove querystring from the client
Improve Vercel's badge
Notify component when route hash changes
Added Friendly error for res.redirect 🐝
Fix asPath normalizing for non-dynamic pages
Make helpers.ts compatible with ie11
Bug fix: Font optimization
Fix amphtml link rel not respecting basePath
Add browser polyfils for Node.js modules (webpack 5 backwards compat)
Move next-codemod to Next.js monorepo
Resolve alias modules
Add cli for @next/codemod
Do not bundle caniuse-lite
Do not assign to readonly property in Safari
Improvements - Font optimizations
Don’t prevent the browser’s default behavior for Alt key
Example Changes
with-mongodb-mongoose example improper fetch error handling
Misc Changes
Add tests for querystring-relative urls
Add missing gitignore
- 0.0.x
0.0.1
10 Aug 2020
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.