Skip to content

Commit b46fc50

Browse files
committed
Remove unneeded main, types fields
1 parent 8b27f61 commit b46fc50

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

dev/index.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type {OnEnterError} from './lib/index.js'
2-
31
export type {
42
CompileContext,
53
Encoding,
@@ -13,6 +11,8 @@ export type {
1311
Value
1412
} from './lib/index.js'
1513

14+
export {fromMarkdown} from './lib/index.js'
15+
1616
/**
1717
* Interface of tracked data.
1818
*
@@ -77,5 +77,3 @@ declare module 'micromark-util-types' {
7777
_spread?: boolean
7878
}
7979
}
80-
81-
export {fromMarkdown} from './lib/index.js'

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@
2828
],
2929
"sideEffects": false,
3030
"type": "module",
31-
"main": "index.js",
32-
"types": "index.d.ts",
31+
"exports": {
32+
"development": "./dev/index.js",
33+
"default": "./index.js"
34+
},
3335
"files": [
3436
"dev/",
3537
"lib/",
3638
"index.d.ts",
3739
"index.js"
3840
],
39-
"exports": {
40-
"development": "./dev/index.js",
41-
"default": "./index.js"
42-
},
4341
"dependencies": {
4442
"@types/mdast": "^4.0.0",
4543
"@types/unist": "^3.0.0",

test/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ import {commonmark} from 'commonmark.json'
99
import {fromHtml} from 'hast-util-from-html'
1010
import {toHtml} from 'hast-util-to-html'
1111
import {toHast} from 'mdast-util-to-hast'
12+
import {fromMarkdown} from 'mdast-util-from-markdown'
1213
import {toString} from 'mdast-util-to-string'
13-
import {fromMarkdown} from '../dev/index.js'
1414

1515
test('fromMarkdown', async function (t) {
1616
await t.test('should expose the public api', async function () {
17-
assert.deepEqual(Object.keys(await import('../dev/index.js')).sort(), [
18-
'fromMarkdown'
19-
])
17+
assert.deepEqual(
18+
Object.keys(await import('mdast-util-from-markdown')).sort(),
19+
['fromMarkdown']
20+
)
2021
})
2122

2223
await t.test('should parse an empty document', async function () {

0 commit comments

Comments
 (0)