-
Notifications
You must be signed in to change notification settings - Fork 353
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(builder): remove extra quote from generated CSS module types #4639
fix(builder): remove extra quote from generated CSS module types #4639
Conversation
🦋 Changeset detectedLatest commit: ea98a2e The changes in this PR will be included in the next version bump. This PR includes changesets to release 253 packages
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 |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4639 +/- ##
==========================================
- Coverage 57.59% 53.56% -4.04%
==========================================
Files 672 665 -7
Lines 17794 18129 +335
Branches 3876 4158 +282
==========================================
- Hits 10249 9710 -539
- Misses 6934 7760 +826
- Partials 611 659 +48 ☔ View full report in Codecov by Sentry. |
Summary
Remove extra quote from generated CSS module types, so it will not conflict with ESLint or prettier.
🤖 Generated by Copilot at ea98a2e
This pull request fixes a bug in the
@modern-js/builder-shared
package that caused extra quotes in the generated CSS module types. It also updates the relevant test cases and adds a changeset file to document the patch version update.Details
🤖 Generated by Copilot at ea98a2e
css-modules-typescript-loader.ts
that caused extra quotes in generated CSS module types, which could lead to syntax errors or invalid identifiers in TypeScript (link)wrapQuotes
function that checks if a CSS class name is a valid identifier in TypeScript, and if not, wraps it with single quotes (link)css-modules-dom
andcss-modules-ts-declaration
test cases to reflect the bug fix and expect valid identifiers without quotes in the declaration files (link,link,link)@modern-js/builder-shared
package, with a Chinese translation (link)Related Issue
Checklist
pnpm run change
.