Skip to content

Commit 1426bcc

Browse files
committed
Change to use export map
1 parent acb5d81 commit 1426bcc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
],
2525
"sideEffects": false,
2626
"type": "module",
27-
"main": "index.js",
28-
"types": "index.d.ts",
27+
"exports": "./index.js",
2928
"files": [
3029
"lib/",
3130
"index.d.ts",

test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {fromMarkdown} from 'mdast-util-from-markdown'
4+
import {source} from 'unist-util-source'
45
import {VFile} from 'vfile'
5-
import {source} from './index.js'
66

77
test('source', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['source'])
9+
assert.deepEqual(Object.keys(await import('unist-util-source')).sort(), [
10+
'source'
11+
])
1012
})
1113

1214
const file = new VFile('> + **[Hello](./example)**\n> world.')

0 commit comments

Comments
 (0)