1. 11 Oct, 2025 4 commits
  2. 10 Oct, 2025 20 commits
  3. 09 Oct, 2025 16 commits
    • Sam Selikoff's avatar
      Fix typo on welcome page (#84715) · 36357eba
      Sam Selikoff authored
      36357eba
    • nextjs-bot's avatar
      v15.6.0-canary.56 · e2713a42
      nextjs-bot authored
      e2713a42
    • Jimmy Lai's avatar
      misc: allow beta to be triggered (#84713) · 5c8fdbe1
      Jimmy Lai authored
      ![a-picture-of-a-bear-in-a-spaceship-with-the-words-i-have-no-idea-what-i-m-doing](https://github.com/user-attachments/assets/a53076b7-6d4c-4e98-b540-b4f6950d4901)
      
      - update codemod script
      - upgrade both release scripts, not sure which one is correct
      
      
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      
      ### What?
      
      ### Why?
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      ---------
      Co-authored-by: 's avatargraphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      5c8fdbe1
    • nextjs-bot's avatar
      v15.6.0-canary.55 · 8d475c54
      nextjs-bot authored
      8d475c54
    • Wyatt Johnson's avatar
      Add validation for missing default.js in parallel routes (#84702) · 36301464
      Wyatt Johnson authored
      ### What?
      
      Adds build-time validation to require explicit `default.js` files for
      all parallel route slots (except the implicit "children" slot). This
      validation is implemented in both Webpack and Turbopack bundlers.
      
      ### Why?
      
      Parallel routes without `default.js` files currently cause silent 404
      errors when users navigate to those routes. This creates confusion and
      hard-to-debug issues because the routes appear to be configured
      correctly but fail at runtime without any indication of what went wrong.
      
      By making this validation explicit at build time, developers get
      immediate feedback about missing required files with clear error
      messages and documentation links, catching configuration mistakes before
      deployment.
      
      ### How?
      
      **Rust/Turbopack** (`crates/next-core/src/app_structure.rs`): Added
      `MissingDefaultParallelRouteIssue` that emits a build error when a
      parallel route slot is missing its `default.js` file. The validation is
      skipped for the "children" slot since it's implicit and doesn't require
      a default file.
      
      **Webpack**
      (`packages/next/src/build/webpack/loaders/next-app-loader/index.ts`):
      Added validation that throws `MissingDefaultParallelRouteError` when
      `default.js` cannot be resolved. The "children" slot falls back to the
      existing `PARALLEL_ROUTE_DEFAULT_PATH` behavior for backward
      compatibility.
      
      **Error Class**
      (`packages/next/src/shared/lib/errors/missing-default-parallel-route-error.ts`):
      New error type with helpful messaging that includes the slot path,
      explanation of the requirement, and a link to documentation.
      
      **Migration Path**: Users who want the previous 404 behavior can
      explicitly create a `default.js` that calls `notFound()`, or return
      `null` for empty slots:
      
      ```tsx
      import { notFound } from 'next/navigation'
      
      export default function Default() {
        notFound()
      }
      ```
      
      Users can also run the following Deno script to generate the default
      files for them:
      https://gist.github.com/wyattjoh/ba7263ecb637ef399d3e3e4db63ffbd6
      
      **Breaking Change**: This is a breaking change timed for Next.js 16
      beta. Builds will now fail if parallel route slots are missing required
      `default.js` files.
      36301464
    • JJ Kasper's avatar
    • Steven's avatar
      [Breaking] feat(next/image)!: add support for `images.dangerouslyAllowLocalIP`… · 8d415853
      Steven authored
      [Breaking] feat(next/image)!: add support for `images.dangerouslyAllowLocalIP` and `images.maximumRedirects` (#84676)
      
      This PR adds a two new options and sets a strict default value for each.
      
      - `images.dangerouslyAllowLocalIP`
      - `images.maximumRedirects`
      
      ### dangerouslyAllowLocalIP
      
      In rare cases when self-hosting Next.js on a private network, you may
      want to allow optimizing images from local IP addresses on the same
      network.
      
      However, this is not recommended for most users so the default is
      `false`.
      
      > [!NOTE]
      > BREAKING CHANGE: This change is breaking for those who self-hosting
      Next.js on a private network and want to allow optimizing images from
      local IP addresses on the same network. In those cases, you can still
      enable the config.
      
      ### maximumRedirects
      
      Since are also testing redirects for local IPs, we can also reduce the
      maximum number of redirects to 3 by default.
      
      Unlike normal websites which might redirect for features like auth, its
      unusual to have more than 3 redirects for an image.
      
      In some rare cases, developers may need to increase this value or set to
      `0` to disable redirects.
      
      > [!NOTE]
      > BREAKING CHANGE: This change is breaking for those who need image
      optimization to follow more than 3 redirects.
      8d415853
    • Jiwon Choi's avatar
      [Breaking] Require `images.localPatterns` for query in Image src (#84406) · 8041a382
      Jiwon Choi authored
      This PR modifies Image behavior to require `images.localPatterns.search`
      value when used with search queries in the `src` property:
      
      ```jsx
      // Error
      <Image src="/api/user?id=1" width="50" height="50" />
      ```
      
      ```ts
      // next.config.ts
      
      export default {
        images: {
          localPatterns: [
            {
              pathname: '/api/user',
              // Either set explicit query string or leave undefined to match all
              search: '?v=2',
            },
          ],
        },
      }
      ```
      
      It is to prevent malicious actors like Denial of Wallet (DoW) attacks
      and strictly match the search queries for image optimization.
      
      The deprecation warning was added at
      https://github.com/vercel/next.js/pull/82627
      
      ---------
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      8041a382
    • Zack Tanner's avatar
      Add refresh API to next/cache (#84666) · 5dcfec40
      Zack Tanner authored
      This provides a way to refresh the client cache from within a server
      action. This is useful when you need to refresh the client UI / read
      your writes without needing to rely on `updateTag`.
      
      ---------
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      5dcfec40
    • JJ Kasper's avatar
    • Karl Horky's avatar
      Add note about $ACTION_ properties, remove reference to .entries() (#84459) · 0b14eb2e
      Karl Horky authored
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      
      ### What?
      
      ### Why?
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      ### What?
      
      Make a note about the `$ACTION_` properties in `formData`
      
      ### Why?
      
      Starting with next@14.1.3, `$ACTION_` properties have appeared in the
      `formData`, which cause validation errors when used with a strict
      validation with a library such as Zod or Yup:
      
      ```tsx
      // Form Client Component
      export default function Form() {
        const [state, formAction] = useFormState(action, {
          type: 'initial',
        });
      
        return (
          <form action={action}>
            {/* ... */}
          </form>
        );
      }
      
      // Server Action
      export async function action(
        prevState: ServerActionReturnValue,
        formData: FormData,
      ): Promise<ServerActionReturnValue> {
        const validationResult = await schema.validate(
          Object.fromEntries(formData.entries()),
        );
      ```
      
      The errors from Yup:
      
      Errors:
      
      - this field has unspecified keys: $ACTION_REF_1, $ACTION_1:0,
      $ACTION_1:1, $ACTION_KEY
      The data in the formData.entries()
      
      ```js
      {
        '$ACTION_REF_1': '',
        '$ACTION_1:0': '{"id":"59f475b...","bound":"$@1"}',
        '$ACTION_1:1': '[{"type":"initial"}]',
        '$ACTION_KEY': 'k187677481',
        // Real form data starts here:
        year: '2024',
      ```
      
      ### How?
      
      1. Document additional properties with keys starting with the prefix
      `$ACTION_`
      2. Remove the obsolete mention of `.entries()`, since that is not being
      used in the code example anymore (previously, it was `const rawFormData
      = Object.fromEntries(formData.entries())`)
      
      ### History
      
      - The `$ACTION_` property change was added in
      https://github.com/vercel/next.js/pull/63048
      - The `docs/01-app/02-guides/forms.mdx` file was added in PR
      https://github.com/vercel/next.js/pull/79288 , without the `$ACTION_`
      property change
      
      cc @delbaoliveira
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      0b14eb2e
    • Jiwon Choi's avatar
    • Jiwon Choi's avatar
      Remove bailed out SSG routes from the list of SSG (#83861) · 396fed36
      Jiwon Choi authored
      ### Why?
      
      When SSG, the pages can bail out when detected a dynamic usage. However,
      the routes that bailed out were still marked as SSG, which can confuse
      the users.
      
      ### How?
      
      Remove the bailed-out routes from the SSG routes list. If there are no
      more SSG routes for the dynamic route, mark it as dynamic in Build CLI.
      
      #### Before - Has 1, 2, 3, even though they bailed.
      
      ```
      Route (app)                         Size  First Load JS    
      ┌ ○ /_not-found                      0 B         114 kB
      └ ● /[id]                            0 B         114 kB
          ├ /1
          ├ /2
          └ /3
      + First Load JS shared by all     114 kB
        ├ chunks/29c57ad6b43f6070.js   75.8 kB
        ├ chunks/df142624801412ea.js   24.3 kB
        └ other shared chunks (total)  13.5 kB
      
      
      ○  (Static)  prerendered as static content
      ●  (SSG)     prerendered as static HTML (uses generateStaticParams)
      ```
      
      #### After - No longer has 1, 2, 3, and the route is marked as dynamic.
      
      ```
      Route (app)                         Size  First Load JS    
      ┌ ○ /_not-found                      0 B         114 kB
      └ ƒ /[id]                            0 B         114 kB
      + First Load JS shared by all     114 kB
        ├ chunks/4963d796c068bb13.js   24.3 kB
        ├ chunks/f59bbf014aa0eff6.js   75.8 kB
        └ other shared chunks (total)  13.5 kB
      
      
      ○  (Static)   prerendered as static content
      ƒ  (Dynamic)  server-rendered on demand
      ```
      
      Fixes https://github.com/vercel/next.js/issues/76507
      Closes NAR-194
      
      ---------
      Co-authored-by: 's avatarWyatt Johnson <accounts+github@wyattjoh.ca>
      396fed36
    • brock-statsig's avatar
      add Statsig Node Core package to Server External Packages (#84157) · 954d40be
      brock-statsig authored
      ### What?
      Statsig is a popular AB Testing/ Feature Flagging solution to use in concert with Next.js. Today, their newest Server SDK doesn't play nicely with Next as its build around a Rust library, which doesn't play nice with webpack and causes build issues.
      
      ### Why?
      This'll remove a step for Statsig/Next developers having to troubleshoot and add @statsig/statsig-node-core to serverExternalPackages themselves.
      
      ### How?
      Added to the list published here: https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages
      954d40be
    • Steven's avatar
      breaking(next/image)!: remove 16px from default `images.imageSizes` config (#84647) · 600238f0
      Steven authored
      We took a look at unique Next.js projects that have one or more requests
      for a specific image size and here are the findings as seen from the
      Image Optimization API:
      
      - `w=16` 4.2%
      - `w=32` 17.1%
      - `w=48` 21.4%
      - `w=64` 22.6%
      - `w=96` 25.8%
      - `w=128` 29.5%
      - `w=256` 46.5%
      - `w=384` 35.1%
      - `w=640` 57.2%
      
      Only 4.2% of Next.js projects ever made a request to a 16px width image.
      This is low enough to remove from the default configuration so that all
      other projects can benefit from reduced html
      [srcset](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset)
      and fewer variations exposed from the backend API.
      
      You might think that this means few developers are using `<Image
      width={16} />` but it probably means that most displays nowadays use
      devicePixelRatio 2 meaning that specifying a 16px image width will
      actually fetch the 32px width to ensure it won't looking blurry on your
      retina display.
      
      BREAKING CHANGE: this is technically a breaking change but it won't
      cause apps to stop working, its just 4% of them may have some requests
      serve a 32px image instead of 16px. Those apps can of course opt in by
      changing their `images.imageSizes` config back to allowing 16.
      600238f0
    • nextjs-bot's avatar
      v15.6.0-canary.54 · 79e78381
      nextjs-bot authored
      79e78381