Skip to content

Commit 5883881

Browse files
committed
Change to use exports
1 parent ad513f8 commit 5883881

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
],
2828
"sideEffects": false,
2929
"type": "module",
30-
"main": "index.js",
31-
"types": "index.d.ts",
30+
"exports": "./index.js",
3231
"files": [
3332
"lib/",
3433
"index.d.ts",

test.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import test from 'node:test'
33
import {fromMarkdown} from 'mdast-util-from-markdown'
44
import {toMarkdown} from 'mdast-util-to-markdown'
55
import {gfmFootnote} from 'micromark-extension-gfm-footnote'
6-
import {gfmFootnoteFromMarkdown, gfmFootnoteToMarkdown} from './index.js'
6+
import {
7+
gfmFootnoteFromMarkdown,
8+
gfmFootnoteToMarkdown
9+
} from 'mdast-util-gfm-footnote'
710

811
test('core', async function (t) {
912
await t.test('should expose the public api', async function () {
10-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
11-
'gfmFootnoteFromMarkdown',
12-
'gfmFootnoteToMarkdown'
13-
])
13+
assert.deepEqual(
14+
Object.keys(await import('mdast-util-gfm-footnote')).sort(),
15+
['gfmFootnoteFromMarkdown', 'gfmFootnoteToMarkdown']
16+
)
1417
})
1518
})
1619

0 commit comments

Comments
 (0)