Skip to content

Commit 975f624

Browse files
committed
Change to use export map
1 parent 98962b9 commit 975f624

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.json

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
/**
22
* @typedef {import('mdast').InlineCode} InlineCode
33
* @typedef {import('mdast').Root} Root
4-
* @typedef {import('./index.js').Test} Test
5-
* @typedef {import('./index.js').Options} Options
4+
* @typedef {import('mdast-util-heading-range').Test} Test
5+
* @typedef {import('mdast-util-heading-range').Options} Options
66
*/
77

88
import assert from 'node:assert/strict'
99
import test from 'node:test'
1010
import {fromMarkdown} from 'mdast-util-from-markdown'
1111
import {toMarkdown} from 'mdast-util-to-markdown'
12-
import {headingRange} from './index.js'
12+
import {headingRange} from 'mdast-util-heading-range'
1313

1414
test('headingRange', async function (t) {
1515
await t.test('should expose the public api', async function () {
16-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
17-
'headingRange'
18-
])
16+
assert.deepEqual(
17+
Object.keys(await import('mdast-util-heading-range')).sort(),
18+
['headingRange']
19+
)
1920
})
2021

2122
await t.test('should be a function', async function () {

0 commit comments

Comments
 (0)