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: var scope should not extend outside the reactive block #6800

Merged
merged 16 commits into from May 5, 2023

Conversation

RaiVaibhav
Copy link
Contributor

Fixes: #6794

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

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@RaiVaibhav RaiVaibhav changed the title Fix 6794: var scope should not extend reactive block Fix 6794: var scope should not extend outside the reactive block Oct 2, 2021
@RaiVaibhav
Copy link
Contributor Author

Hey @Conduitry whenever you are free please have a look at this PR, also let me know if it will need some change in the documentation.

src/compiler/compile/Component.ts Outdated Show resolved Hide resolved
src/compiler/compile/Component.ts Outdated Show resolved Hide resolved
@RaiVaibhav
Copy link
Contributor Author

Hey, I will check the review and update the PR today 👍 , thank you for reviewing.

@RaiVaibhav
Copy link
Contributor Author

Hey, @tanhauhau updated the PR with the addressed review.

@dummdidumm dummdidumm added this to the 4.x milestone Mar 2, 2023
@dummdidumm
Copy link
Member

Giving this the v4 label because strictly speaking it's a breaking change, some valid code that works now could be erroring then.

@vercel
Copy link

vercel bot commented Mar 2, 2023

@dummdidumm is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@benmccann benmccann changed the title Fix 6794: var scope should not extend outside the reactive block fix: var scope should not extend outside the reactive block Mar 14, 2023
xxkl1 and others added 3 commits April 11, 2023 15:20
Instead of "both", which doesn't make sense at that point.
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
@benmccann benmccann changed the base branch from master to version-4 April 11, 2023 21:08
benmccann and others added 7 commits April 12, 2023 09:00
- upgrade to TypeScript 5
- upgrade @ampproject/remapping
- remove obsolete workarounds

---------

Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
bump to rollup 3. Includes reworking the "treat those imports as external" a bit so that Rollup builds correctly but doesn't bundle some of the (now relative) imports

---------

Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
@dummdidumm dummdidumm merged commit 37c8bd7 into sveltejs:version-4 May 5, 2023
13 of 14 checks passed
@gtm-nayan gtm-nayan mentioned this pull request Jun 17, 2023
5 tasks
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.

Compiler should explicitly disallow var in reactive block scope
6 participants