-
Notifications
You must be signed in to change notification settings - Fork 0
feat: better sass node package import support. #62
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 #62 +/- ##
==========================================
+ Coverage 92.22% 93.27% +1.04%
==========================================
Files 14 14
Lines 3924 4105 +181
Branches 690 738 +48
==========================================
+ Hits 3619 3829 +210
+ Misses 278 249 -29
Partials 27 27 ☔ 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 adds built-in support for pkg: prefixed imports in Sass files and introduces a --resolver CLI option for custom module resolution during type generation.
Changes:
- Added native
pkg:specifier support for Sass imports via oxc-resolver with 'sass' condition name - Introduced
--resolverCLI flag to load custom CssResolver modules during type generation - Updated documentation to clarify that
pkg:imports work out-of-the-box without custom resolvers
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/css/src/sassInternals.ts | Adds createPkgResolver, createLegacySassImporter, and integrates pkg: resolution into both modern and legacy Sass importers |
| packages/css/src/generateTypes.ts | Adds resolver option to generateTypes API, implements CLI --resolver flag parsing, and loads custom resolver modules |
| packages/css/src/css.ts | Integrates legacy Sass importer alongside modern importer for backward compatibility |
| packages/css/test/sassImporter.test.ts | Adds comprehensive tests for pkg: resolution and sass condition name handling |
| packages/css/test/generateTypes.test.ts | Adds tests for custom resolver loading via CLI and updates workspace test to use Sass with pkg: imports |
| packages/css/README.md | Documents --resolver CLI option |
| docs/type-generation.md | Documents --resolver flag in CLI options |
| docs/sass-import-aliases.md | Updates documentation to clarify pkg: is built-in and shows alias: as custom example |
| docs/roadmap.md | Adds future work items for Sass resolver configuration options |
| packages/playwright/src/hash-imports-workspace/apps/hash-import-demo/src/workspace-bridge/* | Adds demo files showcasing pkg: import resolution with tokens.scss and hash-imports.scss |
| packages/css/package.json | Version bump to 1.1.0-rc.4 |
| packages/playwright/package.json | Updates @knighted/css dependency to 1.1.0-rc.4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.