Repository navigation
fix(extractor): compile styled components in non-JSX source modules - #777
Merged
Merged
Conversation
Refs #682, #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #682, #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
Changepacks@devup-ui/wasm@1.0.83 → 1.0.84 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.22 → 1.0.23 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.60 → 0.1.61 - packages/components/package.jsonPatch
@devup-ui/eslint-plugin@1.0.22 → 1.0.23 - packages/eslint-plugin/package.jsonPatch
@devup-ui/next-plugin@1.0.90 → 1.0.91 - packages/next-plugin/package.jsonPatch
@devup-ui/plugin-utils@1.0.17 → 1.0.18 - packages/plugin-utils/package.jsonPatch
@devup-ui/react@1.0.44 → 1.0.45 - packages/react/package.jsonPatch
@devup-ui/reset-css@1.0.31 → 1.0.32 - packages/reset-css/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.67 → 1.0.68 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.73 → 1.0.74 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.71 → 1.0.72 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 10 files with indirect coverage changes 🚀 New features to boost your workflow:
|
owjs3901
marked this pull request as ready for review
October 13, 2026 04:44
Refs #682 #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #770, #734 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> (cherry picked from commit b71ca4e)
This was referenced Oct 14, 2026
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.
Refs #682, #689 (W54, 2026-10-11 Q1 결정).
main의11790bef에서 분기한 독립 PR이며 선행 병합 조건은 없습니다.요약
.ts에서 정의한styled()컴포넌트가 생성 JSX 때문에 TypeScript 모듈로 다시 파싱되지 않던 문제를 수정합니다. 비-JSX 소스에서는 React의jsx()호출을 생성하고,.tsx/.jsx출력은 그대로 유지합니다. 스타일 런타임이나 새 의존성은 추가하지 않습니다.동작
SourceType::is_jsx()로 생성 경로를 구분합니다..ts,.mts,.cts,.js,.mjs,.cjs비-JSX 입력은 호출식이 되고,.tsx/.jsx는 기존 JSX를 생성합니다.react/jsx-runtime의 새 factory 바인딩을 하나 추가합니다. 모든 스코프의 바인딩과 자유 참조를 피해 결정론적인 이름을 예약하며 기존 runtime import를 바꾸지 않습니다. 실제 CommonJS 프로그램은 기존 호출 관례에 맞춰require(...).jsx바인딩을 사용합니다.입력 (
card.ts,.tsx페이지가 import하여 렌더링):수정 전 실제 WASM/플러그인 출력의 렌더러:
수정 후 실제 새 WASM 출력 (single CSS):
관련 스타일은 동일하게
.b{color:olive}.a{padding:8px}입니다.새로 생기는 오류
없습니다. 비-JSX styled 출력의 다운스트림 구문 오류가 없어지며 기존 빌드 오류 조건은 바꾸지 않습니다.
남는 한계
styled()의미를 유지하는 수정이며forwardRef래핑/폴리모픽 as 기능을 새로 추가하지 않습니다. 해당 작업인 fix(extractor): render styled as targets and compile withComponent #710/fix(extractor): forward refs from generated styled components #722 등을 이 PR에 섞지 않았습니다..tsx에서도 재현되며 이번 수정에서 바꾸지 않고 코디네이터에게 보고했습니다. 이미 지원되는 curried 형식은 검증했습니다.검증
열린 styled 관련 PR fix(extractor): compose styled extensions, merge attrs and let later JSX spreads win #707/fix(extractor): render styled as targets and compile withComponent #710/fix(extractor): keep read, $ and theme props off styled tags and evaluate shouldForwardProp at build time #711/fix(extractor): forward refs from generated styled components #722/feat(extractor): compose styled components other modules define #736 및 모든 generator 변경 PR을 읽기 전용으로 조사했으며 같은 비-JSX 출력 수정은 없었습니다.
회귀 먼저: 원래 생산 코드에서 신규 82개 중 대조군 10개 통과, 비-JSX 출력 관련 72개 실패를 확인했습니다. 이후 focused 113개가 모두 통과합니다.
Vite 8.3.1 / webpack 5.111.1 실제 플러그인에서
.ts정의를.tsx페이지가 import해 렌더링하는 두 CSS 모드 빌드가 수정 전 모두 실패, 수정 후 모두 성공했습니다. 같은.tsx정의 대조군과 복합 fixture까지 총 12개 빌드가 통과합니다.실제 Chromium에서 12개 번들을 실행했습니다. 태그·curried/member/template·Box·객체/함수 attrs·custom forwardRef/as·빈 스타일 9개 짝의 DOM과 계산된 스타일이 같고 대상 평가 횟수 1, 실제 ref 대상 A, 호출자 padding 7px 우선 적용, page error 0을 확인했습니다.
cargo fmt --all,cargo +1.99 clippy --workspace --all-targets --message-format short -- -D warnings,cargo test --workspace통과: Rust 2,489개, 실패 0.새 WASM 및 루트 빌드 통과, Bun 5,498개/실패 0, 함수·줄 커버리지 100%.
bun lint는 기존 두 JS 경고 외 오류/새 경고가 없습니다.모든 기존 Rust/Bun snapshot은 변경 없이 유지했습니다. 의도적으로 변경/수락한 기존 snapshot: 없음.
모든 빌드/테스트는
CARGO_BUILD_JOBS=2, 전 프로세스 트리 6 GB watchdog, 한 compiler/browser lane으로 실행했고 서버/브라우저를 종료했습니다. 커밋 훅에는 12 GB watchdog을 적용합니다.정상 rustfmt의 Windows native tarpaulin 97.99%는 알려진 AST SPAN/constructor 측정 아티팩트로, 코디네이터 결정에 따라 표준 훅(CI unset)을 사용합니다. CI의 넓은 rustfmt 설정에서 실제 Linux Rust 100%와 모든 잡 성공이 확인돼야 ready로 전환합니다.
Linux CI 38346350562: head
9fd3745e25988e3cb1fab8429997416094d896ad에서 publish/benchmark/landing-next-e2e/vinext-rsc-css-e2e 네 잡 모두 성공했습니다.Linux Rust 커버리지 100.00%, 9,931/9,931줄이며 새
styled_jsx.rs도 32/32줄입니다. Linux Bun 역시 5,498 통과/실패 0, 함수·줄 커버리지 **100%**입니다.실제 Linux 100% 및 전체 CI 성공을 확인한 뒤 Ready로 전환합니다. merge/approve/close는 하지 않습니다.
2026-10-14 업데이트: main
bf3c92b6(fix(extractor): preserve conditional-spread precedence in styled objects #776, test: restore global state and scoped spies #778)부터 최신a2b74d0f까지 실제 두 부모 merge commit으로 병합했습니다. 충돌 파일libs/extractor/src/extractor/extract_style_from_styled.rs,libs/extractor/src/extractor/mod.rs에서 #776의 조건부 spread 우선순위·순서대로 1회 평가하는prepare/bind_render와 #777의 비-JSXjsx()출력 경로를 모두 유지했으며,.tsx/.jsx바이트 동일성 대조군과 기존 snapshot은 변경하지 않았습니다. 공통 복구7960b48f·b71ca4ea(fix: repair main tests, docs lint and Tailwind test isolation #780)는 각각 별도-xcherry-pick으로 포함했고, 새 WASM/루트 빌드·Rust 전체·Bun 5,875개(함수/줄 100%)·실제 WASM/React 32개 조합이 통과했습니다. 새 오류·추가 한계는 없습니다.