You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decouple drift-check from gulpfile by extracting SHADOW_STYLE_IMPORTS
into scripts/shadow-styles-imports.mjs, so the CI check no longer
dynamically imports the gulpfile (which would also run
registerBuildTasks side effects) just to read one constant.
Broaden the drift-check regex to cover non-side-effect import forms
(`import x from 'pkg/x.css'`, `import * as x from`, named imports, and
dynamic `import('pkg/x.css')`), and strip block/line comments before
matching so commented-out imports do not produce false positives.
Split into two regexes (static vs dynamic) for readability.
Add an `assertNoCssImportRules` guard in the `shadow-styles` gulp task:
`CSSStyleSheet.replaceSync()` rejects `@import` rules at runtime, so
fail the build instead of letting Shadow DOM consumers crash. The guard
strips comments and string literals first to avoid false positives on
`@import` substrings inside CSS values.
Fold the standalone `Check Shadow Styles Imports` CI job into the
existing `tests` job — saves a redundant pnpm install (~30-60s) per PR.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments