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 debugger statements as if-statement branches #3769

Merged
merged 1 commit into from Sep 8, 2020

Conversation

lukastaegert
Copy link
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:
Resolves #3766

Description

The new logic for if-statement simplification that relies on injecting additional scopes to detect hoisted variables introduced a bug where "unknown" nodes, in this case a debugger statement, were no longer properly handled. This is fixed here.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-3766-nested-debugger

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

@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3769   +/-   ##
=======================================
  Coverage   97.02%   97.02%           
=======================================
  Files         185      185           
  Lines        6460     6460           
  Branches     1868     1870    +2     
=======================================
  Hits         6268     6268           
  Misses        101      101           
  Partials       91       91           
Impacted Files Coverage Δ
src/ast/nodes/IfStatement.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 fe0bdd6...6ba68a5. Read the comment docs.

@lukastaegert lukastaegert merged commit 6697ee4 into master Sep 8, 2020
@lukastaegert lukastaegert deleted the gh-3766-nested-debugger branch September 8, 2020 05:47
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.

Uninformitive crash dump is generated when 'debugger;' is used
2 participants