- 23 Sep, 2025 2 commits
-
-
nextjs-bot authored
-
Joseph authored
Collects a bunch of docs improvements and fixes. --------- Co-authored-by:
Lee Robinson <lee@leerob.com> Co-authored-by:
Felix Shih <25448040+fufuShih@users.noreply.github.com> Co-authored-by:
Benjamin Woodruff <benjamin.woodruff@vercel.com> Co-authored-by:
David <75678655+dwrth@users.noreply.github.com> Co-authored-by:
Aymeric PINEAU <62554073+aymericzip@users.noreply.github.com> Co-authored-by:
Luca Krebs <41986129+obendev@users.noreply.github.com> Co-authored-by:
vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by:
Rich Haines <hello@richardhaines.dev> Co-authored-by:
Mohammad Nedaeifard <46691519+OoMNoO@users.noreply.github.com> Co-authored-by:
pontasan <48611107+pontasan@users.noreply.github.com> Co-authored-by:
Steven <steven@ceriously.com> Co-authored-by:
Honda Yuto <132035494+HondaYt@users.noreply.github.com> Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
ryu <114303361+ryuapp@users.noreply.github.com> Co-authored-by:
graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by:
Lorenzo Palmes <lpalmes@gmail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
- 22 Sep, 2025 2 commits
-
-
Jiwon Choi authored
backports https://github.com/vercel/next.js/pull/83194
-
Niklas Mischkulnig authored
-
- 19 Sep, 2025 2 commits
-
-
Jiwon Choi authored
Backports #83981
-
Jiwon Choi authored
backports #83571
-
- 17 Sep, 2025 4 commits
-
-
Niklas Mischkulnig authored
-
Niklas Mischkulnig authored
-
Niklas Mischkulnig authored
Co-authored-by:Luke Sandberg <lukesandberg@users.noreply.github.com>
-
Niklas Mischkulnig authored
Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
- 15 Sep, 2025 1 commit
-
-
Niklas Mischkulnig authored
Backport #83176
-
- 12 Sep, 2025 2 commits
-
-
Jiachi Liu authored
-
yiminghe authored
Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
- 10 Sep, 2025 1 commit
-
-
nextjs-bot authored
-
- 08 Sep, 2025 1 commit
-
-
Ben Gubler authored
I don't think this fix ever got backported to Next 15.5! @huozhi @ijjk @ztanner
-
- 29 Aug, 2025 2 commits
-
-
Ben Gubler authored
Fixed #83063 - **Problem**: `next dev` produced overly deep relative imports in `validator.ts` that differed from `next typegen`/`next build`. - **Cause**: Dev pre-relativized page file paths and didn’t pass `validatorFilePath`, causing incorrect relative path computation. - **Solution**: - Pass `validatorFilePath` to `createRouteTypesManifest` in dev. - Stop pre-relativizing file paths; provide absolute `fileName` so the manifest computes paths relative to the validator directory. - **Result**: `validator.ts` now uses correct, shallow relative imports, matching `next typegen` and `next build`. - **Verification**: Reproduced with `test/e2e/app-dir/typed-routes-validator`; outputs from `pnpm next dev` and `pnpm next typegen` now match. ### Example Before (next dev): ```typescript // Validate ../../../../../../app/page.tsx { const handler = {} as typeof import("../../../../../../app/page.js") handler satisfies AppPageConfig<"/"> } ``` After (next dev/typegen/build): ```typescript // Validate ../../app/page.tsx { const handler = {} as typeof import("../../app/page.js") handler satisfies AppPageConfig<"/"> } ``` <!-- 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 # --> -
Ben Gubler authored
[backport] fix: remove `satisfies` keyword from type validation to preserve old TS compatibility (#83071)
-
- 26 Aug, 2025 4 commits
-
-
nextjs-bot authored
-
Zack Tanner authored
Backports: - #83062
-
Ben Gubler authored
Biome is close to releasing their fix for Tailwind parsing, but it'll be released in the next minor version. We want to make sure that linting the template doesn't show any problems arising from Tailwind at-rules in the meantime. (See #82974 and #82826)
-
nextjs-bot authored
-
- 25 Aug, 2025 10 commits
-
-
Ben Gubler authored
I updated the return type of API routes and route handlers from ```ts Promise<Response> | Response | Promise<void> | void ``` to ```ts Promise<Response | void> | Response | void ``` which fixes #82842. <!-- 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 # -->
-
Ben Gubler authored
`config.api.responseLimit` can also be [set to `false`](https://github.com/vercel/next.js/issues/82842#issuecomment-3207638164). Because of the limitations of type inference on JS files, we need to set the type to `boolean`. See https://github.com/vercel/next.js/issues/82842#issuecomment-3207638164 <!-- 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 # -->
-
Ben Gubler authored
-
Ben Gubler authored
[backport] feat: add typesafety with config.typedRoutes to redirect() and permanentRedirect() (#82860) (#83024)
-
Ben Gubler authored
-
Ben Gubler authored
-
Ben Gubler authored
-
Niklas Mischkulnig authored
-
Zack Tanner authored
Backports: - #82900
-
nextjs-bot authored
-
- 20 Aug, 2025 1 commit
-
-
nextjs-bot authored
-
- 19 Aug, 2025 8 commits
-
-
Ben Gubler authored
Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
nextjs-bot authored
-
Joseph authored
As this lands and people learn about the new Route Props helpers, I think we will have this period where the TypeScript snippets show the manual typing, but in key places we introduce the helpers usage. We can then follow up updating all TypeScript snippets showing a page, layout or route, to use these. --------- Co-authored-by:
Ben Gubler <nebrelbug@gmail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Madhur Mittal authored
## What? Updated the documentation for `opengraph-image` / `twitter-image` to fix the **Node.js runtime with local assets** example. ## Why? The existing snippet did not type-check cleanly with Next.js 15+ and could confuse developers. This update improves developer experience by ensuring the snippet is immediately usable and accurate. ## How? - Reproduced the example in a fresh Next.js 15+ project. - Updated the docs example to: - Use `readFile` + Base64 encoding instead of invalid file URLs. - Clarify that assets should be placed relative to the project root. - Added an entry to **Version History** noting the update in v15.x. ## Checklist - [x] Ran `pnpm prettier-fix` - [x] Verified formatting & linting (`pnpm build && pnpm lint`) - [x] Documentation guidelines followed - [x] Example verified in a real Next.js 15 project Fixes #75583 & #75625 (if considered same class of issue) --------- Co-authored-by:
Joseph <sephxd1234@gmail.com> Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Ben Gubler authored
-
nextjs-bot authored
-
Ben Gubler 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 # -->
-
Ben Gubler authored
Because tsc doesn't infer string literal types in JS files --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-