Skip to content

Commit 886c8de

Browse files
committed
Change to use export map
1 parent e1918e9 commit 886c8de

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {fromMarkdown} from 'mdast-util-from-markdown'
4-
import {findAllBefore} from './index.js'
4+
import {findAllBefore} from 'unist-util-find-all-before'
55

66
const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')
77
const paragraph = tree.children[0]
@@ -10,9 +10,10 @@ const children = paragraph.children
1010

1111
test('findAllBefore', async function (t) {
1212
await t.test('should expose the public api', async function () {
13-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
14-
'findAllBefore'
15-
])
13+
assert.deepEqual(
14+
Object.keys(await import('unist-util-find-all-before')).sort(),
15+
['findAllBefore']
16+
)
1617
})
1718

1819
await t.test('should fail without parent', async function () {

0 commit comments

Comments
 (0)