Skip to content

Commit 055ea67

Browse files
committed
Change to use exports
1 parent 0a4f3c6 commit 055ea67

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
@@ -1,12 +1,14 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4+
import {toText} from 'hast-util-to-text'
45
import {u} from 'unist-builder'
5-
import {toText} from './index.js'
66

77
test('toText', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['toText'])
9+
assert.deepEqual(Object.keys(await import('hast-util-to-text')).sort(), [
10+
'toText'
11+
])
1012
})
1113

1214
await t.test('should default to `whitespace: normal`', async function () {

0 commit comments

Comments
 (0)