v12.0.8
Core Changes
- Fix no-server-import-in-page eslint rule for subfolder middleware: #32139
- Create Base Server: #32154
- Revert support for render prop in
<Main />
: #32184 - Refactor FS references in the Base Server: #32179
- telemetry: collect feature usage for linting during build: #32022
- Chore/load bindings improvements: #32191
- fix(NODE_ENV): Warn when launching start or build on development: #14033
- Fix crash in no-page-custom-font eslint rule when default export is unnamed.: #32251
- Add docs for leveraging outputStandalone config: #32255
- Replace raw-body with get-stream and bytes: #21915
- Update to latest ncc and ensure caniuse-lite data is external : #32064
- Update swc: #32210
- Simplify custom
Writable
: #32247 - Add shake exports transform to next-swc: #32253
- Revert "Replace raw-body with get-stream and bytes": #32305
- Re-open chore(deps): upgrade browserslist: #32300
- Fix RSC link navigation: #32303
- Compile escape-string-regexp: #32310
- Add unstable_useRefreshRoot: #32342
- Upate swc: #32365
- fix unstable_useRefreshRoot typing: #32364
- fix(next-swc/styled-jsx): Fix
nth
: #32358 - Rename experimental vital hook: #32343
- Inline server data response with partial hydration: #32330
- Update
jsx
transform of swc: #32383 - Fix running server with Polyfilled fetch: #32368
- Fix dynamic routes with pages under index folder: #32440
- Fixes #32338 missing Document components trigger an error for production builds: #32345
- Fixes for inline embedding data in the web runtime: #32471
- Add vitals and rsc to npm files: #32472
- fixes to allow lazy compilation for import(): #32441
- upgrade webpack and watchpack: #32173
- Update to filter loader specific files from traces: #32267
- Fix server data cache key: #32506
- [middleware] Fix hydration for rewrites to dynamic pages: #32534
- Ensure image-optimizer is traced for standalone mode: #32522
- Remove unused classnames dependency from react-dev-overlay: #32487
- next-swc: Emit errors and add tests to next-ssg: #32254
- Include message body in redirect responses: #31886
- Prevent NEXT_PHASE env change in workers: #28941
- Check stack property for page export exceptions: #32289
- fix(next-swc/styled-jsx): Fix interpolation in media query: #32490
- Update swc: #32566
- Add turbo / improve Rust build caching in GitHub Actions: #31464
- Fix ReadableStream.pipeTo() being unimplemented in the web runtime: #32602
- Ensure AMP optimizer is only excluded from trace when not used: #32577
- Upgraded next-env dependencies: #32613
- Feat/14701 full reload notification: #28866
- Move fs API for inc cache to node server: #32604
- Add options to defaultGetInitialProps and upgrade styled-jsx-with-csp example: #32594
- Fix
style.filter
on image withplaceholder=blur
: #32623 - Fix writing strings to the writable stream writer: #32637
- fix(next/jest): do not watch
.next
folder: #32659 - chore: Update swc: #32664
- Pre-compile more dependencies: #32627
- Upgrade react 18 to rc, drop prerelease warning: #32619
- next-swc: styled-jsx error checking and reporting updated (invalid-styled-jsx-children.md): #31940
- Fix style reset on image with
placeholder=blur
: #32680 - Pre-compile more dependencies continued: #32679
- web runtime: add AbortController & AbortSignal: #32089
- Don't swallow test failures caused by POSIX signals: #32688
- Escape from next head in rsc _error page: #32624
- fix popstate detection for safari when basepath is present: #32687
- Bust cache for RSC in each render: #32710
- Update web runtime externals: #32717
- Reduce styled-jsx size in client bundle: #32730
- Bump nft to version 0.17.1: #32737
- Remove anonymous default export rule from Babel: #32763
- feat(eslint): allow
a
for internal url whentarget="blank"
present: #32780 - fix(eslint-plugin-next): Broken links in eslint output: #32837
- [ESLint] Adds lint rule to flag usage of
<head>
: #32897 - ignore .d.ts files inside pages folder: #30728
- Fix
next/image
noscript tag to only render when lazy: #32918 - Simplify trace span id generation: #32946
- Move resolve-url-loader into Next.js: #32932
- fix(router): scroll to top when
href="/"
and hash already present: #32954 - Remove un-needed test dependency: #32616
- Fix issue with escape-string-regexp in IE11: #32708
- Allow to opt-out from preflight cache: #32767
- Ensure setImmediate and punycode are polyfilled: #32768
- Fixes issue with makeStylesheetInert: #32027
- Reduce install size for linux glibc/musl: #32850
- Ensure middleware is output in standalone mode: #32967
- Revert "Reduce install size for linux glibc/musl": #32973
- feat(cli): introduce
next info
CLI command: #32972 - Ensure NODE_ENV is not inlined for next/jest: #33032
- converted the old tailwind css example to typescript : #32808
- fix: ensure revalidation error is logged from response-cache: #32657
- Bump
@vercel/nft
to 0.17.2: #33048 - Add util for generating new tests/error documents: #33001
- Fix middleware at root in standalone mode: #33053
- Update swc: #33063
- use a separate webpack runtime for middleware: #33134
- Allow dependencies to use environment variables in middlewares: #33141
- next-swc: fix ssg code elimination when used in render: #32709
- drop dynamic import with
ssr: false
on server-side: #32606 - Fix broken yarn pnp: #32867
- Add util for normalizing errors: #33159
Documentation Changes
- Fixed Yarn and NPM
dev
swapped arguments: #32135 - Removed misleading id's from headings: #32163
- Details about starting dev server Next.js docs.: #32002
- Add Umbraco Heartcore blog example: #21409
- Fix error page doc for no server import in page: #32164
- Document staticPageGenerationTimeout config: #32306
- Change using-preact example dependencies and docs: #30394
- Updated link to Local Images: #32427
- docs: remove empty example link: #32439
- Update react version to rc in react-18 doc: #32473
- doc: update remark import: #32481
- Include mention of the onError Prop for next/script: #31945
- Document basePath redirect field for getStaticProps/getServerSideProps: #32550
- Fix typo in documentation: #32581
- Add moduleDirectories for TS Jest Config: #32574
- Added section about router methods returning a promise: #31341
- Added example for setting cookie before redirect in middleware: #32542
- chore: convert Jest examples to TypeScript: #32705
- Update note about .next/static in standalone mode: #32771
- Fixed syntax error in the example of React Hydration Error: #32773
- fix: typo: #32820
- Update the React 18 documentation: #32896
- doc: add quotes to api: #32898
- Update lint-staged example to use node.js path: #30510
- Update scrolling example using query param instead of hash: #31473
- Updated wrong link to example of gtag init in measuring-performance.md: #32974
- Update deployment documentation.: #32006
- Fix link for Next.js Analytics in docs: #33049
- docs: fix typo in MDX docs: #33077
- docs: minor text-copy cleanup: #33120
- No info on environment variables in the src folder (#33110): #33136
- Add Caveats section to custom error page: #33160
- Fixes #33153: Updating cross-references from master to main + canary: #33198
- Docs: correct ignorance pattern for .env.local: #32647
- Refactor data fetching API docs: #30615
Example Changes
- fix cms-sanity example: #32182
- Fix issue in auth0 example: #32293
- Update Next.js version in api rate limits example: #32326
- Update example for Tailwind v3: #32339
- chore: remove duplicate example: #32391
- Updated to working example: #32256
- Update Dockerfile: #32299
- Update docker image to leverage output traces: #32258
- chore(blog-starter): update tailwindcss to v3: #32398
- fix: setup prismic image host: #31589
- fix: add .web.jsx extension support in react-native-web example: #32076
- Update 14-alpine to 16-alpine: #31777
- chore(blog-starter-typescript): update tailwindcss to v3: #32579
- Typo fix in comments: #32609
- This example does not show how to use Jest with TypeScript: #32633
- Updates with-supertokens example: Fixes init race condition: #32706
- Add authentication example using Stytch: #32194
- Update Sentry example readme to mention Next.js 12 support: #32724
- fix(examples): Update
nextjs-graphql-with-prisma-simple
example API endpoint: #32759 - chore(examples): remove duplicate examples: #32779
- fix(examples): bring
with-semantic-ui
example up-to-date: #32805 - fix(examples): update link URL in
cms-kontent
example: #32806 - Add id to inline Segment script: #32878
- Remove un-necessary second yarn install from example Dockerfile: #32934
- fix(examples): add missing dependencies: #32977
- Rename api in with-redis example: #33016
- fix(examples/cms-contentful): add correct Content-Type + missing closing tag for html: #30321
- Avoid page double render with emotion vanilla: #30541
- fix: typescript example supporting strict w/ version >= 4.4: #33042
- [chore] Update
deta
version in examples: #30204 - (examples/with-next-translate) Removed Redundancies in Strings: #29501
- Remove extra config from tailwind example: #33062
- Adding Asset Component for Rich Text Renderer: #32503
Misc Changes
- chore: auto close inactive issues without reproduction: #32214
- Ensure wasm dev artifact uploads even on cache hit: #32248
- Ensure test wasm does not fail for docs only change: #32259
- chore: lock version on stale action: #32262
- Fix styled-jsx tests from swc bump: #32297
- Update AMP validation tests: #32327
- Update only fetch all tags for publish commits: #32337
- Fix flakey next/link react streaming test: #32351
- test: add wait timeout between clicks for rsc link: #32376
- test: add timeout for dev entries to avoid hard navigation: #32476
- chore: lock stale & closed issues sooner
- Added docs issue template: #32488
- Ensure experimental SWC options invalidate the cache: #32540
- Edited contribution docs: #32583
- Update contributing guidelines for examples: #32584
- Remove unused turbo env vars: #32588
- Move some img tests out of serverless mode: #32620
- Disable turbo for build-native temporarily: #32621
- Add test case for middleware rewrite to fallback: true page: #32626
- Ensure device IP is used for safari browserstack test: #32712
- fix: run prettier on with-jest and with-jest-babel examples
- Update readme.md of next-mdx to allow typescript file extensions for pages: #32830
- chore: decrease stale time before closing issues with no reproduction: #32955
- Re-enable turbo caching for swc build jobs: #32617
- fix(ci): Remove unused turbo remote cache env vars: #33030
- Update next.config.js: #33091
Credits
Huge thanks to @arthurfiorette, @thibautsabot, @shuding, @chimit, @joperron, @devknoll, @MaedahBatool, @kyliau, @padmaia, @moh12594, @rasmusjp, @balazsorban44, @molebox, @bryanrsmith, @TrySound, @josharsh, @kdy1, @styfle, @huozhi, @delbaoliveira, @PizzaPete, @thecrypticace, @arturparkhisenko, @segheysens, @thevinter, @aryanbeezadhur, @xiaohp, @tknickman, @javivelasco, @oriolcp, @sokra, @smakosh, @ijjk, @jorrit, @timneutkens, @hanneslund, @mix3d, @Clecio013, @michielvangendt, @intergalacticspacehighway, @jbraithwaite, @marcelocarmona, @benmerckx, @haykerman, @steven-tey, @jaredpalmer, @pi-guy-in-the-sky, @JuanM04, @apollisa, @D-Pagey, @jameshfisher, @rishabhpoddar, @Kikobeats, @ramosbugs, @dan-weaver, @chris-stytch, @MikevPeeren, @janpio, @emw3, @nubpro, @cmdcolin, @joostdecock, @sgallese, @housseindjirdeh, @MinervaBot, @cjboco, @Ryuurock, @dm430, @mkarkachov, @nvh95, @gfortaine, @kumard3, @zifeo, @vicente-s, @Rohithgilla12, @brookton, @leerob, @skirsten, @davidfateh, @DavidBabel, @mannybecerra, @Schniz, @glenngijsberts, @pveyes, @kaykdm, and @xhiroga for helping!