-
Notifications
You must be signed in to change notification settings - Fork 0
fix: vanilla extract import triggers declaration mode sidecar. #74
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
==========================================
+ Coverage 90.56% 90.58% +0.01%
==========================================
Files 17 17
Lines 6330 6342 +12
Branches 1147 1152 +5
==========================================
+ Hits 5733 5745 +12
Misses 560 560
Partials 37 37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where importing vanilla-extract files (.css.ts, .css.js, etc.) didn't trigger declaration mode sidecar generation. The core fix updates the hasStyleImports function in generateTypes.ts to recognize vanilla-extract files as style resources.
Changes:
- Added
isVanillaExtractResourcehelper to detect vanilla-extract files and integrated it into thehasStyleImportsfunction - Added comprehensive test fixtures for vanilla-extract in the Playwright mode demo (card component, host element, tests)
- Fixed Windows symlink compatibility in tests by using 'junction' type
- Updated documentation to mention vanilla-extract files in style resource listings
- Bumped
@knighted/csspackage version from1.2.0-rc.0to1.2.0-rc.1
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/css/src/generateTypes.ts | Added isVanillaExtractResource function and integrated it into hasStyleImports to detect vanilla-extract files |
| packages/css/test/generateTypes.test.ts | Added test for vanilla-extract detection and fixed Windows symlink compatibility |
| packages/playwright/src/mode/declaration/vanilla-card.css.ts | New vanilla-extract styles for the test card component |
| packages/playwright/src/mode/declaration/vanilla-card.tsx | New React component using vanilla-extract styles |
| packages/playwright/src/mode/declaration/vanilla-host.ts | New Lit element host for testing vanilla-extract in Shadow DOM |
| packages/playwright/src/mode/index.ts | Integration of vanilla-extract card into mode demo |
| packages/playwright/src/mode/constants.ts | Added test ID constants for vanilla-extract components |
| packages/playwright/test/mode.spec.ts | Added Playwright test for vanilla-extract light/shadow DOM style matching |
| packages/playwright/rspack.mode.config.js | Added loader configuration for .css.ts files |
| packages/playwright/package.json | Bumped @knighted/css dependency to 1.2.0-rc.1 |
| packages/css/package.json | Bumped package version to 1.2.0-rc.1 |
| package-lock.json | Updated lock file with new version |
| docs/type-generation.md | Updated documentation to mention vanilla-extract files |
| docs/plugin.md | Added clarification about &combined usage |
| docs/loader.md | Added comparison table between loader and loader-bridge |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.