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

Ensure the initializer of a destructuring declaration is always included if the id is included #4663

Merged
merged 2 commits into from Oct 12, 2022

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:

Description

There were cases where in a declaration let { x } = y, y would not be included. This can result in invalid code or broken, which is hereby fixed.

@github-actions
Copy link

github-actions bot commented Oct 12, 2022

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4654-destructuring-init

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

@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #4663 (9d5f7c2) into master (1057ac5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4663   +/-   ##
=======================================
  Coverage   99.06%   99.06%           
=======================================
  Files         214      214           
  Lines        7554     7558    +4     
  Branches     2096     2098    +2     
=======================================
+ Hits         7483     7487    +4     
  Misses         23       23           
  Partials       48       48           
Impacted Files Coverage Δ
src/ast/nodes/VariableDeclaration.ts 98.05% <100.00%> (+0.07%) ⬆️

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

Ensure that new event listeners are created synchronously after a function handler
@lukastaegert lukastaegert merged commit 4dd8f96 into master Oct 12, 2022
@lukastaegert lukastaegert deleted the gh-4654-destructuring-init branch October 12, 2022 07:31
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.0.1. 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
Labels
None yet
Projects
None yet
2 participants