Skip to content
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

Handle side effects when a namespace is nested in an object #4758

merged 2 commits into from Dec 17, 2022


Copy link

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:


In the namespace handling logic, it was previously overlooked how to handle the case when a namespace is used as a member of an object, resulting in undetected side effects. This is fixed here.

Copy link

github-actions bot commented Dec 16, 2022

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4751-namespace-member-tree-shaking

or load it into the REPL:

Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #4758 (9bceadd) into master (a27cf81) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4758   +/-   ##
  Coverage   99.04%   99.04%           
  Files         217      217           
  Lines        7715     7734   +19     
  Branches     2135     2143    +8     
+ Hits         7641     7660   +19     
  Misses         24       24           
  Partials       50       50           
Impacted Files Coverage Δ
cli/logging.ts 95.45% <100.00%> (ø)
src/ast/variables/NamespaceVariable.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert lukastaegert merged commit 5613b96 into master Dec 17, 2022
10 checks passed
@lukastaegert lukastaegert deleted the gh-4751-namespace-member-tree-shaking branch December 17, 2022 05:45
Copy link

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

Successfully merging this pull request may close these issues.

incorrect tree shaking with import * as foo + export default foo
2 participants