Repository navigation
fix(extractor): report vanilla-extract companions however they load - #906
Merged
Merged
Conversation
The recipes and sprinkles check read import declarations only, so `export … from`, `export *`, `require()` and `import()` bypassed it. It now finds every way a module loads, and adds `@vanilla-extract/dynamic`, whose runtime variable assignment Devup UI does not compile. `globalKeyframes` imported from `@vanilla-extract/css` is a targeted located error: Devup UI names every keyframes itself, so a fixed global name has nothing to compile to, and the stylesheet run failed with a bare `TypeError: not a callable function`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
companion_errors) only looked atimportdeclarations, soexport … from,export *,require()andimport()got past it with no error. It now uses the newmodule_loadshelper, which finds imports,export … from,export *,require('…'),import x = require('…')andimport('…'), and skips anything type-only.@vanilla-extract/dynamicis added to the list with its own message. That package assigns variables at runtime, which Devup UI does not keep ([전수조사] 결과와 개발 범위 (2026-09-30) #682).globalKeyframes(name, frames)per [전수조사/D] 흡수 라이브러리 기능: css prop, 컴포넌트 선택자, @emotion/css, VE·StyleX API #690) gets a targeted error, not an implementation. Devup UI names every keyframes by hashing its content (ExtractKeyframes→keyframes_to_keyframes_name), so a keyframes with a fixed global name has nothing to compile to. I also tested emitting it asglobalCss({ '@keyframes fade': {...} }), but that object form flattens the frames into one at-rule withopacity: 0/.5/1, so it isn't usable without changingglobalCssitself. Before this change the stylesheet run failed withTypeError: not a callable function. Now aglobalKeyframesimport from@vanilla-extract/cssis a located error that names it and says to usekeyframes(), or to opt the alias out. A real implementation would need fixed-name keyframes support inglobalCss, which can be a follow-up.module_loads.rsis identical to the copy in fix(extractor): report Emotion code left at runtime as located errors #904, so the two PRs merge cleanly (checked withgit merge-tree).New build errors (while
@vanilla-extract/cssis aliased):`@vanilla-extract/recipes` / `@vanilla-extract/sprinkles` generates CSS that Devup UI does not compile …for re-exports,require()andimport()`@vanilla-extract/dynamic` assigns variables at runtime …`globalKeyframes()` from `@vanilla-extract/css` is not compiled by Devup UI …Refs #690
Test plan
cargo test -p extractor --lib -- companion module_loads vanilla(295 passed)cargo clippy -p extractor --all-targets -- -D warnings,cargo fmt --all🤖 Generated with Claude Code