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

fix: scoped variable with array destructuring & nested arguments #5730

Merged
merged 4 commits into from Nov 19, 2021

Conversation

jbmolle
Copy link
Contributor

@jbmolle jbmolle commented Nov 17, 2021

Description

This PR solves #5727 and #5472.
Vitejs will check for a locally scoped variable with the same name when destructuring an array.
Vitejs will replace a variable used in a string interpolation as default value for a nested argument in a function declaration.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Svetlana Smorodinova and others added 2 commits November 17, 2021 21:32
@jbmolle jbmolle changed the title Locally scoped variable with array destructuring & replace nested arguments in function Fix: Locally scoped variable with array destructuring & replace nested arguments in function Nov 17, 2021
@jbmolle jbmolle changed the title Fix: Locally scoped variable with array destructuring & replace nested arguments in function fix: Locally scoped variable with array destructuring & replace nested arguments in function Nov 17, 2021
patak-dev
patak-dev previously approved these changes Nov 17, 2021
Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's MUCH better to read 🙂

@patak-dev patak-dev changed the title fix: Locally scoped variable with array destructuring & replace nested arguments in function fix: scoped variable with array destructuring & nested arguments Nov 19, 2021
@patak-dev patak-dev merged commit b86a2f3 into vitejs:main Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants