Skip to content

Commit

Permalink
chore: use explicit exports field with types
Browse files Browse the repository at this point in the history
  • Loading branch information
rozsival committed Nov 7, 2023
1 parent d8398f6 commit d62abc2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/eslint-config/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/export,import/extensions
export * from './dist/index.d.ts';
3 changes: 2 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"sideEffects": false,
"type": "commonjs",
"main": "index.js",
"main": "./index.js",
"types": "./index.d.ts",
"files": [
"base.js",
"dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"module": "CommonJS",
"moduleResolution": "node"
},
"include": [".eslintrc.js", "./*.js", "src/**/*"],
"include": [".eslintrc.js", "index.d.ts", "./*.js", "src/**/*"],
"exclude": ["dist", "node_modules"]
}
8 changes: 7 additions & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
},
"sideEffects": false,
"type": "module",
"exports": "./dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down
15 changes: 13 additions & 2 deletions packages/testing-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@
"sideEffects": false,
"type": "module",
"exports": {
".": "./dist/index.js",
"./setup": "./dist/setup.js"
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./setup": {
"import": "./dist/setup.js",
"types": "./dist/setup.d.ts"
},
"./testing-library": {
"import": "./dist/testing-library.js",
"types": "./dist/testing-library.d.ts"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down
8 changes: 7 additions & 1 deletion packages/typedoc-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
},
"sideEffects": false,
"type": "module",
"exports": "./dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down
24 changes: 23 additions & 1 deletion packages/vitest-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,29 @@
},
"sideEffects": false,
"type": "module",
"exports": "./dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./base": {
"import": "./dist/base.js",
"types": "./dist/base.d.ts"
},
"./constants": {
"import": "./dist/constants.js",
"types": "./dist/constants.d.ts"
},
"./nestjs": {
"import": "./dist/nestjs.js",
"types": "./dist/nestjs.d.ts"
},
"./react": {
"import": "./dist/react.js",
"types": "./dist/react.d.ts"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down

0 comments on commit d62abc2

Please sign in to comment.