Skip to content

Commit

Permalink
Fork types for TS 5.1 and beyond (#4548)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Nov 13, 2024
1 parent 514183f commit 208b0b9
Show file tree
Hide file tree
Showing 6 changed files with 453 additions and 26 deletions.
23 changes: 18 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
"umd:main": "dist/preact.umd.js",
"unpkg": "dist/preact.min.js",
"source": "src/index.js",
"typesVersions": {
"<=5.0": {
".": ["./src/index-5.d.ts"]
}
},
"exports": {
".": {
"types@<=5.0": {
"types": "./src/index-5.d.ts"
},
"types": "./src/index.d.ts",
"browser": "./dist/preact.module.js",
"umd": "./dist/preact.umd.js",
Expand Down Expand Up @@ -105,7 +113,7 @@
},
"types": "src/index.d.ts",
"scripts": {
"prepare": "husky && run-s build && check-export-map && npm-merge-driver-install",
"prepare": "husky && run-s build && npm-merge-driver-install",
"build": "npm-run-all --parallel build:*",
"build:core": "microbundle build --raw --no-generateTypes -f cjs,esm,umd",
"build:core-min": "microbundle build --raw --no-generateTypes -f cjs,esm,umd,iife src/cjs.js -o dist/preact.min.js",
Expand Down Expand Up @@ -246,7 +254,7 @@
"sade": "^1.8.1",
"sinon": "^9.2.3",
"sinon-chai": "^3.7.0",
"typescript": "^4.9.5",
"typescript": "5.1.6",
"undici": "^4.12.0"
},
"volta": {
Expand Down
Loading

0 comments on commit 208b0b9

Please sign in to comment.