Skip to content

Commit

Permalink
🏷️ Better declare ESM's types (#4172)
Browse files Browse the repository at this point in the history
* 🏷️ Better declare ESM's types

* bump

* Update packages/fast-check/package.json
  • Loading branch information
dubzzz committed Aug 29, 2023
1 parent 960cc03 commit d4a55e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/3e90c5b4.yml
@@ -0,0 +1,2 @@
releases:
fast-check: patch
13 changes: 9 additions & 4 deletions packages/fast-check/package.json
Expand Up @@ -7,9 +7,14 @@
"exports": {
"./package.json": "./package.json",
".": {
"types": "./lib/types/fast-check.d.ts",
"require": "./lib/fast-check.js",
"default": "./lib/esm/fast-check.js"
"require": {
"types": "./lib/types/fast-check.d.ts",
"default": "./lib/fast-check.js"
},
"import": {
"types": "./lib/esm/types/fast-check.d.ts",
"default": "./lib/esm/fast-check.js"
}
}
},
"module": "lib/esm/fast-check.js",
Expand All @@ -23,7 +28,7 @@
"scripts": {
"build": "yarn build:publish-cjs && yarn build:publish-esm && yarn build:publish-types && node postbuild/main.cjs",
"build-ci": "cross-env EXPECT_GITHUB_SHA=true yarn build",
"build:publish-types": "tsc -p tsconfig.publish.types.json",
"build:publish-types": "tsc -p tsconfig.publish.types.json && tsc -p tsconfig.publish.types.json --outDir lib/esm/types",
"build:publish-cjs": "tsc -p tsconfig.publish.json",
"build:publish-esm": "tsc -p tsconfig.publish.json --module es2015 --moduleResolution node --outDir lib/esm && cp package.esm-template.json lib/esm/package.json",
"typecheck": "tsc --noEmit",
Expand Down

0 comments on commit d4a55e3

Please sign in to comment.