Skip to content

fix: support memo/forwardRef tag interpolation.#96

Merged
knightedcodemonkey merged 2 commits into
mainfrom
bananas
May 7, 2026
Merged

fix: support memo/forwardRef tag interpolation.#96
knightedcodemonkey merged 2 commits into
mainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2026 18:58
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.28%. Comparing base (2c086b1) to head (ec94418).

Files with missing lines Patch % Lines
src/react/react-jsx.ts 83.33% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@knightedcodemonkey knightedcodemonkey changed the title fix(react-jsx): support memo/forwardRef tag interpolation. fix: support memo/forwardRef tag interpolation. May 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 reactJsx to 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.

Comment thread src/react/react-jsx.ts
@knightedcodemonkey knightedcodemonkey merged commit 4ac42df into main May 7, 2026
7 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 7, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants