forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] canary from vercel:canary #122
Open
pull
wants to merge
10,000
commits into
majacQ:canary
Choose a base branch
from
vercel:canary
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,805,107
−432,560
Conversation
This file contains 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
df8579c
to
47e5ebe
Compare
e078ebe
to
6b863fe
Compare
This ensures we are able to properly replace even when an env variable value wasn't initially provided and also ensures an env that is interpolated in a string properly replaces. We don't use the stringified version of `process.env` as that can cause issues with interpolation and such.
…8593) ### What? We use turbo to build the native portion of nextjs / turbopack which relies on turborepo for caching, with manually specified inputs. When moving the project we missed adding the new crates folder to the `turbo.json` file, leading to erroneous cache hits. ### Why? Erroneous cache hits = bad. ### How? Add the new path to the turbo.json file for next-swc. I did not include the `turbopack/packages` folder, since it is not used in native builds.
This cleans up some of the logic around builds to have the generate functions return arrays of objects instead of multiple keyed arrays. This lets us more cleanly access the associated encoded and raw forms of the pathnames as they're moving through build. This also extracts some types away from function signatures to improve readability.
## Why? Let's update the nav title to CSS instead of Stylesheets. - x-ref: https://vercel.slack.com/archives/C07BS1WEYAZ/p1722293684814579?thread_ts=1722289964.258269&cid=C07BS1WEYAZ - x-ref: #68304 (re-opened because the previous PR had wild git conflicts)
While testing noticed we were incorrectly copying from the cache when in `store-only` mode so this fixes that condition to ensure we skip that case properly.
**breaking change for canary users: Bumps peer dependency of React from `19.0.0-rc-1eaccd82-20240816` to `19.0.0-rc-eb3ad065-20240822`** No changes required in Next.js it seems. [diff facebook/react@1eaccd82...eb3ad065](facebook/react@1eaccd8...eb3ad06) <details> <summary>React upstream changes</summary> - facebook/react#30761 - facebook/react#30779 - facebook/react#30775 - facebook/react#30770 - facebook/react#30756 - facebook/react#30755 - facebook/react#30768 - facebook/react#30760 - facebook/react#30732 - facebook/react#30757 - facebook/react#30750 - facebook/react#30751 - facebook/react#30753 - facebook/react#30740 - facebook/react#30748 - facebook/react#30746 - facebook/react#30747 - facebook/react#30731 - facebook/react#30725 - facebook/react#30741 - facebook/react#30730 - facebook/react#30726 - facebook/react#30717 - facebook/react#30729 - facebook/react#30721 - facebook/react#30720 - facebook/react#30705 </details>
This PR added importing `type NextConfig` in examples of next-config-ts. Closes NDX-227
### What? Implement a lint for imports from node.js internal modules. ### Why? It will not work on runtime because edge runtime does not have such modules. x-ref: https://vercel.slack.com/archives/C04KC8A53T7/p1724310187996899?thread_ts=1723669243.397119&cid=C04KC8A53T7 ### How? Closes PACK-3216
This auto-generated PR updates the production integration test manifest used when testing Turbopack.
## Why? We don't have any documentation about the experimental `next.config.ts` config `useLightningcss`. - Fixes: #69030 Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Document new `next/form` API. Related: #68102 [DOC-3112](https://linear.app/vercel/issue/DOC-3112/document-nextform)
Small papercut 🤏
…tion (#68946) ### What? Add documentation about Partytown configuration on the `Script` documentation page. ### Why? The [`Script`](https://nextjs.org/docs/pages/building-your-application/optimizing/scripts) component with the `strategy` prop set to `worker` uses [Partytown](https://partytown.builder.io/) under the hood. Users may need to customize [Partytown options](https://partytown.builder.io/configuration) such as `forward`, `loadScriptsOnMainThread`, and `resolveUrl`, to allow for third party scripts such as Segment and Google Tag Manager to work properly. This used to be documented on `docs/basic-features/script.md`, as you can see on the [pull request that originally introduced the `worker` strategy](https://github.com/vercel/next.js/pull/34244/files#diff-62dbdb4bc703f7997ea259ad68d8e823d9fafed1e9571155e01c4de21abb6b47R165-R197), but this doc page was removed (potentially unintendedly) on #50701, and there's no longer mention of Partytown configuration in Next.js docs. ### How? Adding back the documentation text originally written by @housseindjirdeh in his pull request #34244 Fixes #68943 --------- Co-authored-by: samcx <sam@vercel.com>
Co-authored-by: Lee Robinson <me@leerob.io>
### What? Refactored module ID strategies implementation to walk modules graph individually for each endpoint. Based on feedback from [next.js#68408](#68408) and [turbo#8912](vercel/turborepo#8912). Comments marked with `NOTE(LichuAcu)` are intended to make reviewing easier and will be removed before merging.
### What? Improves the traversal of the module graph by doing a more exhaustive search of the children modules, thus increasing the "hit rate" for optimized module IDs (which should be 100%). ### Why? Some structs that implement the `Module` trait return an empty list in the `references` method, but still "own" some child modules. This is the case of `EcmascriptClientReferenceModule`, for example, which returns empty in `references` but owns a `client_module` and an `ssr_module`. These modules are ignored when traversing the module graph with the `get_referenced_modules` function we used before, so neither they nor their children are ever assigned an optimized ID. ### How? To solve this, a `children_modules` method is added to the `Module` trait, which should exhaustively return all direct children of the module. The function defaults to `primary_referenced_modules`, which simply calls `references`, but structs like `EcmascriptClientReferenceModule` can reimplement it and return "hidden" children modules like the aforementioned `client_module` and `ssr_module`.
This logs a span representing the entire lifetime of the devserver.
…timization (#68993) <!-- 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 # -->
…void circularities (#69075) <!-- 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 # -->
<!-- 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 # -->
Reapply #68842 after it was reverted in #69156 Now it should really only do it if it's really not an ESM module (= CJS) The replacement now has the same condition as used when Turbopack determines whether a given module should get access to `module`: https://github.com/vercel/next.js/blob/161cd00c7bc91e9dc29842427af0cc6f810267bb/turbopack/crates/turbopack-ecmascript/src/chunk/item.rs#L51 https://github.com/vercel/next.js/blob/161cd00c7bc91e9dc29842427af0cc6f810267bb/turbopack/crates/turbopack-ecmascript/src/lib.rs#L880-L881
Only the `modules` field of `loaderOptions` is used.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )