Skip to content

fix: conditional/logical expression should request a new tree-shaking#5481

Merged
lukastaegert merged 2 commits intorollup:masterfrom
liuly0322:dev
Apr 21, 2024
Merged

fix: conditional/logical expression should request a new tree-shaking#5481
lukastaegert merged 2 commits intorollup:masterfrom
liuly0322:dev

Conversation

@liuly0322
Copy link
Copy Markdown
Contributor

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:

Description

While we should not request a tree-shaking in ConditionalExpression or LogicalExpression if nothing happens; we should request one if anything changes.

One way to validate this fix is to use example from #5480, see repl, another one is to use index.js from https://github.com/elchininet/shadow-dom-selector

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 21, 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 Apr 21, 2024 5:25pm

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.83%. Comparing base (38fe707) to head (47fd8ba).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5481   +/-   ##
=======================================
  Coverage   98.83%   98.83%           
=======================================
  Files         238      238           
  Lines        9554     9560    +6     
  Branches     2439     2444    +5     
=======================================
+ Hits         9443     9449    +6     
  Misses         46       46           
  Partials       65       65           

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

Copy link
Copy Markdown
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 quickly looking into this!

@lukastaegert lukastaegert added this pull request to the merge queue Apr 21, 2024
@lukastaegert lukastaegert removed this pull request from the merge queue due to a manual request Apr 21, 2024
@lukastaegert lukastaegert merged commit 190893a into rollup:master Apr 21, 2024
@github-actions
Copy link
Copy Markdown

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

TypeError: Cannot read properties of null (reading 'render')

2 participants