Skip to content

Commit 3cbd916

Browse files
committed
Change to use export map
1 parent e38d9ee commit 3cbd916

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
@@ -6,17 +6,18 @@
66
import assert from 'node:assert/strict'
77
import test from 'node:test'
88
import {fromMarkdown} from 'mdast-util-from-markdown'
9-
import {findAfter} from './index.js'
9+
import {findAfter} from 'unist-util-find-after'
1010

1111
const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')
1212
const paragraph = /** @type {Parent} */ (tree.children[0])
1313
const children = paragraph.children
1414

1515
test('findAfter', async function (t) {
1616
await t.test('should expose the public api', async function () {
17-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
18-
'findAfter'
19-
])
17+
assert.deepEqual(
18+
Object.keys(await import('unist-util-find-after')).sort(),
19+
['findAfter']
20+
)
2021
})
2122

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

0 commit comments

Comments
 (0)