Skip to content

Commit 2ab49db

Browse files
committed
Change to use exports
1 parent d33a55e commit 2ab49db

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
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",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4+
import {excerpt} from 'hast-util-excerpt'
45
import {selectAll} from 'hast-util-select'
56
import {fromMarkdown} from 'mdast-util-from-markdown'
67
import {mdxFromMarkdown} from 'mdast-util-mdx'
78
import {toHast} from 'mdast-util-to-hast'
89
import {mdxjs} from 'micromark-extension-mdxjs'
910
import {u} from 'unist-builder'
1011
import {removePosition} from 'unist-util-remove-position'
11-
import {excerpt} from './index.js'
1212

1313
test('excerpt', async function (t) {
1414
await t.test('should expose the public api', async function () {
15-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
15+
assert.deepEqual(Object.keys(await import('hast-util-excerpt')).sort(), [
1616
'excerpt'
1717
])
1818
})

0 commit comments

Comments
 (0)