File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 31
31
],
32
32
"sideEffects" : false ,
33
33
"type" : " module" ,
34
- "main" : " index.js" ,
35
- "types" : " index.d.ts" ,
34
+ "exports" : " ./index.js" ,
36
35
"files" : [
37
36
" lib/" ,
38
37
" index.d.ts" ,
Original file line number Diff line number Diff line change @@ -97,10 +97,10 @@ Say our document `example.md` contains:
97
97
98
98
``` js
99
99
import fs from ' node:fs/promises'
100
- import {fromMarkdown } from ' mdast-util-from-markdown'
101
- import {toMarkdown } from ' mdast-util-to-markdown'
102
100
import {gfmStrikethrough } from ' micromark-extension-gfm-strikethrough'
101
+ import {fromMarkdown } from ' mdast-util-from-markdown'
103
102
import {gfmStrikethroughFromMarkdown , gfmStrikethroughToMarkdown } from ' mdast-util-gfm-strikethrough'
103
+ import {toMarkdown } from ' mdast-util-to-markdown'
104
104
105
105
const doc = await fs .readFile (' example.md' )
106
106
Original file line number Diff line number Diff line change @@ -2,19 +2,19 @@ import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { gfmStrikethrough } from 'micromark-extension-gfm-strikethrough'
4
4
import { fromMarkdown } from 'mdast-util-from-markdown'
5
- import { toMarkdown } from 'mdast-util-to-markdown'
6
- import { removePosition } from 'unist-util-remove-position'
7
5
import {
8
6
gfmStrikethroughFromMarkdown ,
9
7
gfmStrikethroughToMarkdown
10
- } from './index.js'
8
+ } from 'mdast-util-gfm-strikethrough'
9
+ import { toMarkdown } from 'mdast-util-to-markdown'
10
+ import { removePosition } from 'unist-util-remove-position'
11
11
12
12
test ( 'core' , async function ( t ) {
13
13
await t . test ( 'should expose the public api' , async function ( ) {
14
- assert . deepEqual ( Object . keys ( await import ( './index.js' ) ) . sort ( ) , [
15
- 'gfmStrikethroughFromMarkdown' ,
16
- ' gfmStrikethroughToMarkdown'
17
- ] )
14
+ assert . deepEqual (
15
+ Object . keys ( await import ( 'mdast-util-gfm-strikethrough' ) ) . sort ( ) ,
16
+ [ 'gfmStrikethroughFromMarkdown' , ' gfmStrikethroughToMarkdown']
17
+ )
18
18
} )
19
19
} )
20
20
You can’t perform that action at this time.
0 commit comments