Skip to content

Respect propertyReadSideEffects in spread elements#4119

Merged
lukastaegert merged 1 commit into
masterfrom
ignore-spread-element-effect
Jun 3, 2021
Merged

Respect propertyReadSideEffects in spread elements#4119
lukastaegert merged 1 commit into
masterfrom
ignore-spread-element-effect

Conversation

@lukastaegert

Copy link
Copy Markdown
Member

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:
#4113

Description

In #4113, we introduced a check for property access side effects when using spread operators. This check was always applied. This PR changes this by respecting treeshake.propertyReadSideEffects: false.

@github-actions

github-actions Bot commented Jun 2, 2021

Copy link
Copy Markdown

Thank you for your contribution! ❤️

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

npm install rollup/rollup#ignore-spread-element-effect

or load it into the REPL:
https://rollupjs.org/repl/?pr=4119

@codecov

codecov Bot commented Jun 2, 2021

Copy link
Copy Markdown

Codecov Report

Merging #4119 (10148c6) into master (b3d130b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4119   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files         201      201           
  Lines        7066     7068    +2     
  Branches     2066     2067    +1     
=======================================
+ Hits         6933     6935    +2     
  Misses         64       64           
  Partials       69       69           
Impacted Files Coverage Δ
src/ast/nodes/SpreadElement.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3d130b...10148c6. Read the comment docs.

@lukastaegert lukastaegert merged commit 5c05997 into master Jun 3, 2021
@lukastaegert lukastaegert deleted the ignore-spread-element-effect branch June 3, 2021 04:41
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.

1 participant