github vercel/next.js v13.0.0

latest releases: v14.3.0-canary.39, v14.3.0-canary.38, v14.3.0-canary.37...
18 months ago

Core Changes

  • Use resolved url in flight entry loader: #40697
  • Handle redirects in new router: #40396
  • Combine redirect function in new router: #40717
  • fix: InferGetServerSidePropsType and InferGetStaticPropsType: #40635
  • Update to leverage AsyncLocalStorage for app static handling: #40727
  • Change flight querystring to header: #40752
  • Improved bundling strategy for the server graph: #40739
  • Remove unnecessary experimental flag: #40766
  • next-swc: add next-font-loaders to crates/core: #40221
  • Add next font package: #40227
  • Strip internal pages for pagesDir in app edge ssr: #40776
  • Add support for font loaders: #40746
  • Set __NEXT_NEW_LINK_BEHAVIOR in Jest tests when newNextLinkBehavior is true: #40702
  • Add handling for 404 in new router: #40787
  • Fix alias paths for bundling: #40800
  • Fix required server files for font loader manifest: #40784
  • Add local font loader: #40801
  • Update error handling during app static generation: #40823
  • Handle redirect in same way as 404 in new router: #40796
  • build: upgrade edge-runtime: #40788
  • Allow export const in font loader: #40836
  • chore: Update swc: #40832
  • Update app-router options type: #40862
  • Flight client navigation error: #40861
  • Use startTransition for hydrateRoot to opt-in to non-blocking hydration: #40874
  • Add optoutServerComponentsBundle option: #40770
  • Apply #40833: #40872
  • Upgrade react@experimental: #40885
  • Update handling of redirect/404 throw to cross server->client boundary: #40890
  • Update pre-compiled: #40914
  • Update font loader output path: #40868
  • Disable head element lint rule for appDir: #40921
  • Should resolve esm external module imports on server: #40865
  • edge-ssr: bundle next/dist as ESM for better tree-shaking: #40251
  • Improve types for <Image /> and responseLimit: #40863
  • chore: Update swc: #40928
  • Ensure skipClientCache is honored for router.push: #40932
  • Fix bundling and module resolution in the server layer: #40818
  • Handle loading returning undefined: #40938
  • Fix SWC loader ignore for the server layer when Babel is used: #40939
  • Code refactoring for webpack-config: #40942
  • Merge e2e test node_modules: #40926
  • Rename 404 -> not-found for new router: #40941
  • remove reducer from server bundle: #40959
  • [edge] serialize custom config to middleware-manifest: #40881
  • Font loader support in app: #40898
  • docs: add inline documentation for Link props: #40855
  • feat(experimental): option to polyfill fetch using undici in Node.js <18: #40318
  • Update return shape of generateStaticParams: #40965
  • remove legacy transform code: #40966
  • Revert "edge-ssr: bundle next/dist as ESM for better tree-shaking (#40251): #40967
  • Update to use HEAD request for middleware query hydration: #40973
  • Revert "Merge e2e test node_modules (#40926)": #40974
  • edge-ssr: bundle next/dist as ESM for better tree-shaking (#40251): #40980
  • Rename flight parameters to rsc/next: #40979
  • Remove outdated warning: #40988
  • misc: add MANGLING_DEBUG option: #40958
  • Fix wrong code condition used when bundling the server: #40987
  • Move pagesDir handling out of wrappedRender: #40995
  • Fix unused CSS module imports are tracked on the server: #40996
  • Skip creating virtual app client entry for pages: #41000
  • chore: remove unsless @ts-ignore: #40992
  • Add support for fallback font and css variable for font/local: #40990
  • Use throw to trigger Suspense to avoid use() in reducer warning: #40950
  • chore: Update swc: #40983
  • Revert "chore: Update swc": #41015
  • Docs for experimental font optimization adjustFontFallbacks: #40771
  • Drop legacy React DOM Server in Edge runtime: #40018
  • misc: make useReducerWithDevtools noop on server: #41019
  • Remove reload on serverComponentChanges in pages: #41020
  • chore: Update swc_core to v0.28.10: #41016
  • Alias all client, shared, pages dist assets for esm: #41034
  • Add Replay integration for dev e2e tests: #40955
  • Add with-xata example: #39864
  • Make sure polyfills are added for browsers without module support: #41029
  • Move handling of navigation to pages from new router: #41001
  • Adding experimental size adjust based option: #41009
  • chore: add build step to eslint-plugin-next: #38647
  • chore: make sure polyfills are built for pnpm dev: #40335
  • refactor: migrate eslint-plugin-next to typescript: #41046
  • Improve experimental feature naming: #41060
  • Full page reload when navigating to new root layout: #40751
  • Use deterministic module IDs for server: #41066
  • Accept variable prop in google font loader: #41065
  • Font loader call json parsing fix: #41052
  • build(next/swc): consolidate swc_core dependency version: #41043
  • Skip pagesDirRules when pagesDir is not present: #41075
  • Fix experimental undici warning: #41077
  • Temporarily disable prefetch in new router: #41086
  • Add conflicting app and page error: #41099
  • chore(server): improve dev logs formatting: #41109
  • rename flush effects to server inserted html: #41073
  • Check required root layout tags: #41120
  • Lint files with mjs, mts, cjs and cts extension by default: #40879
  • Improve error messages of server compilation: #41136
  • Fix edge function req.url handling with rewrite: #41139
  • Ensure entry tracing applies for app correctly: #41140
  • add attribution to web vitals: #39368
  • Update minimum required Node.js version to v14: #41150
  • Handle hmr for edge ssr in app dir: #41156
  • chore: Update swc_core to v0.28.20: #41153
  • Remove unnecessary moduleId option: #41160
  • Apply experimental configs for middleware: #41142
  • Fix reading edge info for app paths: #41163
  • Fix warning messages for next export: #41165
  • Refactor app dir related flags: #41166
  • Fix prefetch for new router: #41119
  • Disable built-in css-in-js transform on server layer: #41040
  • docs(image): improve error message when sharp is missing in standalone mode: #41133
  • Fix latest experimental react and experimental-edge and unpin test versions: #41200
  • Font loader with babel error: #41151
  • Remove hook_optimizer transform: #41203
  • chore: Update swc_core to v0.29.5: #41181
  • Update edge runtime to 1.1.0-beta.37: #41211
  • Alias next/dynamic to lazy impl for appDir: #41216
  • Do not bundle react-dom in the SSR build: #41227
  • Add response stream errorhandling in edge-function-runtime: #41102
  • App font file preload: #41158
  • Fix app static generation cases: #41172
  • Enabel appDir when flag and dir existed at the same time: #41233
  • Font loaders next config shape: #41219
  • refactor dev overlay into hot reloader: #41231
  • fix(middleware): 'instanceof Function' is dynamic code false-positive: #41249
  • Snyk upgrade 27010339d65c4a43f7b564bbebecab85: #41240
  • fix(ts): relax AppProps to not require generic: #41264
  • Recover from font loader error in dev: #41251
  • Handle as on next/link with new router: #41285
  • Load beforeInteractive scripts properly without blocking hydration: #41164
  • Add test for link back to original page: #41297
  • Local font files adjust fallbacks: #41180
  • Update middleware query hydration handling: #41243
  • Fix NextUrl trailing slash normalize for data route: #41311
  • Global layouts error boundary: #41305
  • fix(image): don't show placeholder warning in Jest: #41329
  • Handle error overlay for new router: #41325
  • fix(standalone): support type: "module": #41268
  • perf: lazyload the edge runtime in NextServer: #41322
  • Add pretty error when image import is invalid format: #41267
  • chore: Update swc_core to v0.32.8: #41304
  • Client component directive: use client: #41333
  • Fix middleware rewrite for _next/data: #41341
  • Add codemods for next/image: #41004
  • Fix middleware URL normalize case: #41342
  • Update next/image codemod to handle require(): #41345
  • Ensure RSC paths are normalized in minimal mode: #41348
  • Refactor error overlay for new router: #41343
  • inline httpproxy usage: #41330
  • proper error if middleware or api/route not return a Response: #41336
  • Fix CSS imports tree-shaking: #41357
  • Ensure content is kept rendered below the error overlay on build errors in new router: #41360
  • refactor(#41164): polyfill-module should block hydration: #41352
  • Fix onLoad prop in next/future/image: #41374
  • Add exports for new router: #41368
  • App font loader tree shaking: #41384
  • perf: lazy eval headers from the requestStore: #41353
  • fix: disable css cache busting in production: #41392
  • Upgrade next-swc-napi to NAPI-RS v2: #40094
  • Fix prefetching for static app paths: #41398
  • perf: lazy evaluate more modules: #41354
  • BREAKING CHANGE: Rename next/image to next/legacy/image & rename next/future/image to next/image: #41399
  • Fix edge workers being re-used unexpectedly: #41402
  • Remove edge shared deps: #41413
  • Upgrade React experimental: #41419
  • Update edge runtime to 1.1.0-beta.39: #41418
  • Update flakey dev AMP tests: #41428
  • Add new diagnostics: #41429
  • Move root layout validation: #41338
  • chore: bump server pre-compiled target to Node.js 14: #41424
  • Fix middleware dynamic route param on query hydration: #41436
  • chore: Update swc_core to v0.38.4: #41401
  • Don't show error overlay for not found and redirect: #41438
  • Change useSearchParams to URLSearchParams: #40978
  • perf(#41392): improve cache busting inject performance: #41443
  • Rename reload to refresh in new router: #41448
  • Disable isNavigatingToNewRootLayout: #41457
  • fix(app-render): make css and font respect assetPrefix: #41455
  • Ignore serverComponentChanges in pages: #41464
  • Include frameworks in main-app: #41465
  • Fix typo and add comment to next/image SyntheticEvent: #41480
  • Update next/image docs and examples: #41434
  • chore: Update swc_core to v0.38.22: #41477
  • Fix useSearchParams comment: #41483
  • fix(stream): Allows body larger than 16 KiB with middleware: #41270
  • fix(41456): check src/app folder too in getHasAppDir: #41458
  • BREAKING CHANGE: Enable newNextLinkBehavior: #41459
  • Avoid using the CSS href as the link tag key: #41493
  • Fix global css being marked as side effect free: #41481
  • Append the fragment in NextUrl.toString(): #41501
  • Add vary header to fix incorrectly caching RSC as HTML response: #41479
  • Enable swcMinify by default: #41506
  • Move fetch revalidate config under next options: #41505
  • Fix app sc_client componet HMR server-side: #41510
  • fix(ts): Cookies -> NextCookies: #41491
  • Update edge runtime to 1.1.0-beta.40: #41513
  • BREAKING CHANGE: Remove target: serverless: #41495
  • Fix next-app-loader bug in windows: #41520
  • Prebundle react for appDir: #41337
  • BREAKING CHANGE: Remove browsersListForSwc and change default to legacyBrowsers: false: #41529
  • chore: Update swc_core to v0.39.7: #41544
  • Mark styled-jsx as client-only package: #41414
  • Fix case where dispatch was missing: #41553
  • Upgrade react-server-dom-webpack and precompiled assets: #41547
  • Improve type checking: #41427
  • Create hash digest for errors in app in production: #41559
  • fix: allow user directory with styled-jsx prefix in next dev: #41484
  • Fix next/image svg blur placeholder with fill: #41573
  • Add TypeScript plugin: #41569
  • Update RSC detection in minimal mode and fix config collection: #41541
  • Add back() and forward() to new router: #41575
  • Update page config APIs: #41580
  • Improve server bundling strategy: #41584
  • Update error message for invalid react-dom/server imports: #41582
  • Support overriding request headers in middlewares: #41380
  • Check root layout change on client: #41475
  • Full remaining path in selected layout segment: #41562
  • Add back/forward test for new router: #41590
  • perf: refactor path logic in router + add LRU cache: #41365
  • Add transpilePackages option: #41583
  • Font loader types: #41591
  • Updating size-adjust calculation: #41406
  • Fix missing JSON.stringify in loader: #41599
  • Root layout head not required: #41621
  • feat(edge): adds AsyncLocalStorage support to the edge function sandbox: #41622
  • Add support for images.loaderFile config: #41585
  • BREAKING CHANGE: Remove React 17: #41629
  • Update next-image-experimental codemod to handle loaders: #41633
  • Font loader default config: #41628
  • Disable using prebundled of react for appDir: #41635
  • Refactor hot-reloader client for app: #41598
  • Enable ReactRefreshLogBox-builtins.test.ts, remove loader from import trace: #41645
  • layout: add build status for app routes: #41627
  • Update @types/node to 14.14.31: #41634
  • Change data-nimg attribute on next/image: #41612
  • chore: Update swc_core to v0.40.7: #41613
  • Update to handle correct react version with app: #41658
  • Improve errors for invalid component export: #41657
  • Add experimental warning note: #41666
  • Bundle ssr client layer excepts react externals: #41606
  • Improve error message for wrong props: #41668
  • Remove deprecated webpack5 config option: #41667
  • Improve error messages: #41669
  • Create root layout: #41523
  • Ensure we properly normalize /index in minimal mode: #41678
  • Update params of PageProps to string map: #41677
  • Expose AsyncLocalStorage on global for react: #41683
  • Update URL malformed edge error: #41685
  • Update to latest react experimental: #41671
  • Revert "Add experimental warning note": #41688
  • Fix typos: code comment: #41691
  • useSelectedLayoutSegment -> useSelectedLayoutSegments, add useSelectedLayoutSegment with previous behavior: #41693
  • Ensure AsyncLocalStorage for static generation is shared for client & server: #41695
  • App dir sass: #41690
  • chore: Update swc_core to v0.40.13: #41692
  • Disable esm resolving for appDir and alias react: #41687
  • Print error when next dev has conflicting app & page: #41656
  • Support next option for Request: #41614
  • Revert "chore: Update swc_core to v0.40.13": #41699
  • Revert "Revert "chore: Update swc_core to v0.40.13"": #41700
  • chore: Update swc_core to v0.40.16: #41702
  • Move redirect and notFound to navigation exports: #41703
  • Font subsets in function call: #41694
  • Include resolved external package dirs: #41706
  • Fail on prerendering with dynamic error config: #41707
  • Update precompiled react to next channel: #41708
  • Emit VSCode settings for TypeScript: #41710
  • Upgrade Edge Runtime v.1.1.0: #41727
  • Fix module trace error messages to not include queries: #41738
  • Fix ignored file path: #41747
  • Fix static generation and crawler requests: #41735
  • Add error if app detected but config is missing: #41696
  • Add default not found template: #41750
  • Remove unneeded types: #41752
  • Add message for appDir feedback: #41751
  • feat: set a better type for the default image loader : #41639
  • Fix edge entry layer resolution bug: #41757
  • Dont apply existing externals path changing to rsc layers: #41744
  • Pathname and search params SSG: #41247
  • Update react next channel: #41761
  • Font description and error messages: #41764
  • Updating avg width metrics for google fonts: #41755
  • Bump minimum Node.js version to 14.6.0: #41765
  • Throw error child in : #41756
  • [typescript] fix typo in edge runtime name: #41773
  • Only import dev overlay for dev mode: #41771
  • Add initial head handling in app: #41607
  • Fix revalidate during dev: #41772
  • Fix no-store test case: #41775
  • Ensure async_hooks are not resolved for client: #41778
  • Make ship happen: #41776
  • Add head handling: #41768
  • Update async storage fix: #41779

Documentation Changes

  • Updated example for i18n middleware: #40728
  • docs: Remove extraneous FallbackComponent prop from error boundary docs: #40785
  • Update static-html-export.md: #40808
  • Add additional fix in hydration error document: #40675
  • [docs] Update Cypress config file name: #40849
  • update url for React Hydration Documentation: #40883
  • Typo in middleware upgrade guide: #40963
  • Add useState and useEffect import: #40944
  • Fix broken link in migration docs.: #41013
  • Add Enterspeed blog example: #35897
  • [docs] Improve documentation around pageExtensions: #40039
  • (Docs) getStaticProps & getServerSideProps TS section (#40607): #40639
  • class component -> functional component: #41089
  • Docs: Fix misleading console.log output example: #41096
  • Add note to incremental migration about dynamic routes + fallbacks: #41147
  • Fix docs for next/image unconfigured hosts: #41223
  • Update introduction.md: #41226
  • Update security-headers doc: #41312
  • docs: clarify redirects on client-side navigation: #41362
  • Update node-module-in-edge-runtime.md: #41375
  • docs: note MDX with remark-gfm usage: #41391
  • docs: more detailed error message when failing to parse a middleware matcher: #41390
  • Update docs with minimum node version 14.x: #41482
  • Add remotePatterns link to next-image-unconfigured-host: #41504
  • [docs] fix grammatical error #41507: #41508
  • Add swcMinify to the Upgrade Guide: #41521
  • Fix links to next/legacy/image demo: #41539
  • Docs for request headers overrides in middleware: #41546
  • Fix docs typo in next/image sizes using fill prop: #41560
  • Small change to note <Link /> executes server methods: #41577
  • docs: remove next/future/image note: #41610
  • Update custom-error-page for getServerSideProps: #41723
  • docs: update ci-build-caching: #41763

Example Changes

  • chore: refactor with-next-sitemap example: #40712
  • Updates with-supertokens example app: #40707
  • chore: refactor with-typestyle example: #40740
  • chore: migrate missing document of with-geist-ui example to typescript: #40743
  • chore(examples): lock msw version in with-msw example: #40777
  • chore: refactor using-router example: #40774
  • Fix: Contentful webhook body parse.: #40732
  • Open deploy link in new window for examples: #40804
  • fix/window.gtag is not defined for Next.js-hydration event(#40410): #40645
  • Update .env.local.example: #40839
  • chore: refactor with-web-worker example: #40844
  • Correct link for "Deploy" button: #40894
  • Bump TypeScript version in with-typescript: #40924
  • Revert "Fix: Contentful webhook body parse.": #40925
  • Update cms-makeswift example: #41005
  • chore(examples): upgrade with-react-native-web dependencies: #41024
  • chore(examples): Convert with-react-hook-form example to TypeScript: #38796
  • chore(examples): remove next-env.d.ts files: #41041
  • Add NextUI example: #38209
  • [Examples] -> Add external official example with-react-query: #38101
  • example: with-mantine: #34591
  • Add Embedded KeystoneJS example: #25351
  • Update examples/with-temporal: #33674
  • Add windicss example: #35256
  • chore(examples): Add vanilla-extract example: #41061
  • examples/evm-multichain-dapp: #39206
  • chore(examples): use correct name in with-xata example: #41063
  • chore: update with-react-intl example: #40999
  • Fix: [slug].tsx: #41074
  • docs(examples): refresh cms-prismic example: #40121
  • Authsignal passwordless example: #41079
  • chore(examples): Cosmic cms updates: #41080
  • chore(example): updated react-multi-carousel to TS: #37930
  • Add dotCMS example: #38214
  • chore(examples): Add 'Sitefinity CMS' Example: #39537
  • chore(examples): update with-linaria: #41085
  • chore(examples): address remaining review in dotCMS example: #41091
  • Lock experimental react version in tests: #41100
  • Update Convex example for v0.2.0: #41143
  • chore(examples): add webiny cms example: #41159
  • chore(examples): add Radix UI example: #41169
  • Updating to latest version of Clerk: #41192
  • Fix error 500: #41205
  • Add --frozen-lockfile in Docker example when using pnpm: #41291
  • chore(examples): upgrade Auth0 example: #41284
  • Remove references to withSentry function in with-sentry example: #41326
  • add Cloudflare Turnstile example: #41283
  • Added example with salesforce commerce cloud: #41376
  • Update next pwa version in pwa example: #41386
  • examples(with-routes-graphql): update GraphQL Yoga to v3: #41478
  • chore(examples): fix typo: #41496
  • chore(examples): upgrade Stripe example: #41550
  • chore(examples): update with-apivideo: #39727
  • chore(examples): fix typo in [videoId].tsx: #41655
  • examples(with-typescript-graphql): migrate to Yoga v3 and codegen new preset: client: #41597
  • Bump version tailwindcss example to 3.2: #41681

Misc Changes

  • Temporarily skip switchable runtime test on deploy: #40700
  • Break assetPrefix app tests into separate suite: #40701
  • Skip copying next-swc debug files during testing: #40761
  • Add test case for /404 client transition: #40734
  • Update publish to scope as public for initializing: #40778
  • Update stats config for release stats: #40780
  • Fix flaky full reload hmr tests: #40786
  • Add missing release stats config for app: #40805
  • Tolerate already published error for retrying: #40812
  • Update publish script to skip lerna: #40815
  • Disable flakey dev app test temporarily: #40816
  • Update publish to skip private package: #40822
  • Update pnpm-lock.yaml
  • Use an ellipsis character instead: #40913
  • Update expected middleware test error: #40918
  • Remove extra pnp test: #40929
  • Always show node_modules inside test in VS Code: #40956
  • misc: add benchmarking script for edge rendering: #40716
  • Add timeout to playwright setup job: #40960
  • Increase playwright install timeout to 5 min
  • Increase other timeouts
  • Skip experimental undici test for deploy mode: #41006
  • Update flakey middleware rewrite test: #41007
  • Add test for rewrite from pages to app with existing pages path: #41023
  • chore/fix typo on contributing documentation: #41037
  • chore(contributing): remove note about eslint-config-next
  • Revert "chore: make sure polyfills are built for pnpm dev (#40335)"
  • Merge branch 'canary' of github.com:vercel/next.js into canary
  • chore: make sure polyfills are built for pnpm dev: #41062
  • chore(examples): fix lint
  • chore(examples): fix lint
  • chore(examples): fix lint
  • chore(examples): rename file from .ts to .tsx
  • chore(examples): fix lint
  • chore(examples): fix lint
  • chore(examples): fix example checks
  • Fix PR stats from experimental react: #41112
  • Align pnpm version: #41123
  • Add more test job timeouts: #41162
  • Fix errors entry in codeowners
  • Upgrade React experimental: #41222
  • Enable passing tests: #41241
  • Skip serverless/serverless-trace target tests: #41252
  • Add test for link to catchall route in new router: #41289
  • misc: add minimal server bench setup: #41328
  • Reduce local font loader options: #41332
  • Reduce remote requests in google fonts: #41306
  • Bump E2E test timeout minutes
  • Test for unused css modules with layout: #41018
  • Support aarch64 Linux with page size >= 16k: #41229
  • Update rsc error message: #41351
  • docs: add tips for building first before running test for contribute Nextjs.: #41379
  • Add npm to create-next-app environment package manager parser: #41279
  • Update bench options in stats-config: #41432
  • Bump test timeout-minutes for test dev
  • Fix E2E deploy test for API bodies: #41542
  • Run all dev tests with replay on retry: #41168
  • Increase timeout-minutes for dev jobs
  • chore: clarify issue template for examples
  • Add test fixture e2e/app-dir/next-image: #41609
  • feat(cna): add template: #41660
  • Pin build image version: #41704
  • Update CNA app template: #41701
  • Update font avg: #41734
  • Enable appDir e2e deploy tests #1: #41759

Credits

Huge thanks to @ijjk, @huozhi, @HaNdTriX, @iKethavel, @timneutkens, @shuding, @rishabhpoddar, @hanneslund, @balazsorban44, @anthonyshew, @TomerAberbach, @philippbosch, @styfle, @mauriciomutte, @hayitsdavid, @abdennor, @Kikobeats, @cjdunteman, @Mr-Afonso, @kdy1, @jaril, @abdallah-nour, @North15, @feedthejim, @brunocrosier, @Schniz, @sedlukha, @hashlash, @Ethan-Arrowood, @fireairforce, @migueloller, @leerob, @janicklas-ralph, @Trystanr, @atilafassina, @nramkissoon, @kasperadk, @valcosmos, @henriqueholtz, @nip10, @jesstelford, @lorensr, @AviAvinav, @SukkaW, @jaycedotbin, @saurabhburade, @notrab, @kwonoj, @sanruiz, @angeloashmore, @falsepopsky, @fmontes, @Gebov, @UltiRequiem, @p13lgst, @Simek, @mrkldshv, @thomasballinger, @kyliau, @AdarshKonchady, @endymion1818, @pedro757, @perkinsjr, @gnoff, @jridgewell, @silvioprog, @mabels, @nialexsan, @feugy, @jackromo888, @crazyurus, @EarlGeorge, @MariaSolOs, @lforst, @maximbaz, @maxam2017, @teobler, @Nutlope, @sunwoo0706, @WestonThayer, @Brooooooklyn, @Nsttt, @charlypoly, @aprendendofelipe, @sviridoff, @jackton1, @nuta, @Rpaudel379, @marcialca, @MarDi66, @ismaelrumzan, @javivelasco, @eltociear, @hiro0218, @HugoDF, @saulloalmeida, @ahhshm, @eve0415, and @sokra for helping!

Don't miss a new next.js release

NewReleases is sending notifications on new releases.