Skip to content

feat: add dom createElement adapter with fragment support.#84

Merged
knightedcodemonkey merged 2 commits intomainfrom
bananas
Mar 16, 2026
Merged

feat: add dom createElement adapter with fragment support.#84
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Owner

@knightedcodemonkey knightedcodemonkey commented Mar 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 03:09
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.44%. Comparing base (fe3c9f5) to head (c71c600).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   88.12%   88.44%   +0.32%     
==========================================
  Files          24       25       +1     
  Lines        1861     1913      +52     
  Branches      502      516      +14     
==========================================
+ Hits         1640     1692      +52     
  Misses         70       70              
  Partials      151      151              

☔ 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 feat: add DOM createElement adapter with Fragment support and browser… feat: add dom createElement adapter with fragment support. Mar 16, 2026
Copy link

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

Adds a jsx.createElement / jsx.Fragment facade so consumers can build DOM output without using the tagged-template syntax, and extends the demo + tests to validate the new API.

Changes:

  • Introduces jsx.createElement and jsx.Fragment by wiring a new DOM createElement implementation into src/jsx.ts.
  • Extracts shared JSX render types (JsxRenderable, JsxComponent) into src/internal/jsx-types.ts.
  • Updates unit/e2e fixtures and Playwright coverage to exercise createElement + Fragment, and adds a helper script to serve the demo fixture.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/jsx.test.ts Adds unit tests for jsx.createElement and jsx.Fragment.
test/fixtures/e2e.html Adds a new demo section rendered via jsx.createElement/Fragment.
src/jsx.ts Exposes createElement + Fragment on the exported jsx tag and refactors type exports.
src/internal/jsx-types.ts New shared type module for JsxRenderable / JsxComponent.
src/internal/dom-create-element.ts New implementation of the DOM createElement facade and Fragment handling.
playwright/esm-demo.spec.ts Adds Playwright coverage for the new demo section and de-ambiguates the original counter button selector.
package.json Bumps version and adds demo:e2e-fixture script.
package-lock.json Lockfile version bump alignment with package version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit 3280173 into main Mar 16, 2026
7 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 16, 2026 03:30
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