Skip to content

Commit 2054db1

Browse files
committed
Change to use export map
1 parent 432836f commit 2054db1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
],
2626
"sideEffects": false,
2727
"type": "module",
28-
"main": "index.js",
29-
"types": "index.d.ts",
28+
"exports": "./index.js",
3029
"files": [
3130
"lib/",
3231
"index.d.ts",

Diff for: test.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3+
import {findAndReplace} from 'mdast-util-find-and-replace'
34
import {u} from 'unist-builder'
4-
import {findAndReplace} from './index.js'
55

66
test('findAndReplace', async function (t) {
77
await t.test('should expose the public api', async function () {
8-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
9-
'findAndReplace'
10-
])
8+
assert.deepEqual(
9+
Object.keys(await import('mdast-util-find-and-replace')).sort(),
10+
['findAndReplace']
11+
)
1112
})
1213

1314
await t.test(

0 commit comments

Comments
 (0)