Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] canary from vercel:canary #107

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

Merged
merged 7 commits into from
May 9, 2025
Merged

[pull] canary from vercel:canary #107

merged 7 commits into from
May 9, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented May 9, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

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

kdy1 and others added 7 commits May 8, 2025 19:31
### What?

Use `sourcemap::SourceMap::adjust_mapping` directly instead of relying on `swc_common`.

### Why?


https://github.com/swc-project/swc/blob/6750459d9180048a39c11e14b02c9bfed251a12e/crates/swc_common/src/source_map.rs#L1385-L1388


```rust
    if let Some(mut orig) = orig.cloned() {
        orig.adjust_mappings(&map);
        return orig;
    }
```

If we pass `orig,` the original source map is cloned. I'll fix this API issue from the SWC side in the future.

x-ref, numbers: https://vercel.slack.com/archives/C03EWR7LGEN/p1746729015204369?thread_ts=1746727709.014039&cid=C03EWR7LGEN
)

### What?

Update swc_core to `v23.1.0` again. And add `MACOSX_DEPLOYMENT_TARGET=11.0`.
 
### Why?

It's required to fix the build.

### How?

Closes PACK-4544
…compiler (#78011)

fixes #76930

## Summary

Fixes an issue where using a Webpack plugin that creates child compilers
in a Next.js project could result in asset emission conflicts.

## Description

Starting from
[#75927](#75927),
Next.js uses compilation.emitAsset to emit assets. However, emitAsset
throws an error when attempting to emit an asset with the same name and
identical content more than once.
This behavior is defined in Webpack's implementation:

https://github.com/webpack/webpack/blob/70e3d9d5dbd3548431b8878dead4647beff5c14f/lib/Compilation.js#L4615-L4628

When a plugin hooks into the compilation phase, it also runs for child
compilers. This can lead to duplicated asset emission when using plugins
that spawn child compilers, such as
[vanilla-extract](https://github.com/vanilla-extract-css/vanilla-extract/blob/c66be53d600802b2922da1d6034e2a5ff3fbbcae/packages/webpack-plugin/src/compiler.ts#L85-L89).

To prevent this, we now use the thisCompilation hook instead of
compilation, which ensures that the plugin only applies to the main
compilation and not to any child compilers.

---------

Co-authored-by: Tobias Koppers <[email protected]>
Co-authored-by: Will Binns-Smith <[email protected]>
Another follow-up to #78387 and
#78568. Refer to those PRs for
full details.

Fixes a routing conflict related to per-segment prefetches in sites that
use both App Router and Pages Router.

The fix is to expand the behavior added in the previous PRs — we output
an "inverse" tree prefetch route for every route in the route manifest
that is not PPR-enabled, including ones defined by Pages Router.

---------

Co-authored-by: Wyatt Johnson <[email protected]>
This fixes us failing to trace actions imported by client components due
to the transform removing the actions import so our tracing isn't able
to discover the action import correctly. This was previously handled in
https://github.com/vercel/next.js/pull/73710/files#diff-f39646a8a89ce97754025c8258dc0709f67e4340c07735a3a82a87595ba01c10L526
but removed as part of the experiment.

A regression test for the `use client` importing an actions file with
file needing to be traced has been added.
)

This reverts commit fa6f96f

<!-- 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 #

-->
@pull pull bot added the ⤵️ pull label May 9, 2025
@pull pull bot merged commit e94b795 into code:canary May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants