Skip to content

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 21, 2026 15:54
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 84.25532% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.56%. Comparing base (32d5edc) to head (9ff42cb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/css/src/loaderBridge.ts 76.74% 40 Missing ⚠️
packages/css/src/styleGraph.ts 88.55% 30 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   92.66%   91.56%   -1.10%     
==========================================
  Files          15       16       +1     
  Lines        4565     5013     +448     
  Branches      817      898      +81     
==========================================
+ Hits         4230     4590     +360     
- Misses        307      391      +84     
- Partials       28       32       +4     

☔ 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 fixes dependency graph resolution for transitive styles in the loader bridge by implementing comprehensive style import tracking across the module graph.

Changes:

  • Added new styleGraph.ts module to traverse CSS/SCSS/Sass/Less import chains transitively
  • Updated loader bridge to collect and include all transitive style dependencies when building combined modules
  • Extended pattern matching to include all style files (not just CSS modules)

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/css/package.json Version bump from 1.1.0-rc.6 to 1.1.0-rc.7
packages/playwright/package.json Updated dependency version and added prebuild script
packages/css/src/styleGraph.ts New module implementing transitive style import collection with support for CSS, Sass, Less dialects
packages/css/src/moduleGraph.ts Exported normalizeSpecifier function for reuse in styleGraph
packages/css/src/loaderBridge.ts Integrated style graph traversal, renamed collectCssModuleRequests to collectStyleImportSpecifiers, added support for non-module styles
packages/css/test/styleGraph.test.ts Comprehensive test coverage for styleGraph functionality
packages/css/test/loaderBridge.test.ts Updated test names and added graph traversal test
packages/css/test/fixtures/bridge-graph/* New test fixtures for dependency graph testing
docs/loader.md Added clarification about the distinction between loader and loader-bridge
Comments suppressed due to low confidence (1)

packages/css/src/loaderBridge.ts:314

  • The cssModulesValues array uses the string literal 'undefined' for non-CSS-module requests, but this string is truthy and will not be filtered out by filter(Boolean). This will cause Object.assign to attempt to spread the string 'undefined', which has no enumerable own properties but may cause unexpected behavior. Use the actual undefined value instead of the string 'undefined', or use null which is falsy and will be filtered out.
  const cssModulesValues = options.cssRequests.map((request, index) =>
    isCssModuleRequest(request)
      ? `__knightedStyle${index}.knightedCssModules`
      : 'undefined',
  )
  const lines = [
    `import * as __knightedUpstream from ${upstreamLiteral};`,
    ...cssImports,
    options.emitDefault
      ? "const __knightedDefault = Object.prototype.hasOwnProperty.call(__knightedUpstream, 'default') ? __knightedUpstream['default'] : undefined;"
      : '',
    `const __knightedCss = [${cssValues.join(', ')}].filter(Boolean).join('\\n');`,
    `const __knightedCssModules = Object.assign({}, ...[${cssModulesValues.join(
      ', ',
    )}].filter(Boolean));`,

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

Copy link

Copilot AI commented Jan 21, 2026

@knightedcodemonkey I've opened a new pull request, #67, to work on those changes. Once the pull request is ready, I'll request review from you.

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

2 participants