Skip to content

chore: release 3.0.0#61

Open
gnapse wants to merge 7 commits into
mainfrom
ernesto/release-3.0.0
Open

chore: release 3.0.0#61
gnapse wants to merge 7 commits into
mainfrom
ernesto/release-3.0.0

Conversation

@gnapse
Copy link
Copy Markdown

@gnapse gnapse commented May 25, 2026

Promotes the current next branch changes to main and bumps @doist/react-interpolate to 3.0.0 for the manual release workflow.

@gnapse gnapse self-assigned this May 25, 2026
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

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

This PR prepares the 3.0.0 release for @doist/react-interpolate by promoting recent changes, adding React 19 support, and introducing separate ESM and CJS builds. These updates do a great job modernizing the package's compatibility and distribution format. There are a few areas noted for refinement before publishing, specifically around relaxing the restrictive Node engine requirements, adjusting the MappingRenderFunction and SyntaxRule types to better enforce their runtime contracts, and expanding test coverage to fully validate the new ESM bundle, React 19 compatibility, and lexer error paths.

Some low priority findings & nits have been included in the summary below

Lower-priority review note (1)
  • [P3] src/interpolate.test.tsx:9: Explicitly calling cleanup() here is unnecessary. Because Vitest is configured with globals: true, @testing-library/react automatically registers and runs cleanup() in the global afterEach hook.

Share FeedbackReview Logs

Comment thread src/interpolate.tsx Outdated
Comment thread package.json Outdated
Comment thread src/syntax.ts

export interface SyntaxRule<T extends SyntaxTokenType = SyntaxTokenType> {
type: T;
regex: RegExp;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] SyntaxRule exposes a raw RegExp, but lexer relies on two hidden invariants this type doesn't capture: the regex must be global and must put the token name in capture group 1. That means custom syntax can type-check and still fail immediately at runtime. Consider keeping this shape internal, or exposing helper constructors/validated builders so the public API enforces the same contract as the implementation.

Comment thread src/parser.test.ts
]);
}).toThrow("Syntax rule regex must use the global flag");
});
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] The new lexer.ts implementation throws "Syntax rule must capture a token name" if a custom syntax regex lacks a capture group. This new error path is currently untested. Consider adding a test case to this describe block to verify the behavior.

Comment thread package-checks/smoke.cjs

assert(typeof cjsPackage === "object", "CJS package should be a namespace object");
assert(typeof cjsPackage.default === "function", "CJS default export should be a function");
assert(typeof esmPackage.default === "function", "ESM default export should be a function");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] The smoke check imports the ESM bundle but never executes it. With this PR generating separate ESM and CJS builds, an ESM-only runtime regression would still pass here as long as the symbol exists. Render esmPackage.default once too so both published entry points get real runtime coverage.

Comment thread package.json
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