Skip to content

Do not include the whole namespace when illegally mutating a namespace#3637

Merged
lukastaegert merged 2 commits intomasterfrom
refine-illegal-namespace-access-handling
Jun 17, 2020
Merged

Do not include the whole namespace when illegally mutating a namespace#3637
lukastaegert merged 2 commits intomasterfrom
refine-illegal-namespace-access-handling

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

Description

This will refine how we handle mutating namespace objects in that this no longer includes the whole namespace but only the mutated prop. Note that it will still (unnecessarily) include the whole namespace when mutating a missing prop but I found it too much effort to optimize for this rare condition that already displays two (!) warnings.

@rollup-bot
Copy link
Copy Markdown
Collaborator

rollup-bot commented Jun 14, 2020

Thank you for your contribution! ❤️

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

npm install rollup/rollup#refine-illegal-namespace-access-handling

or load it into the REPL:
https://rollupjs.org/repl/?circleci=11982

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 14, 2020

Codecov Report

Merging #3637 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3637   +/-   ##
=======================================
  Coverage   96.54%   96.54%           
=======================================
  Files         183      183           
  Lines        6244     6244           
  Branches     1830     1831    +1     
=======================================
  Hits         6028     6028           
  Misses        107      107           
  Partials      109      109           
Impacted Files Coverage Δ
src/ast/nodes/MemberExpression.ts 98.30% <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 6d977a3...fbe4c7a. Read the comment docs.

Copy link
Copy Markdown
Contributor

@guybedford guybedford 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 fixing this up!

@lukastaegert lukastaegert merged commit cc2182d into master Jun 17, 2020
@lukastaegert lukastaegert deleted the refine-illegal-namespace-access-handling branch June 17, 2020 18:02
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.

3 participants