Skip to content

Commit 09b1c2e

Browse files
committed
Change to use export map
1 parent 801ecd3 commit 09b1c2e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
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/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @typedef {import('mdast').BlockContent} BlockContent
33
* @typedef {import('mdast').List} List
44
* @typedef {import('mdast').Root} Root
5-
* @typedef {import('../index.js').Options} Options
5+
* @typedef {import('mdast-util-toc').Options} Options
66
*/
77

88
/**
@@ -17,13 +17,15 @@ import fs from 'node:fs/promises'
1717
import test from 'node:test'
1818
import {fromMarkdown} from 'mdast-util-from-markdown'
1919
import {gfmFromMarkdown} from 'mdast-util-gfm'
20+
import {toc} from 'mdast-util-toc'
2021
import {gfm} from 'micromark-extension-gfm'
2122
import {visit} from 'unist-util-visit'
22-
import {toc} from '../index.js'
2323

2424
test('toc', async function (t) {
2525
await t.test('should expose the public api', async function () {
26-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), ['toc'])
26+
assert.deepEqual(Object.keys(await import('mdast-util-toc')).sort(), [
27+
'toc'
28+
])
2729
})
2830

2931
await t.test('should fail without node', async function () {

0 commit comments

Comments
 (0)