Skip to content

Commit fa143c7

Browse files
committed
Change to use exports
1 parent 7353ce6 commit fa143c7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: package.json

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

Diff for: test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import stringify from 'json-stringify-safe'
4+
import {toParse5} from 'hast-util-to-parse5'
45
import {parse, parseFragment} from 'parse5'
5-
import {toParse5} from './index.js'
66

77
test('toParse5', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
9+
assert.deepEqual(Object.keys(await import('hast-util-to-parse5')).sort(), [
1010
'toParse5'
1111
])
1212
})

0 commit comments

Comments
 (0)