Skip to content

fix: consider function expression in thenable when tree-shaking dynamic imports#5977

Merged
lukastaegert merged 1 commit intomasterfrom
fix/5975
Jun 6, 2025
Merged

fix: consider function expression in thenable when tree-shaking dynamic imports#5977
lukastaegert merged 1 commit intomasterfrom
fix/5975

Conversation

@TrickyPi
Copy link
Member

@TrickyPi TrickyPi commented Jun 4, 2025

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
resolves #5975

Description

This issue occurred because we overlooked the possibility of function expression in thenable in #5954.

@vercel
Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 2:34am

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#fix/5975

Notice: Ensure you have installed the latest stable Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.

or load it into the REPL:
https://rollup-q9rxip40b-rollup-js.vercel.app/repl/?pr=5977

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

Performance report

  • BUILD: 7137ms, 766 MB
    • initialize: 0ms, 24.6 MB
    • generate module graph: 2718ms, 571 MB
      • generate ast: 1205ms, 562 MB
    • sort and bind modules: 392ms (-16ms, -3.9%), 622 MB
    • mark included statements: 3982ms, 766 MB
      • treeshaking pass 1: 2326ms, 760 MB
      • treeshaking pass 2: 467ms, 787 MB (+5%)
      • treeshaking pass 3: 402ms, 766 MB
      • treeshaking pass 4: 389ms, 767 MB
      • treeshaking pass 5: 386ms, 766 MB
  • GENERATE: 691ms, 1.01 GB (+3%)
    • initialize render: 0ms, 885 MB
    • generate chunks: 56ms, 898 MB
      • optimize chunks: 0ms, 902 MB
    • render chunks: 619ms, 970 MB
    • transform chunks: 16ms, 1.01 GB (+3%)
    • generate bundle: 0ms, 1.01 GB (+3%)

@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (4f69d33) to head (23c6c43).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5977   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         270      270           
  Lines        8731     8733    +2     
  Branches     1507     1508    +1     
=======================================
+ Hits         8624     8626    +2     
  Misses         73       73           
  Partials       34       34           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TrickyPi TrickyPi changed the title fix: consider function expressions in thenable when tree-shaking dynamic imports fix: consider function expression in thenable when tree-shaking dynamic imports Jun 4, 2025
Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@lukastaegert lukastaegert added this pull request to the merge queue Jun 6, 2025
Merged via the queue into master with commit da88626 Jun 6, 2025
42 checks passed
@lukastaegert lukastaegert deleted the fix/5975 branch June 6, 2025 04:40
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

This PR has been released as part of rollup@4.41.2. You can test it via npm install rollup.

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.

named exports being stripped with dynamic imports

2 participants