Skip to content
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
wants to merge 10,000 commits into
base: canary
Choose a base branch
from
Open

[pull] canary from vercel:canary #122

wants to merge 10,000 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 9, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jun 9, 2021
@atomist atomist bot added auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge-method:merge Auto-merge with merge commit auto-merge:on-bpr-success Auto-merge on passed branch protection rule labels Jun 9, 2021
@pull pull bot added merge-conflict Resolve conflicts manually and removed auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge-method:merge Auto-merge with merge commit auto-merge:on-bpr-success Auto-merge on passed branch protection rule labels Jun 9, 2021
@ijjk ijjk deleted the branch majacQ:canary October 20, 2022 16:39
@ijjk ijjk deleted the canary branch October 20, 2022 16:40
@ijjk ijjk force-pushed the canary branch 5 times, most recently from df8579c to 47e5ebe Compare October 25, 2022 16:15
@ijjk ijjk force-pushed the canary branch 3 times, most recently from e078ebe to 6b863fe Compare December 2, 2022 05:49
ijjk and others added 6 commits August 6, 2024 11:35
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.
vercel-release-bot and others added 30 commits August 22, 2024 23:23
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>
…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>
The PR moves `module.exports = nextConfig` into the code block. This was
introduced in #69161

/cc @samcx
### 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
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet