Skip to content

fix: include left-side effect of optional chaining in the end of hasEffectsAsChainElement#5642

Merged
lukastaegert merged 1 commit intomasterfrom
fix/5633
Sep 12, 2024
Merged

fix: include left-side effect of optional chaining in the end of hasEffectsAsChainElement#5642
lukastaegert merged 1 commit intomasterfrom
fix/5633

Conversation

@TrickyPi
Copy link
Member

@TrickyPi TrickyPi commented Sep 9, 2024

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

Description

It seems that we forget to check out left-side effect of optional chaining in the end of hasEffectsAsChainElement method.

@vercel
Copy link

vercel bot commented Sep 9, 2024

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 Sep 9, 2024 2:46am

@github-actions
Copy link

github-actions bot commented Sep 9, 2024

Thank you for your contribution! ❤️

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

npm install rollup/rollup#fix/5633

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-da115dd4q-rollup-js.vercel.app/repl/?pr=5642

@codecov
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.04%. Comparing base (766dbf9) to head (1c287ba).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5642   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files         242      242           
  Lines        9339     9339           
  Branches     2469     2469           
=======================================
  Hits         9250     9250           
  Misses         58       58           
  Partials       31       31           

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

@github-actions
Copy link

github-actions bot commented Sep 9, 2024

Performance report!

Rough benchmark

Command Mean [s] Min [s] Max [s] Relative
node _benchmark/previous/bin/rollup -i ./perf/entry.js -o _benchmark/result/previous.js 8.987 ± 0.077 8.897 9.032 1.00
node _benchmark/current/bin/rollup -i ./perf/entry.js -o _benchmark/result/current.js 9.032 ± 0.036 8.990 9.055 1.00 ± 0.01

Internal benchmark

  • BUILD: 8007ms, 751 MB
    • initialize: 0ms, 25.9 MB
    • generate module graph: 3119ms, 575 MB
      • generate ast: 1518ms, 568 MB
    • sort and bind modules: 439ms, 616 MB
    • mark included statements: 4447ms, 751 MB
      • treeshaking pass 1: 1516ms, 717 MB
      • treeshaking pass 2: 726ms, 740 MB
      • treeshaking pass 3: 283ms, 748 MB
      • treeshaking pass 4: 263ms, 743 MB
      • treeshaking pass 5: 305ms, 750 MB
      • treeshaking pass 6: 252ms, 750 MB
      • treeshaking pass 7: 236ms, 748 MB
      • treeshaking pass 8: 228ms, 750 MB
      • treeshaking pass 9: 208ms, 758 MB
      • treeshaking pass 10: 211ms, 755 MB
      • treeshaking pass 11: 209ms, 751 MB
  • GENERATE: 864ms, 1.02 GB
    • initialize render: 0ms, 914 MB
    • generate chunks: 85ms, 917 MB
      • optimize chunks: 0ms, 916 MB
    • render chunks: 760ms, 1 GB
    • transform chunks: 18ms, 1.02 GB
    • generate bundle: 0ms, 1.02 GB

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.

Nice catch!

@lukastaegert lukastaegert added this pull request to the merge queue Sep 12, 2024
Merged via the queue into master with commit bfefc79 Sep 12, 2024
@lukastaegert lukastaegert deleted the fix/5633 branch September 12, 2024 04:43
@github-actions
Copy link

This PR has been released as part of rollup@4.21.3. 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.

If or while with side effect and optional chaining in expression & empty body is dropped with treeshake: smallest

2 participants