Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@btst/yar",
"version": "1.3.0",
"version": "1.3.1",
"packageManager": "pnpm@10.14.0",
"description": "Pluggable router for modern react frameworks",
"type": "module",
Expand Down Expand Up @@ -50,8 +50,8 @@
"vitest": "^3.2.4"
},
"peerDependencies": {
"@types/react": "^19.1.16",
"@types/react-dom": "^19.1.9",
"@types/react": "^18.0.0 || ^19.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude React 18 typings that lack React.JSX

When a consumer is pinned to an early @types/react 18.x release, this range now declares the installation supported even though the emitted public declarations reference React.JSX.IntrinsicElements from src/router.ts and src/define.ts; those older typings expose only the global JSX namespace, so TypeScript reports that React has no exported member JSX. Constrain the React 18 lower bound to a release that provides React.JSX (and compile-test that lower bound), or avoid emitting React.JSX in the public types.

Useful? React with 👍 / 👎.

"@types/react-dom": "^18.0.0 || ^19.0.0",
"react": "^18.0.0 || ^19.0.0"
},
"exports": {
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/package-metadata.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { describe, expect, it } from "vitest";
import packageJson from "../../package.json";

describe("package metadata", () => {
it("supports React 18 and 19 type packages", () => {
expect(packageJson.peerDependencies).toMatchObject({
"@types/react": "^18.0.0 || ^19.0.0",
"@types/react-dom": "^18.0.0 || ^19.0.0",
react: "^18.0.0 || ^19.0.0",
});
});
});
Loading