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: update svelte to 5.0.0-next.181 and fix for {:else if} #548

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Jul 11, 2024

This PR updates the svelte version and fixes the wrong location and token of {:else if} nodes when using the updated svelte.

Also, since Svelte no longer provides types for AST nodes, I have added code to work around that.

Copy link

changeset-bot bot commented Jul 11, 2024

🦋 Changeset detected

Latest commit: a5241cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-eslint-parser Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 11, 2024

Pull Request Test Coverage Report for Build 9884323520

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 11 (90.91%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 90.305%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/converts/block.ts 8 9 88.89%
Totals Coverage Status
Change from base Build 9635284533: -0.04%
Covered Lines: 3003
Relevant Lines: 3212

💛 - Coveralls

@ota-meshi ota-meshi requested a review from baseballyama July 11, 2024 02:16
baseStart = Math.min(baseStart, getWithLoc(getTestFromIfBlock(c)).start);
const contentStart = getWithLoc(getTestFromIfBlock(c)).start;
if (contentStart <= c.start) {
return startBlockIndex(ctx.code, contentStart - 1, ":else");
Copy link
Member Author

Choose a reason for hiding this comment

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

This workaround is still necessary because we need it to work with svelte v4.

@baseballyama
Copy link
Member

Oh I think you made a commit for this to main branch.

@ota-meshi
Copy link
Member Author

Oh, sorry. I made a mistake once and thought I had put it back, but it seems I made another mistake 😓

@ota-meshi
Copy link
Member Author

I reverted the main branch and rebased this PR 😅

Copy link
Member

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

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

I should handle this issue because I changed this AST spec, but thank you so much!

@baseballyama baseballyama merged commit dfe5cb8 into main Jul 11, 2024
13 checks passed
@baseballyama baseballyama deleted the fix-else branch July 11, 2024 10:17
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.

2 participants