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

Added style AST to parser services #340

Merged
merged 33 commits into from
Jun 10, 2023
Merged

Added style AST to parser services #340

merged 33 commits into from
Jun 10, 2023

Conversation

marekdedic
Copy link
Contributor

Alternative proposal to #318, see #318 (comment)

@changeset-bot
Copy link

changeset-bot bot commented May 22, 2023

🦋 Changeset detected

Latest commit: fc476cf

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

@marekdedic marekdedic marked this pull request as ready for review May 22, 2023 21:02
@marekdedic
Copy link
Contributor Author

I think this could be optimized by only parsing when the AST is demanded for the first time (and caching it for subsequent requests), but that can be added later

@coveralls
Copy link

coveralls commented May 25, 2023

Pull Request Test Coverage Report for Build 5092436135

  • 35 of 36 (97.22%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 90.73%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/index.ts 4 5 80.0%
Totals Coverage Status
Change from base Build 5018136696: 0.07%
Covered Lines: 2163
Relevant Lines: 2306

💛 - Coveralls

@marekdedic
Copy link
Contributor Author

I added tests while debugging the offset. I'm on the fence about the offset re-calculation, see the specific comment. Other than that, good to go as far as I am concerned...

@marekdedic marekdedic requested a review from ota-meshi June 8, 2023 13:39
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! I think we can merge once the CI error is fixed. I think maybe there is a problem with the main branch.

@ota-meshi ota-meshi merged commit d170f91 into sveltejs:main Jun 10, 2023
@marekdedic
Copy link
Contributor Author

Thank you for the reviews, re-reviews and consultation of the correct approach! :)

@marekdedic marekdedic deleted the postcss-style-parsing-parser-services branch June 11, 2023 17:41
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.

3 participants