Skip to content

Commit 824f157

Browse files
committed
Change to use export map
1 parent b3d27ae commit 824f157

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

+1-2
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

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
import assert from 'node:assert/strict'
66
import test from 'node:test'
77
import {fromMarkdown} from 'mdast-util-from-markdown'
8-
import {findBefore} from './index.js'
8+
import {findBefore} from 'unist-util-find-before'
99

1010
test('`findBefore`', async function (t) {
11+
await t.test('should expose the public api', async function () {
12+
assert.deepEqual(
13+
Object.keys(await import('unist-util-find-before')).sort(),
14+
['findBefore']
15+
)
16+
})
17+
1118
const tree = fromMarkdown('Some *emphasis*, **importance**, and `code`.')
1219

1320
assert(tree.type === 'root')

0 commit comments

Comments
 (0)