Skip to content

Commit 1581905

Browse files
committed
Change to use exports
1 parent 77867bb commit 1581905

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
],
3030
"sideEffects": false,
3131
"type": "module",
32-
"main": "index.js",
33-
"types": "index.d.ts",
32+
"exports": "./index.js",
3433
"files": [
3534
"lib/",
3635
"index.d.ts",

test.js

Lines changed: 5 additions & 4 deletions
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 {shiftHeading} from './index.js'
4+
import {shiftHeading} from 'hast-util-shift-heading'
55

66
test('shiftHeading', 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-
'shiftHeading'
10-
])
8+
assert.deepEqual(
9+
Object.keys(await import('hast-util-shift-heading')).sort(),
10+
['shiftHeading']
11+
)
1112
})
1213

1314
await t.test('should throw when not given a number', async function () {

0 commit comments

Comments
 (0)