Skip to content

Commit 6f86e71

Browse files
committed
Change to use exports
1 parent 9fec6be commit 6f86e71

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
],
3232
"sideEffects": false,
3333
"type": "module",
34-
"main": "index.js",
35-
"types": "index.d.ts",
34+
"exports": "./index.js",
3635
"files": [
3736
"lib/",
3837
"index.d.ts",

test/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import test from 'node:test'
44
import {toHtml} from 'hast-util-to-html'
55
import {toHast} from 'mdast-util-to-hast'
66
import {fromMarkdown} from 'mdast-util-from-markdown'
7-
import {toMarkdown} from 'mdast-util-to-markdown'
8-
import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
97
import {
108
gfmAutolinkLiteralFromMarkdown,
119
gfmAutolinkLiteralToMarkdown
12-
} from '../index.js'
10+
} from 'mdast-util-gfm-autolink-literal'
11+
import {toMarkdown} from 'mdast-util-to-markdown'
12+
import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
1313

1414
test('core', async function (t) {
1515
await t.test('should expose the public api', async function () {
16-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
17-
'gfmAutolinkLiteralFromMarkdown',
18-
'gfmAutolinkLiteralToMarkdown'
19-
])
16+
assert.deepEqual(
17+
Object.keys(await import('mdast-util-gfm-autolink-literal')).sort(),
18+
['gfmAutolinkLiteralFromMarkdown', 'gfmAutolinkLiteralToMarkdown']
19+
)
2020
})
2121
})
2222

0 commit comments

Comments
 (0)