Skip to content

Commit

Permalink
Add type exports for cjs (fixes #560)
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 16, 2024
1 parent eec21cf commit ed7c875
Show file tree
Hide file tree
Showing 82 changed files with 804 additions and 196 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@typescript-eslint/parser": "^6.15.0",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"esbuild": "^0.19.10",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-no-only-tests": "^3.1.0",
Expand All @@ -54,7 +54,7 @@
"solid-js": "^1.8.7",
"solid-start": "^0.3.10",
"tsup": "^7.2.0",
"tsup-preset-solid": "^2.1.0",
"tsup-preset-solid": "^2.2.0",
"tsx": "^4.7.0",
"turbo": "^1.11.2",
"typescript": "~5.2.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/active-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"files": [
"dist"
Expand Down
5 changes: 4 additions & 1 deletion packages/audio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/autofocus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/bounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/broadcast-channel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"start": "vite serve dev",
Expand Down
5 changes: 4 additions & 1 deletion packages/connectivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/controlled-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/cursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"start": "vite serve dev",
Expand Down
5 changes: 4 additions & 1 deletion packages/deep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/destructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/devices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/event-bus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"start": "vite serve dev",
Expand Down
5 changes: 4 additions & 1 deletion packages/event-dispatcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/event-listener/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/event-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"prebuild": "npm run clean",
Expand Down
5 changes: 4 additions & 1 deletion packages/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/filesystem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/flux-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/fullscreen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"prebuild": "npm run clean",
Expand Down
5 changes: 4 additions & 1 deletion packages/geolocation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/gestures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"gqlgen": "graphql-codegen --config dev/codegen.yml",
Expand Down
5 changes: 4 additions & 1 deletion packages/history/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/idle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"scripts": {
"dev": "tsx ../../scripts/dev.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/immutable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/input-mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": "./dist/index.cjs"
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"files": [
"dist"
Expand Down
Loading

0 comments on commit ed7c875

Please sign in to comment.