Skip to content

feat(parser): Improve error recovery of parser#954

Merged
devongovett merged 8 commits intoparcel-bundler:masterfrom
kdy1:error-recovery
Apr 22, 2025
Merged

feat(parser): Improve error recovery of parser#954
devongovett merged 8 commits intoparcel-bundler:masterfrom
kdy1:error-recovery

Conversation

@kdy1
Copy link
Copy Markdown
Contributor

@kdy1 kdy1 commented Apr 7, 2025

I'm trying to get some feedback before adding more test cases for error recovery.

Do you think this change sounds good to you?

Context

I'm trying to replace swc_css with lightningcss in styled-jsx (and turbopack), but I found an edge case where some more error recovery is necessary due to the way styled-jsx works.

@kdy1 kdy1 marked this pull request as ready for review April 14, 2025 03:17
@chenjiahan
Copy link
Copy Markdown
Contributor

We have seen similar cases among Rspack users, this PR should help us resolve the issues 👍

@kdy1 kdy1 changed the title feat(parser): Improve error recovery for media queries feat(parser): Improve error recovery of parser Apr 21, 2025
@kdy1
Copy link
Copy Markdown
Contributor Author

kdy1 commented Apr 21, 2025

@devongovett I added one more test, and it seems like it's already good! Can you take a look? This PR covers all necessary error recovery required for migration from swc_css to lightningcss of styled-jsx.

Copy link
Copy Markdown
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

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

passing the options through everywhere is a bit annoying but overall seems ok

@devongovett devongovett merged commit b08d7af into parcel-bundler:master Apr 22, 2025
3 checks passed
@vpontis
Copy link
Copy Markdown

vpontis commented Apr 22, 2025

@devongovett thanks! Could we get another lightningcss release that includes this?

@kdy1 kdy1 deleted the error-recovery branch April 22, 2025 23:15
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.

4 participants