docs: remove deprecated url.parse() from custom server example#86972
Closed
DeveloperViraj wants to merge 46 commits into
Closed
docs: remove deprecated url.parse() from custom server example#86972DeveloperViraj wants to merge 46 commits into
DeveloperViraj wants to merge 46 commits into
Conversation
… and permanentRedirect() (vercel#82860) (vercel#83024)
… (vercel#83028) `config.api.responseLimit` can also be [set to `false`](vercel#82842 (comment)). Because of the limitations of type inference on JS files, we need to set the type to `boolean`. See vercel#82842 (comment) <!-- 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 # -->
…#83027) 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 vercel#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 # -->
…) (vercel#83060) 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 vercel#82974 and vercel#82826)
…eserve old TS compatibility (vercel#83071)
…ercel#83190) Fixed vercel#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 # -->
…3069) (vercel#83580) I don't think this fix ever got backported to Next 15.5! @huozhi @ijjk @ztanner
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
…ercel#83805) Co-authored-by: Luke Sandberg <lukesandberg@users.noreply.github.com>
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>
…uring ISR revalidation (vercel#84716) Backports: - vercel#83820
Backports: - vercel#84539 - vercel#84712 --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Additional group of docs improvements. --------- Co-authored-by: François Martin <f.martin@fastmail.com> Co-authored-by: liketiger <50165633+liketiger@users.noreply.github.com> Co-authored-by: Milancen123 <122306536+Milancen123@users.noreply.github.com> Co-authored-by: geraldochristiano <68152918+geraldochristiano@users.noreply.github.com> Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Anshuman Bhardwaj <anshu5074@gmail.com> Co-authored-by: Karl Horky <karl.horky@gmail.com> Co-authored-by: João Henrique <117238473+joao4xz@users.noreply.github.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Was fixed on canary in vercel#84922 Very annoying test setup
* Update React Version Update React Version * Disable some tests that fail spuriously. Should improve test coverage of otherwise blocked tests
Contributor
|
Notifying the following users due to files changed in this PR based on this repo's notify modifiers: @timneutkens, @ijjk, @shuding, @huozhi: |
Member
|
Closing because of the gigantic amount of unrelated changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the custom server documentation to remove usage of Node's
deprecated
url.parse()API. The example does not require URL parsing, sincethe
parsedUrlargument is optional for the Next.jsRequestHandler.Removing
url.parse()avoids Node deprecation warnings (DEP0116, DEP0169)and aligns the example with current best practices.
This implements the minimal fix suggested in issue #86951.
Why?
url.parse()is deprecated in modern Node versions.How?
url.parse()import.parsedUrlcreation.handle(req, res).Fixes #86951