Skip to content

fix: pass yarn_pnp option where needed#8736

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-16-fix_pass_yarn_pnp_option_where_needed
Mar 16, 2026
Merged

fix: pass yarn_pnp option where needed#8736
graphite-app[bot] merged 1 commit intomainfrom
03-16-fix_pass_yarn_pnp_option_where_needed

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red commented Mar 16, 2026

Pass yarn_pnp option where needed but was missing.

Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sapphi-red sapphi-red requested a review from shulaoda March 16, 2026 13:27
@sapphi-red sapphi-red marked this pull request as ready for review March 16, 2026 13:28
Copilot AI review requested due to automatic review settings March 16, 2026 13:28
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 16, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 0c1dcc1
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69b805467f5a52000809f22d
😎 Deploy Preview https://deploy-preview-8736--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sapphi-red sapphi-red force-pushed the 03-16-fix_pass_yarn_pnp_option_where_needed branch from 3120a3d to 9dcc3e1 Compare March 16, 2026 13:29
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 16, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 3120a3d
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69b805807844b600083ae420
😎 Deploy Preview https://deploy-preview-8736--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 16, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit a828c64
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69b808f0a93fc60008784c74
😎 Deploy Preview https://deploy-preview-8736--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sapphi-red sapphi-red force-pushed the 03-16-fix_pass_yarn_pnp_option_where_needed branch from 9dcc3e1 to 7fe9fc3 Compare March 16, 2026 13:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Yarn Plug’n’Play (PnP) awareness to tsconfig discovery/caching across the JS utilities and Rust transform pipeline, and introduces a dedicated resolveTsconfig/TsconfigCache wrapper utility.

Changes:

  • Thread a yarn_pnp / yarnPnp boolean through NAPI bindings and Rust tsconfig discovery (oxc_resolver) paths.
  • Add packages/rolldown/src/utils/resolve-tsconfig.ts to wrap the binding APIs and provide a zero-arg TsconfigCache.
  • Update public rolldown/utils exports to surface resolveTsconfig and the new TsconfigCache wrapper.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/rolldown/src/utils/transform.ts Passes detected Yarn PnP flag into binding transform calls; switches TsconfigCache type source to the new wrapper module.
packages/rolldown/src/utils/resolve-tsconfig.ts New wrapper module providing resolveTsconfig() and a zero-arg TsconfigCache that internally wires Yarn PnP.
packages/rolldown/src/utils-index.ts Re-exports resolveTsconfig/TsconfigCache from the new wrapper module.
packages/rolldown/src/experimental-index.ts Adjusts deprecated TsconfigCache re-export to point at wrapper module (but still re-exports binding resolveTsconfig).
packages/rolldown/src/binding.d.cts Updates binding-level signatures (extra yarnPnp param; TsconfigCache ctor now takes yarnPnp).
crates/rolldown/src/utils/prepare_build_context.rs Plumbs yarn_pnp into filesystem/resolver setup and raw transform options creation.
crates/rolldown_common/src/utils/enhanced_transform.rs Adds yarn_pnp to tsconfig auto-discovery resolver options.
crates/rolldown_common/src/inner_bundler_options/types/transform_options.rs Extends RawTransformOptions::new to accept and forward yarn_pnp into oxc_resolver.
crates/rolldown_binding/src/transform.rs Extends NAPI transform/resolve-tsconfig entrypoints to take yarn_pnp and forwards it into core logic.
crates/rolldown_binding/src/transform_cache.rs Updates TsconfigCache constructor to accept yarn_pnp; removes Default; updates tests accordingly.

You can also share your feedback on Copilot code review. Take the survey.

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Mar 16, 2026

Merge activity

graphite-app bot pushed a commit that referenced this pull request Mar 16, 2026
Pass `yarn_pnp` option where needed but was missing.
@graphite-app graphite-app bot force-pushed the 03-16-fix_pass_yarn_pnp_option_where_needed branch from 7fe9fc3 to 81638b3 Compare March 16, 2026 13:39
Pass `yarn_pnp` option where needed but was missing.
Copilot AI review requested due to automatic review settings March 16, 2026 13:43
@sapphi-red sapphi-red force-pushed the 03-16-fix_pass_yarn_pnp_option_where_needed branch from 81638b3 to a828c64 Compare March 16, 2026 13:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Plumbs a Yarn Plug’n’Play (PnP) enablement flag through the TS/Rust transform + tsconfig-resolution path, while keeping the high-level rolldown/utils and rolldown/experimental APIs auto-detecting PnP from process.versions.pnp.

Changes:

  • Add yarnPnp detection in JS utilities and pass it into binding enhancedTransform* and resolveTsconfig.
  • Introduce utils/resolve-tsconfig.ts wrapper exporting TsconfigCache (auto-configured) and resolveTsconfig.
  • Thread yarn_pnp through Rust transform/tsconfig resolution (including oxc_resolver options) and update generated binding typings.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/rolldown/src/utils/transform.ts Passes detected yarnPnp into binding transform functions; switches TsconfigCache type import to new wrapper.
packages/rolldown/src/utils/resolve-tsconfig.ts New wrapper providing TsconfigCache/resolveTsconfig with auto Yarn PnP detection.
packages/rolldown/src/utils-index.ts Re-exports TsconfigCache from the new wrapper module.
packages/rolldown/src/experimental-index.ts Re-exports resolveTsconfig from wrapper; re-points deprecated TsconfigCache export.
packages/rolldown/src/binding.d.cts Updates binding signatures/types to include yarnPnp plumbing and new constructor signature.
crates/rolldown/src/utils/prepare_build_context.rs Threads yarn_pnp into filesystem + raw transform options construction.
crates/rolldown_common/src/utils/enhanced_transform.rs Adds yarn_pnp arg and forwards it to oxc_resolver tsconfig discovery.
crates/rolldown_common/src/inner_bundler_options/types/transform_options.rs Extends RawTransformOptions::new to include yarn_pnp for resolver options.
crates/rolldown_binding/src/transform.rs Extends N-API exports to accept yarn_pnp and passes it through to core transform + cache construction.
crates/rolldown_binding/src/transform_cache.rs Changes N-API TsconfigCache constructor to take yarn_pnp and forwards it to oxc_resolver.
.typos.toml Adds PnP identifier allowance for typos tooling.

You can also share your feedback on Copilot code review. Take the survey.

@graphite-app graphite-app bot merged commit a828c64 into main Mar 16, 2026
44 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Benchmarks Rust

  • target: main(3b07e1b)
  • pr: 03-16-fix_pass_yarn_pnp_option_where_needed(a828c64)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.04     68.0±1.24ms        ? ?/sec    1.00     65.2±1.53ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.07     77.4±2.42ms        ? ?/sec    1.00     72.3±2.01ms        ? ?/sec
bundle/bundle@rome_ts                                        1.08    153.0±2.57ms        ? ?/sec    1.00    141.9±4.27ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.10    172.7±1.84ms        ? ?/sec    1.00    157.7±2.25ms        ? ?/sec
bundle/bundle@threejs                                        1.04     64.1±3.50ms        ? ?/sec    1.00     61.4±2.07ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.04     74.6±1.57ms        ? ?/sec    1.00     71.8±2.64ms        ? ?/sec
bundle/bundle@threejs10x                                     1.03   712.7±10.42ms        ? ?/sec    1.00    692.6±4.98ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    799.6±5.17ms        ? ?/sec    1.01    804.3±9.36ms        ? ?/sec

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 16, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing 03-16-fix_pass_yarn_pnp_option_where_needed (a828c64) with main (308427e)2

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (a828c64) during the generation of this report, so 308427e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@sapphi-red sapphi-red deleted the 03-16-fix_pass_yarn_pnp_option_where_needed branch March 17, 2026 02:51
This was referenced Mar 18, 2026
shulaoda added a commit that referenced this pull request Mar 18, 2026
## [1.0.0-rc.10] - 2026-03-18

### 🚀 Features

- add indentExclusionRanges property to MagicString (#8746) by @IWANABETHATGUY
- expose `oxcRuntimePlugin` (#8654) by @sapphi-red
- rust: make bundler generic over FileSystem for in-memory benchmarks (#8652) by @Boshen

### 🐛 Bug Fixes

- rolldown_plugin_vite_dynamic_import_vars: align dynamic import fast check with Vite (#8760) by @shulaoda
- renamer: handle existing bindings in nested scopes when finding unique names (#8741) by @drewolson
- pass `yarn_pnp` option where needed (#8736) by @sapphi-red
- preserve optional chaining in namespace member expr rewrite (#8712) by @Copilot
- correct UTF-16 index handling in native MagicString (#8693) by @IWANABETHATGUY
- mark failing doctests as ignore (#8700) by @Boshen
- prevent may_partial_namespace from leaking through include_module (#8682) by @IWANABETHATGUY
- ci: bump native-build cache key to invalidate stale napi-rs artifacts (#8678) by @Boshen
- `comments.annotation: false` breaking tree-shaking (#8657) by @IWANABETHATGUY
- validate filenames for NUL bytes from chunkFileNames/entryFileNames (#8644) by @IWANABETHATGUY
- dce-only minify should not set NODE_ENV to production (#8651) by @IWANABETHATGUY

### 🚜 Refactor

- rust: remove dead `CrossModuleOptimizationConfig::side_effects_free_function_optimization` (#8673) by @Dunqing
- rust: simplify `cross_module_optimization` by removing redundant scope tracking (#8672) by @Dunqing
- simplify string repeat in guess_indentor (#8753) by @IWANABETHATGUY
- consolidate custom magic-string tests into one file (#8696) by @IWANABETHATGUY
- extract CJS bailout checks from include_symbol (#8683) by @IWANABETHATGUY
- rust: remove `BindingIdentifierExt` to use `BindingIdentifier::symbol_id()` instead (#8667) by @Dunqing
- bench: add bench_preset helper and inline presets (#8658) by @Boshen
- rust: filter external modules from entries instead of mapping bit positions (#8637) by @Dunqing

### 📚 Documentation

- clarify watch mode behavior and its limitations (#8751) by @sapphi-red
- add external link icon to GitHub button in Hero section (#8731) by @thisisnkc
- guide: clarify that `inject` option is only conceptually similar to esbuild's one (#8743) by @sapphi-red
- meta/design: add `devtools.md` (#8663) by @hyf0
- add viteplus alpha announcement banner (#8668) by @shulaoda

### ⚡ Performance

- rolldown: some minor perf optimization found by autoresearch (#8730) by @Brooooooklyn
- replace Vec allocation with lazy iterator in find_hash_placeholders (#8703) by @Boshen
- replace TypedDashMap with TypedMap in CustomField (#8708) by @Boshen
- bench: remove scan benchmark binary to halve LTO link time (#8694) by @Boshen

### 🧪 Testing

- watch: increase timeout for error output (#8766) by @sapphi-red
- vite-tests: remove JS plugin tests (#8767) by @sapphi-red
- watch: add CLI exit code test (#8752) by @sapphi-red
- normalize paths on Windows even if `resolve.symlinks` is false (#8483) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- correct comment in bundle-analyzer-plugin.ts (#8770) by @origami-z
- upgrade oxc to 0.120.0 (#8764) by @Boshen
- enable all test for `reset` category in MagicString.test.ts (#8749) by @IWANABETHATGUY
- deps: update test262 submodule for tests (#8742) by @sapphi-red
- deps: update oxc apps (#8734) by @renovate[bot]
- deps: update softprops/action-gh-release action to v2.6.1 (#8724) by @renovate[bot]
- deps: update npm packages (major) (#8722) by @renovate[bot]
- deps: update github-actions (major) (#8721) by @renovate[bot]
- deps: update softprops/action-gh-release action to v2.6.0 (#8720) by @renovate[bot]
- deps: update npm packages (#8718) by @renovate[bot]
- deps: update rust crates (#8717) by @renovate[bot]
- deps: update github-actions (#8716) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.17.0 (#8713) by @renovate[bot]
- deps: bump cargo-shear to v1.11.2 (#8711) by @Boshen
- use org level `CODE_OF_CONDUCT.md` (#8706) by @sapphi-red
- fix cache key mismatch and remove redundant cache saves (#8695) by @Boshen
- deps: update oxc apps (#8692) by @renovate[bot]
- deps: update oxc apps (#8649) by @renovate[bot]
- should do matrix out side of reusable workflows 2 (#8691) by @hyf0
- should do matrix out side of reusable workflows (#8690) by @hyf0
- deps: update dependency rolldown-plugin-dts to v0.22.5 (#8689) by @renovate[bot]
- upgrade oxc to 0.119.0 and oxc_resolver to 11.19.1 (#8686) by @Boshen
- correct if condition of `type-check` job (#8677) by @hyf0
- Gate CI type-check job on node changes (#8669) by @Copilot
- benchmark: improve codspeed build (#8665) by @Boshen
- deps: update oxc to v0.118.0 (#8650) by @renovate[bot]
- deps: update crate-ci/typos action to v1.44.0 (#8647) by @renovate[bot]
- deps: update oxc resolver to v11.19.1 (#8646) by @renovate[bot]
- deps: update dependency rust to v1.94.0 (#8648) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.22.4 (#8645) by @renovate[bot]

### ◀️ Revert

- Revert "ci: Gate CI type-check job on node changes" (#8674) by @hyf0
- "chore(deps): update dependency rust to v1.94.0 (#8648)" (#8660) by @shulaoda

### ❤️ New Contributors

* @origami-z made their first contribution in [#8770](#8770)
* @drewolson made their first contribution in [#8741](#8741)
* @thisisnkc made their first contribution in [#8731](#8731)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants