Skip to content

fix: correct template rendering, preserve compatibility and refresh tooling - #1

Merged
oe merged 4 commits into
mainfrom
maintenance/compiler-and-toolchain
Oct 3, 2026
Merged

oe merged 4 commits into
mainfrom
maintenance/compiler-and-toolchain

Conversation

@oe

@oe oe commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

HTML templates with multiline attributes, $/underscore placeholders, quoted literals, or self-closing inputs can fail to compile or render. This update fixes those cases, preserves React element placeholders in text, and prepares an explicitly documented 0.2.0 release.

  • Accept whitespace around attributes and =, escape property keys and syntax characters, concatenate adjacent numeric attribute placeholders, and emit React.createElement calls using variadic children. Static sibling elements no longer produce list-key warnings.
  • Preserve legacy deep imports, JSX entity decoding, pretty JSX whitespace normalization, valid Unicode component names, and three-argument custom factory calls (including empty children arrays for self-closing tags). Preserve the historical reserverWhitespace option spelling.
  • Adopt pnpm 12.8.1, Vite 8, Vitest 5, and TypeScript 5.9.3, which matches the declaration generator's bundled compiler. Add reproducible installs, typechecking, coverage, and isolated tarball ESM/CommonJS/deep-import/declaration checks to CI.
  • Clarify the build-time source-generation use case, document component slots and alternatives, fix the examples, and improve npm description, keywords, homepage and issue links.

Compatibility: Generated source and some rendered output change. Numeric attribute placeholders now concatenate rather than add; text placeholders in JavaScript output preserve React children rather than coerce them to strings. Compact JSX output preserves actual internal line breaks instead of literal backslash-n text. Custom factories can receive separate text/placeholder children rather than one concatenated entry per text node. The README documents these changes and asks users to rebuild generated components. Development uses Node 22.12+; no new library Node engine restriction is added. Package version is prepared as 0.2.0; no npm publication is performed.

Validation: 91 local tests pass with 100% line coverage; builds and isolated package checks pass. Packaged exports and declarations also pass under Node 18. pnpm audit reports zero known vulnerabilities. CI verifies Node 22/React 18, Node 22/React 19, and Node 24/React 19.

@oe oe changed the title fix: harden template rendering and refresh maintenance tooling fix: harden template rendering and modernize pnpm tooling Oct 3, 2026
@oe oe changed the title fix: harden template rendering and modernize pnpm tooling fix: correct template rendering, preserve compatibility and refresh tooling Oct 3, 2026
@oe
oe merged commit ecdb004 into main Oct 3, 2026
3 checks passed
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.

1 participant