Packages

@next/codemod

16.4.6 · 9 Nov 2026MIT253.5k / weekRepositoryHomepagenpmAtom feed

Your version

12.0.0

major26 Oct 2021Where it was published

12.3.7 is the newest release of 12.x.

In short

1 deprecated54 new76 fixed127 changed119 internal

  • Deprecated

    Deprecate webpack 4 support

Release note

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-page rule to use path separators

  • Adding generic typing for previewData

  • Add RenderResult class

  • Reuse 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 for lint-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 RenderResult

  • Should allow optional properties for images option

  • Adopt 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 Writable instead of Observable

  • Pass code as buffer to swc minify

  • Deprecated

    Deprecate webpack 4 support

  • Make next-ssg optional

  • next/dynamic: Accept pagesDir

  • Update 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 invalid event from on-demand-entries

  • Add 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_SSP for 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 broke next export

  • Fix #11107 - don't prefetch preloaded modules

  • Fix array query value has matching

  • Remove useless getComputedStyle call.

  • Preserve next-env.d.ts line ending

  • Fix 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 outputFileTracing

  • Add 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 URL

  • Additional 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 onReadyToStream to onCompleteShell

  • Update css parser

  • Update webpack

  • Parallelize requirePage when loading components

  • Invalidate 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_parser

  • Upgrade 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-jsx and swc

  • Fix swc tests

  • Fix styled-jsx: Don't drop extra selectors

  • Show 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/image

  • Update 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 ofstyled-jsx

  • Update 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/image when 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/image wrapper or sizer

  • Update webpack

  • Print error when images.loader is assigned but images.path is not

  • Update 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 module

  • Fix 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.mjs

  • Use default next.config.js if not found

  • Add warning when using middleware

  • Test and fix error reporting for stack overflows and other fatal errors

  • Add add next/script support for no-unwanted-polyfillio rule

  • Make 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: initial in favor of specific styles on next/image

  • Upgrade 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 of console.warn() in next-server

  • Test, 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 priority prop

  • New 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 lint no-document-import-in-page on Windows

  • Fix 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

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.