Skip to content

Commit 9c7c2ca

Browse files
committed
Change to use exports
1 parent 24769b8 commit 9c7c2ca

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
],
2828
"sideEffects": false,
2929
"type": "module",
30-
"main": "index.js",
31-
"types": "index.d.ts",
30+
"exports": "./index.js",
3231
"files": [
3332
"lib/",
3433
"index.d.ts",

test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
import assert from 'node:assert/strict'
66
import test from 'node:test'
77
import {h, s} from 'hastscript'
8+
import {toXast} from 'hast-util-to-xast'
89
import {u} from 'unist-builder'
910
import {webNamespaces} from 'web-namespaces'
1011
import {x} from 'xastscript'
11-
import {toXast} from './index.js'
1212

1313
test('main', async function (t) {
1414
await t.test('should expose the public api', async function () {
15-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['toXast'])
15+
assert.deepEqual(Object.keys(await import('hast-util-to-xast')).sort(), [
16+
'toXast'
17+
])
1618
})
1719

1820
await t.test('should throw without node', async function () {

0 commit comments

Comments
 (0)