Skip to content

Commit a227695

Browse files
committed
Change to use exports
1 parent bfce642 commit a227695

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/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@
1515
import assert from 'node:assert/strict'
1616
import fs from 'node:fs/promises'
1717
import test from 'node:test'
18+
import {fromParse5} from 'hast-util-from-parse5'
1819
import {isHidden} from 'is-hidden'
1920
import {parse, parseFragment} from 'parse5'
2021
import {read, toVFile} from 'to-vfile'
2122
import {visit} from 'unist-util-visit'
22-
import {fromParse5} from '../index.js'
2323

2424
test('fromParse5', async function (t) {
2525
const file = toVFile({value: '<title>Hello!</title><h1>World!'})
2626

2727
await t.test('should expose the public api', async function () {
28-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
29-
'fromParse5'
30-
])
28+
assert.deepEqual(
29+
Object.keys(await import('hast-util-from-parse5')).sort(),
30+
['fromParse5']
31+
)
3132
})
3233

3334
await t.test('should transform a complete document', async function () {

0 commit comments

Comments
 (0)