Skip to content

Commit 4af23eb

Browse files
committed
Change to use exports
1 parent 34d7783 commit 4af23eb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
"Keith McKnight <keith@mcknig.ht> (https://keith.mcknig.ht)",
2525
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
2626
],
27-
"main": "index.js",
2827
"sideEffects": false,
2928
"type": "module",
30-
"types": "index.d.ts",
29+
"exports": "./index.js",
3130
"files": [
3231
"lib/",
3332
"index.d.ts",

test/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import assert from 'node:assert/strict'
88
import fs from 'node:fs/promises'
99
import process from 'node:process'
1010
import test from 'node:test'
11+
import {fromDom} from 'hast-util-from-dom'
1112
import {JSDOM} from 'jsdom'
12-
import {fromDom} from '../index.js'
1313

1414
const window = new JSDOM().window
1515
globalThis.document = window.document
1616

1717
test('fromDom', async function (t) {
1818
await t.test('should expose the public api', async function () {
19-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
19+
assert.deepEqual(Object.keys(await import('hast-util-from-dom')).sort(), [
2020
'fromDom'
2121
])
2222
})

0 commit comments

Comments
 (0)