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

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

Merged
merged 2 commits into from Jun 17, 2020

Conversation

@lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented Jun 14, 2020

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
Collaborator

@rollup-bot 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

@codecov 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
Contributor

@guybedford guybedford left a comment

Thanks for fixing this up!

@lukastaegert lukastaegert merged commit cc2182d into master Jun 17, 2020
6 of 7 checks passed
@lukastaegert lukastaegert deleted the refine-illegal-namespace-access-handling branch Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants