Skip to content

Commit 750a728

Browse files
committed
Change to use exports
1 parent 5e8a3a0 commit 750a728

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

+1-2
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

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4-
import {headingRank} from './index.js'
4+
import {headingRank} from 'hast-util-heading-rank'
55

66
test('headingRank', async function (t) {
77
await t.test('should expose the public api', async function () {
8-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
9-
'headingRank'
10-
])
8+
assert.deepEqual(
9+
Object.keys(await import('hast-util-heading-rank')).sort(),
10+
['headingRank']
11+
)
1112
})
1213

1314
await t.test('should return `undefined` for non-elements', async function () {

0 commit comments

Comments
 (0)