File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 27
27
],
28
28
"sideEffects" : false ,
29
29
"type" : " module" ,
30
- "main" : " index.js" ,
31
- "types" : " index.d.ts" ,
30
+ "exports" : " ./index.js" ,
32
31
"files" : [
33
32
" lib/" ,
34
33
" index.d.ts" ,
Original file line number Diff line number Diff line change 2
2
* @typedef {import('mdast').BlockContent } BlockContent
3
3
* @typedef {import('mdast').List } List
4
4
* @typedef {import('mdast').Root } Root
5
- * @typedef {import('../index.js ').Options } Options
5
+ * @typedef {import('mdast-util-toc ').Options } Options
6
6
*/
7
7
8
8
/**
@@ -17,13 +17,15 @@ import fs from 'node:fs/promises'
17
17
import test from 'node:test'
18
18
import { fromMarkdown } from 'mdast-util-from-markdown'
19
19
import { gfmFromMarkdown } from 'mdast-util-gfm'
20
+ import { toc } from 'mdast-util-toc'
20
21
import { gfm } from 'micromark-extension-gfm'
21
22
import { visit } from 'unist-util-visit'
22
- import { toc } from '../index.js'
23
23
24
24
test ( 'toc' , async function ( t ) {
25
25
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
+ ] )
27
29
} )
28
30
29
31
await t . test ( 'should fail without node' , async function ( ) {
You can’t perform that action at this time.
0 commit comments