Skip to content

Commit 2bfe98f

Browse files
committed
Change to use exports
1 parent 4890c82 commit 2bfe98f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

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",

test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4-
import {findAndReplace} from './index.js'
4+
import {findAndReplace} from 'hast-util-find-and-replace'
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-
'defaultIgnore',
10-
'findAndReplace'
11-
])
8+
assert.deepEqual(
9+
Object.keys(await import('hast-util-find-and-replace')).sort(),
10+
['defaultIgnore', 'findAndReplace']
11+
)
1212
})
1313

1414
await t.test(

0 commit comments

Comments
 (0)