- 12 Apr, 2024 20 commits
-
-
vercel-release-bot authored
-
Colton Ehrman authored
fix(next-lint): update option --report-unused-disable-directives to --report-unused-disable-directives-severity (#64405) ## Why? The Option name and type has been incorrect for `--report-unused-disable-directives` (it's likely that https://github.com/vercel/next.js/pull/61877 exposed this. For correctness, we have updated the name to `--report-unsed-disable-directives-severity` → https://eslint.org/docs/v8.x/use/command-line-interface#--report-unused-disable-directives-severity. - Fixes https://github.com/vercel/next.js/issues/64402 --------- Co-authored-by:
samcx <sam@vercel.com>
-
Shu Ding authored
This PR fixes the case where object method and class method prop functions are not considered as a new scope. Closes #63603. Closes NEXT-3088
-
Shu Ding authored
This PR improves the server rendering performance a bit, especially for the App Router. It has mainly 2 changes. A rough benchmark test with a 300kB Lorem Ipsum page, SSR is about 18% faster. ### Improve `getServerInsertedHTML` - Avoid an extra `renderToReadableStream` if we already know the content will be empty - Avoid `await stream.allReady` for better parallelism with `streamToString()` - Increase the `progressiveChunkSize` ### Improve `createHeadInsertionTransformStream` - Only do chunk splitting and enqueuing if the inserted string is not empty
-
Will Binns-Smith authored
Closes PACK-2940
-
Anatolii Kurochkin authored
## Description Updated [Internationalization (i18n) Routing](https://nextjs.org/docs/pages/building-your-application/routing/internationalization#leveraging-the-next_locale-cookie) to clarify that `NEXT_LOCALE` does not override the `accept-language` header value; rather, it prioritizes the `NEXT_LOCALE` cookie value over `accept-language`. ## How has this been tested? Ran `pnpm prettier-fix`
-
vercel-release-bot authored
-
Tobias Koppers authored
### What? Fixes #64371 Fixes #63359 Closes PACK-2946 --------- Co-authored-by:
Tim Neutkens <tim@timneutkens.nl> Co-authored-by:
Jiachi Liu <inbox@huozhi.im>
-
Vivek Kaushik authored
This doc is outdated as mentioned as this issue has been going on for years now where people are unable to debug/set breakpoints in VSCode due to some mismatch of port/process configuration b/w VSC, Next/Node or Browser(Chrome Dev tools). Regardless, I found the fix on https://github.com/vercel/next.js/issues/47561#issuecomment-1549241442 and it works like a charm. Kindly update your docs accordingly. Thanks. <!-- 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 # --> --------- Co-authored-by:
samcx <sam@vercel.com>
-
Sir Tangale authored
Cypress supports TypeScript 5 with moduleResolution: "bundler" starting from version 13.6.3 and later. <!-- 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 # -->
-
Gediminas authored
### Improving Documentation mistake in the docs. action should not be apply on the button. only formAction or onClick is allow. --------- Co-authored-by:Sam Ko <sam@vercel.com>
-
Cody Olsen authored
Adds support for the [newly introduced Sanity TypeGen](https://www.sanity.io/blog/introducing-sanity-typegen)! 🥳
-
Tim Neutkens authored
## What? - Removes the node-file-trace options from being unsupported as they are passed to node-file-trace in build/index.ts - Ensures `import next from 'next'` is handled in the same way as webpack: creating an empty module. Currently it tried to bundle all Next.js internals which is wrong. <!-- 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 # --> Closes NEXT-3086
-
MC Naveen authored
-
Paul Asjes authored
-
vercel-release-bot authored
-
Jiachi Liu authored
### What Wrap async local storage for all edge runtime routes in adapter Basically fixed the case reported in [this tweet](https://x.com/keegandonley/status/1778538456458854880) ### Why We're relying on the ALS for dynamic css preloading but we didn't wrap the ALS for request handlers for edge. So if you have CSS imports in `next/dynamic` in edge runtime it would break. Closes NEXT-3085
-
Jiachi Liu authored
x-ref: https://github.com/vercel/next.js/actions/runs/8649384009/job/23715530094?pr=64348 Closes NEXT-3079
-
Wyatt Johnson 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 # --> ### What? This adds a missing test case for a page which accesses dynamic API's within `generateMetadata`. It also adds a test case to verify that any of the URL's being tested can succeed based on the components link components (it relies on finding a link to click in the browser). Closes NEXT-3004
-
Wyatt Johnson authored
Manifests in the runtime should be treated as immutable objects to ensure that side effects aren't created that depend on the mutability of these shared objects. Instead, mutable references should be used in places where this is desirable. This also introduces the new `DeepReadonly` utility type, which when paired with existing manifest types, will modify every field to be read only, ensuring that the type system will help catch accidental modifications to these loaded manifest values as well. Future work could eliminate these types by modifying the manifest types themselves to be read only, only allowing code that generated them to be writable. Closes NEXT-3069
-
- 11 Apr, 2024 20 commits
-
-
Wyatt Johnson 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 # --> ### What? This creates a new `SharedRevalidateTimings` type that is safe to share amongst different points within the framework for sharing revalidation timings. This is a precursor to #64313 which freezes loaded manifests. ### Why? Using the `SharedRevalidateTimings` type, we no-longer have to modify the in-memory instance of the prerender manifest to share the revalidation timings for different routes. Closes NEXT-3083
-
Shu Ding authored
## Why Currently, Server Action handlers are just normal routes and they accepting POST requests. The only way to differentiate a normal request (page access, API route, etc.) from a Server Action request is to check that if it's a POST and has a Server Action ID set via headers or body (e.g. `multipart/form-data`). Usually, for existing page and API routes the correct handlers (page renderer, API route handler) will take precedence over Server Action's. But if the route doesn't exist (e.g. 404) it will still go through Server Action's handler and result in an error. And we're eagerly logging out that error because it might be an application failure, like passing a wrong Action ID. ## How In this PR we are making sure that the error is only logged if the Action ID isn't `null`. This means that it's an intentional Server Action request with a wrong ID. If the ID is `null`, we just handle it like 404 and log nothing. Fixes #64214. Closes NEXT-3071
-
vercel-release-bot authored
-
Jiachi Liu authored
* Early return if the `this._module` doesn't exist, aligning with the type * If the source is changed, we should return the changed source otherwise the indexes in source map will be wrong unless the modified code is appended to the source code, but in this loader it's a different case Closes NEXT-3075
-
vercel-release-bot authored
-
mknichel 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 # --> --------- Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Delba de Oliveira authored
-
vercel-release-bot authored
-
Tobias Koppers authored
* https://github.com/vercel/turbo/pull/7409 <!-- hrmny - chore: add parallel rust frontend and remove unused rust dependencies --> * https://github.com/vercel/turbo/pull/7920 <!-- Tobias Koppers - remove warning when there is no PostCSS config --> * https://github.com/vercel/turbo/pull/7856 <!-- Donny/강동윤 - build: Update `swc_core` to `v0.90.29` --> * https://github.com/vercel/turbo/pull/7941 <!-- Tobias Koppers - fix recursion cycle when having a cycle of dynamic imports --> * https://github.com/vercel/turbo/pull/7943 <!-- Tobias Koppers - fix HMR by removing chunks from chunk list hash -->
-
JJ Kasper authored
This ensures we don't un-necessarily re-run the `build-native` job across all CIs from cache misses while a build is pending. Closes NEXT-3080
-
Tobias Koppers authored
### What? * remove custom next-* conditions * add `foreign` condition * allow `false` in turbo.rules * improve schema for turbo.rules ### Why? ### How? Closes PACK-2913 --------- Co-authored-by:Tim Neutkens <tim@timneutkens.nl>
-
vercel-release-bot authored
-
Jiachi Liu authored
Like the No.2 point mentioned in #63489, metadata's title and description should be the last fallback, if you specify `title` or `description` in `openGraph` but not in `metadata.twitter`, they should inherit from open graph first. For `metadata.twitter`'s fallback order should be: twitter's title/description > opengraph's title/description > metadata's title/description Resolves #63489 Closes NEXT-3073
-
Delba de Oliveira authored
Co-authored-by:Balázs Orbán <info@balazsorban.com>
-
Tobias Koppers authored
Reverts vercel/next.js#63790
-
Jiachi Liu authored
### What Bump the edge runtime manifest version and add `environments` property to each route for inlining values for deployment build. ### Why In edge runtime, extract the preview props into edge functions manifest that holding the non-deterministic inline values, then the output build will be more deterministic that helps deployment speed x-ref: https://github.com/vercel/vercel/pull/11390 x-ref: https://github.com/vercel/vercel/pull/11395 Closes NEXT-3012 Closes NEXT-1912
-
Balázs Orbán authored
### What? This adds a script that first gets a list of changed files compared to our base branch (`canary`) in PRs and identifies related test files by looking them up from a `related-tests-manifest.json`, then runs them. ### Why? We would like to be able to run related E2E tests when certain files change, so we can test deployment stability. NOTE: We still want to run all E2E tests on PRs, but this script can be used to also test deployments for hot paths. Since these tests can take up to [3-4 hours](https://github.com/vercel/next.js/actions/workflows/test_e2e_deploy.yml), we aim to run a subset of these tests first. Closes NEXT-2947
-
Maia Teegarden authored
Closes PACK-2932
-
Will Binns-Smith authored
Building on #58293, this expands escaping of url-unsafe characters in paths to “required” scripts and styles in the app renderer. This also refactors the test introduced in #58293 and expands it to include stylesheet references as well as checking resources in the head, which include special characters like turbopack references like `[turbopack]`. Test Plan: `TURBOPACK=1 pnpm test-dev test/e2e/app-dir/resource-url-encoding` Closes PACK-2911 -
Donny/강동윤 authored
# Turbopack * https://github.com/vercel/turbo/pull/7409 <!-- hrmny - chore: add parallel rust frontend and remove unused rust dependencies --> * https://github.com/vercel/turbo/pull/7920 <!-- Tobias Koppers - remove warning when there is no PostCSS config --> * https://github.com/vercel/turbo/pull/7929 <!-- Tim Neutkens - Remove environment variables page from Turbopack docs --> * https://github.com/vercel/turbo/pull/7926 <!-- Tim Neutkens - Remove outdated section --> * https://github.com/vercel/turbo/pull/7925 <!-- Tim Neutkens - Update Turbopack CSS docs --> * https://github.com/vercel/turbo/pull/7928 <!-- Tim Neutkens - Update Next.js mention in Turbopack docs --> * https://github.com/vercel/turbo/pull/7856 <!-- Donny/강동윤 - build: Update `swc_core` to `v0.90.29` --> ### What? Update SWC crates. ### Why? 1. To keep in sync 2. Prepare usage of source map range mappings. https://github.com/getsentry/rust-sourcemap/pull/77 ### How? Closes PACK-2860
-