Skip to content

Commit

Permalink
[packages][s]: fix public api of remark-* and core packages
Browse files Browse the repository at this point in the history
  • Loading branch information
olayway committed Jun 13, 2023
1 parent 5b1238c commit 6f0da8c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .changeset/four-carpets-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@portaljs/remark-wiki-link': patch
'@portaljs/remark-callouts': patch
'@portaljs/remark-embed': patch
'@portaljs/core': patch
---

Fix public API (`exports`, `types`, and `main` fields in `package.json`).
9 changes: 8 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
"dist"
],
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js"
}
},
"dependencies": {
"@docsearch/react": "^3.3.3",
"@floating-ui/react-dom": "^1.3.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/remark-callouts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@
"unist-util-visit": "^4.1.0"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},

"./styles.css": "./dist/styles.css"
}
}
5 changes: 4 additions & 1 deletion packages/remark-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@
"unist-util-visit": "^4.1.1"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-wiki-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
"micromark-util-symbol": "^1.0.1"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
Expand Down
5 changes: 3 additions & 2 deletions packages/remark-wiki-link/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"compilerOptions": {
"types": ["node"],
"outDir": "dist",
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"declaration": true
},
"exclude": ["**/*.spec.ts"],
"include": ["**/*.ts", "**/*.js"]
"include": ["src/**/*.ts"]
}

0 comments on commit 6f0da8c

Please sign in to comment.