- 11 Apr, 2024 16 commits
-
-
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
-
- 10 Apr, 2024 12 commits
-
-
vercel-release-bot authored
-
Jeongjin Oh 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 ### 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 --> fixes #63803 ## What I do? - If the loader file export the function as `named`, Next.js throws the error. - But this error is a bit confusing for the developers. - So I open this PR for showing the accurate error message. ## AS-IS / TO-BE ### AS-IS ``` TypeError: Cannot use 'in' operator to search for '__next_img_default' in undefined ``` <img width="1202" alt="스크린샷 2024-03-28 16 10 53" src="https://github.com/vercel/next.js/assets/33178048/e7c81cb5-7976-46ff-b86f-9c8fd9a7a681"> ### TO-BE ``` Error: The loader file must export a default function that returns a string. See more info here: https://nextjs.org/docs/messages/invalid-images-config ``` <img width="500" alt="스크린샷 2024-03-28 16 10 53" src="https://github.com/vercel/next.js/assets/33178048/c391e61b-6a44-4f85-8600-28ab6cb5b0eb"> --------- Co-authored-by:
Steven <steven@ceriously.com>
-
Tobias Koppers authored
### What? align integration tests with e2e test command-wise ### Why? ### How? Closes PACK-2929 --------- Co-authored-by:Balázs Orbán <info@balazsorban.com>
-
Jiachi Liu authored
Follow up for #64294 to make turbopack side work as well --------- Co-authored-by:Tobias Koppers <tobias.koppers@googlemail.com>
-
Tim Neutkens authored
## What? Updates the loader documentation to the format. <!-- 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-3061
-
Jiachi Liu authored
### What CSS imports in components that loaded by `next/dynamic` in client components will cause the css are missing initial in SSR, and loaded later on client side which will lead to FOUC. This PR fixes the issue and get CSS preloaded in the SSR for dynamic components. ### Why The CSS from client components that created through `next/dynamic` are not collected in the SSR, unlike RSC rendering we already collect the CSS resources for each entry so we included them in the server rendering so the styles are availble at that time. But for client components, we didn't traverse all the client components and collect the CSS resources. In pages router we kinda collect all the dynamic imports and preload them during SSR, but this approach is not able to be applied to app router due to different architecture. Since we already have all the dynamic imports info and their related chunks in react-loadable-manifest, so we can do the similar "preloading" thing in app router. We use the current dynamic module key (`app/page.js -> ../components/foo.js`) which created by SWC transform and match it in the react loadable manifest that accessed from `AsyncLocalStorage`, to get the css files created by webpack then render them as preload styleshee links. In this way we can SSR all the related CSS resources for dynamic client components. The reason we pass down the react loadable manifest through `AsyncLocalStorage` is that it's sort of exclude the manifest from RSC payload as it's not required for hydration, but only required for SSR. Note: this issue only occurred in dynamic rendering case for client components. ### Other Changes Overview - Change the react loadable manifest key from pages dir based relative path to a source dir based relative path, to support cases with both directory or only one of them Closes NEXT-2578 Fixes #61212 Fixes #61111 Fixes #62940 Replacement for #64021 but only with production test
-
Tim Neutkens authored
## What? Updates the manifest with the `test/integration` run. <!-- 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-3058
-
Vercel Release Bot authored
This auto-generated PR updates font data with latest available
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
Tim Neutkens authored
## What? Currently any configuration issue like including `.babelrc` was not highlighted during Turbopack build. This PR solves that issue as well as ensuring the warnings are not double-logged because of a change that was supposed to be development-only. <!-- 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-3049
-
Martin Goutry authored
This fixes a wrong route in the [staleTimes](https://nextjs.org/docs/app/api-reference/next-config-js/staleTimes) doc Co-authored-by:
Sam Ko <sam@vercel.com>
-
Ahsan Moin authored
`functionaility` -> `functionality` `programatically` -> `programmatically` `recored` -> `record` `specfy` -> `specify` <!-- 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 # -->
-
- 09 Apr, 2024 12 commits
-
-
vercel-release-bot authored
-
Tobias Koppers authored
* https://github.com/vercel/turbo/pull/7912 <!-- Tobias Koppers - fix edge condition in environment --> * https://github.com/vercel/turbo/pull/7914 <!-- hrmny - feat: support interop for namespace importing cjs function exports -->
-
Sam Ko authored
## Why? Forgot to add this change in here → https://github.com/vercel/next.js/pull/64264. Closes NEXT-3055
-
Sam Ko authored
## Why? This fixes the ordering of `--experimental-debug-memory-usage` so the help output for experimental options are alphabetical/ordered properly (grouped at the end). - Related https://github.com/vercel/next.js/pull/63869 Closes NEXT-3054
-
Zack Tanner authored
Provides a `revalidateReason` argument to `getStaticProps` ("stale" | "on-demand" | "build"). - Build indicates it was run at build time - On-demand indicates it was run as a side effect of [on-demand revalidation](https://nextjs.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation) - Stale indicates the resource was considered stale (either due to being in dev mode, or an expired revalidate period) This will allow changing behavior based on the context in which it's called. Closes NEXT-1900 -
Sam Ko authored
## Why? When we fetch the same cache key (URL) but add an additional tag, the revalidation does not re-fetch correctly (the bug just uses in-memory cache again) when deployed. :repro: → https://github.com/lostip/nextjs-revalidation-demo/tree/main --------- Co-authored-by:
Ethan Arrowood <ethan@arrowood.dev>
-
Donny/강동윤 authored
### What? Skip one test completely ### Why? To make CI green ### How? Closes PACK-2921
-
Zack Tanner authored
### What When submitting a server action on a page that doesn't import the action handler, a "Failed to find server action" error is thrown, even if there's a valid handler for it elsewhere. ### Why Workers for a particular server action ID are keyed by their page entrypoints, and the client router invokes the current page when triggering a server action, since it assumes it's available on the current page. If an action is invoked after the router has moved away from a page that can handle the action, then the action wouldn't run and an error would be thrown in the server console. ### How We try to find a valid worker to forward the action to, if one exists. Otherwise it'll fallback to the usual error handling. This also adds a header to opt out of rendering the flight tree, as if the action calls a `revalidate` API, then it'll return a React tree corresponding with the wrong page. Fixes #61918 Fixes #63915 Closes NEXT-2489
-
mknichel authored
This PR adds a `--experimental-debug-memory-usage` flag to `next build` to make it easier to debug memory performance. This mode does the following things: - Periodically prints the current memory usage of the process - Records garbage collection events and warns about long running GC events - Kills the process if it detects GC thrashing near heap limit - Automatically takes a heap snapshot if heap usage rises above 70% of the total heap - Automatically takes a heap snapshot if the process is close to running out of memory - Prints a report at the end of the build with information about peak memory usage and time spent in garbage collection --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Jiachi Liu authored
Currently acornjs has an issue with compiling undici, add undici externalize, once it's resolved we can remove the externalization for it ``` You may need an additional loader to handle the result of these loaders. | // 5. If object is not a default iterator object for interface, | // then throw a TypeError. > if (typeof this !== 'object' || this === null || !(#target in this)) { | throw new TypeError( | `'next' called on an object that does not implement interface ${name} Iterator.` Import trace for requested module: ../../../../node_modules/.pnpm/undici@6.12.0/node_modules/undici/lib/web/fetch/util.js ../../../../node_modules/.pnpm/undici@6.12.0/node_modules/undici/lib/web/fetch/headers.js ../../../../node_modules/.pnpm/undici@6.12.0/node_modules/undici/index.js ./app/undici/page.js ``` Closes NEXT-3030 -
Donny/강동윤 authored
### What? Fix CI, which is broken due to https://github.com/vercel/next.js/pull/58534 ### Why? The PR was out of sync and CI didn't check turbo build ### How? Closes PACK-2920
-