fix: gl-react-blur tsc declaration build + run full build in PR CI#515
Merged
Conversation
The connectSize cast to React.ComponentType needs an unknown intermediate (TS2352), which broke tsc -b on master's Release run. PR CI didn't catch it because ci-tests only ran the babel loop, never tsc: it now runs the full pnpm build so type errors fail PRs, not the Release workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR restores TypeScript declaration builds for gl-react-blur by resolving TS2352 casting failures introduced by tsc -b, and updates PR CI to run the full build pipeline (Babel + tsc -b) so these issues are caught before merge/release.
Changes:
- Update
gl-react-blurconnectSize(...)exports to use a double assertion (as unknown as React.ComponentType<...>) thattsc -baccepts. - Change PR CI to run
pnpm build(which includes the declaration build) instead of only the per-package Babel loop.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/gl-react-blur/src/BlurV1D.tsx | Adjust component export cast to satisfy tsc -b declaration build. |
| packages/gl-react-blur/src/BlurV.tsx | Adjust component export cast to satisfy tsc -b declaration build. |
| packages/gl-react-blur/src/Blur1D.tsx | Adjust component export cast to satisfy tsc -b declaration build. |
| packages/gl-react-blur/src/Blur.tsx | Adjust component export cast to satisfy tsc -b declaration build. |
| .github/workflows/ci-tests.yml | Run full pnpm build in PR CI so declaration-build type errors fail pre-merge. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /> | ||
| ) | ||
| ) as React.ComponentType<BlurV1DProps>; | ||
| ) as unknown as React.ComponentType<BlurV1DProps>; |
| return rec(passes); | ||
| } | ||
| ) as React.ComponentType<BlurVProps>; | ||
| ) as unknown as React.ComponentType<BlurVProps>; |
| /> | ||
| ) | ||
| ) as React.ComponentType<Blur1DProps>; | ||
| ) as unknown as React.ComponentType<Blur1DProps>; |
| return rec(passes); | ||
| } | ||
| ) as React.ComponentType<BlurProps>; | ||
| ) as unknown as React.ComponentType<BlurProps>; |
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
Master's Release workflow is red since #514 merged:
tsc -brejects theconnectSize(...) as React.ComponentType<P>casts (TS2352, insufficient overlap) — fixed with anas unknown asintermediate. This also blocks the first publish ofgl-react-blur@6.0.0, which will go out when this merges.Why PR CI didn't catch it:
ci-tests.ymlcompiled packages with the babel loop only —tsc -b(declaration build) only ran in the Release workflow, on master, after merge. The PR build step now runs the fullpnpm build(babel + tsc) so type errors fail the PR instead. (My local pre-push check also misread the build result by piping it into grep, losing the exit code — mea culpa, fixed my habits along with the workflow.)Verification
pnpm buildexit 0 (babel + tsc both clean)pnpm test: 42/42 ✅buildcheck now exercises the previously missing tsc step🤖 Generated with Claude Code