diff --git a/.changeset/four-carpets-marry.md b/.changeset/four-carpets-marry.md new file mode 100644 index 000000000..f3c783bfb --- /dev/null +++ b/.changeset/four-carpets-marry.md @@ -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`). diff --git a/packages/core/package.json b/packages/core/package.json index 64742ac9c..a4515dce5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/remark-callouts/package.json b/packages/remark-callouts/package.json index 091cade6a..cc8b67215 100644 --- a/packages/remark-callouts/package.json +++ b/packages/remark-callouts/package.json @@ -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" } } diff --git a/packages/remark-embed/package.json b/packages/remark-embed/package.json index 678c0a805..1f0ad28cd 100644 --- a/packages/remark-embed/package.json +++ b/packages/remark-embed/package.json @@ -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" } diff --git a/packages/remark-wiki-link/package.json b/packages/remark-wiki-link/package.json index f43c9755e..6c98d1b8b 100644 --- a/packages/remark-wiki-link/package.json +++ b/packages/remark-wiki-link/package.json @@ -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" } diff --git a/packages/remark-wiki-link/tsconfig.lib.json b/packages/remark-wiki-link/tsconfig.lib.json index 87a9dea76..e0aba9c1d 100644 --- a/packages/remark-wiki-link/tsconfig.lib.json +++ b/packages/remark-wiki-link/tsconfig.lib.json @@ -3,8 +3,9 @@ "compilerOptions": { "types": ["node"], "outDir": "dist", - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "declaration": true }, "exclude": ["**/*.spec.ts"], - "include": ["**/*.ts", "**/*.js"] + "include": ["src/**/*.ts"] }