fix: support memo/forwardRef tag interpolation.#96
Merged
Conversation
… placeholder leakage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 88.25% 88.28% +0.03%
==========================================
Files 26 26
Lines 2205 2220 +15
Branches 619 624 +5
==========================================
+ Hits 1946 1960 +14
- Misses 84 85 +1
Partials 175 175 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR extends the reactJsx tagged-template runtime to support interpolating React component wrappers (specifically memo(...) and forwardRef(...)) in JSX tag positions, and adds tests to validate the behavior.
Changes:
- Added React tests covering
<${memo(...)} />and<${forwardRef(...)} />tag interpolation. - Extended the shared template builder to accept a configurable “tag-name binding” predicate.
- Updated
reactJsxto treat certain non-function React component types as valid tag-name bindings.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/react-jsx.test.ts | Adds regression tests for memo/forwardRef tag interpolation in reactJsx. |
| src/runtime/shared.ts | Adds TemplateBuildOptions and allows buildTemplate to use a custom tag-binding predicate. |
| src/react/react-jsx.ts | Introduces isReactTagBindingValue and passes it into buildTemplate for React-specific tag binding detection. |
| package.json | Bumps package version to 1.13.2-rc.0. |
| package-lock.json | Updates lockfile version fields to match 1.13.2-rc.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.