Skip to content

Commit cb1e784

Browse files
authored
deps: move peer types to optional peerDeps (#122)
- `react` and `prop-types` are peerDeps, so their `@types/` packages should be too - and since they're peers now, we can [mark them as optional](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependenciesmeta) as well (since they're only needed for TS usage) - this should also allow for users to be able to install a range of `@types/react` as well, instead of just v19
1 parent bd9b98c commit cb1e784

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

package-lock.json

Lines changed: 22 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,22 @@
6464
"changelog": "changelog-maker"
6565
},
6666
"peerDependencies": {
67+
"@types/prop-types": "^15.7.3",
68+
"@types/react": "0.14 - 19",
6769
"prop-types": "^15.5.8",
6870
"react": "0.14 - 19",
6971
"react-dom": "0.14 - 19"
7072
},
73+
"peerDependenciesMeta": {
74+
"@types/prop-types": {
75+
"optional": true
76+
},
77+
"@types/react": {
78+
"optional": true
79+
}
80+
},
7181
"dependencies": {
7282
"@babel/runtime": "^7.17.9",
73-
"@types/prop-types": "^15.7.3",
74-
"@types/react": "^19.0.2",
7583
"@types/signature_pad": "^2.3.0",
7684
"signature_pad": "^2.3.2",
7785
"trim-canvas": "^0.1.0"
@@ -90,6 +98,8 @@
9098
"@rollup/plugin-commonjs": "^21.1.0",
9199
"@rollup/plugin-node-resolve": "^13.2.1",
92100
"@testing-library/react": "^16.1.0",
101+
"@types/prop-types": "^15.7.3",
102+
"@types/react": "^19.0.2",
93103
"canvas": "^3.0.0",
94104
"concurrently": "^9.1.2",
95105
"jest": "^29.7.0",

0 commit comments

Comments
 (0)