[packages][s]: fix public api of remark-* and core packages

This commit is contained in:
olayway 2023-06-13 12:09:59 +02:00
parent 5b1238cc27
commit 6f0da8c3a3
6 changed files with 32 additions and 6 deletions

View File

@ -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`).

View File

@ -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",

View File

@ -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"
}
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -3,8 +3,9 @@
"compilerOptions": {
"types": ["node"],
"outDir": "dist",
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"declaration": true
},
"exclude": ["**/*.spec.ts"],
"include": ["**/*.ts", "**/*.js"]
"include": ["src/**/*.ts"]
}