Skip to content

Conversation

@knightedcodemonkey
Copy link
Owner

Copilot AI review requested due to automatic review settings January 10, 2026 20:47
@codecov
Copy link

codecov bot commented Jan 10, 2026

Codecov Report

❌ Patch coverage is 78.04878% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.86%. Comparing base (d0bda67) to head (c6fdbc1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/css/src/moduleGraph.ts 78.04% 36 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
- Coverage   92.54%   91.86%   -0.69%     
==========================================
  Files          12       12              
  Lines        3126     3281     +155     
  Branches      550      572      +22     
==========================================
+ Hits         2893     3014     +121     
- Misses        210      244      +34     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a 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 pull request adds comprehensive support for CSS import attributes (with { type: "css" }) to the @knighted/css module graph walker. The feature enables the library to recognize and handle CSS imports that use import attributes, including extensionless imports, aliased specifiers, and static dynamic imports.

Changes:

  • Enhanced module graph walker to detect and handle with { type: "css" } and legacy assert { type: "css" } import attributes
  • Added 7 comprehensive test cases covering static imports, dynamic imports, re-exports, extensionless specifiers, and path-mapped imports
  • Created Playwright fixtures demonstrating both bundled and native (no-bundler) import attribute workflows
  • Updated documentation across README files to explain the new attribute-aware import functionality
  • Bumped package version from 1.0.9 to 1.0.10

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/css/src/moduleGraph.ts Core implementation: added ExtractedSpecifier type, attribute extraction functions, and logic to treat attribute-marked imports as CSS regardless of file extension
packages/css/test/moduleGraph.test.ts Added 7 test cases covering import attributes with various syntax forms, extensionless imports, path mappings, re-exports, and dynamic imports
packages/playwright/test/native-attr.spec.ts New Playwright test for native CSS import attributes without bundler (Chromium-only)
packages/playwright/test/lit-react.spec.ts Added test case for bundled attribute import card
packages/playwright/src/native-attr/* New demo files showing native CSS module import with attribute syntax
packages/playwright/src/lit-react/cards/attr-import-card/* New card component demonstrating bundled import attributes
packages/playwright/rspack.config.js Added .css to resolve extensions to support extensionless attribute imports
packages/playwright/package.json Updated @knighted/css dependency to 1.0.10
packages/css/package.json Bumped version to 1.0.10
packages/css/README.md Updated feature list to mention import attribute support
README.md Added "Attribute-aware imports" bullet to feature overview
packages/playwright/README.md Expanded to document three test scenarios including native import attributes
package-lock.json Updated lock file with new version references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit f8cf325 into main Jan 10, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch January 10, 2026 21:06
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.

Support with { type: "css" } import attribute.

2 participants