Skip to content

Commit 211e053

Browse files
committed
Change to use exports
1 parent 967de9b commit 211e053

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

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

test/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('../index.js').Options} Options
2+
* @typedef {import('hast-util-to-mdast').Options} Options
33
*/
44

55
/**
@@ -17,6 +17,7 @@ import process from 'node:process'
1717
import test from 'node:test'
1818
import {h} from 'hastscript'
1919
import {fromHtml} from 'hast-util-from-html'
20+
import {toMdast} from 'hast-util-to-mdast'
2021
import {isHidden} from 'is-hidden'
2122
import {assert as mdastAssert} from 'mdast-util-assert'
2223
import {fromMarkdown} from 'mdast-util-from-markdown'
@@ -25,11 +26,10 @@ import {toMarkdown} from 'mdast-util-to-markdown'
2526
import {gfm} from 'micromark-extension-gfm'
2627
import {u} from 'unist-builder'
2728
import {removePosition} from 'unist-util-remove-position'
28-
import {toMdast} from '../index.js'
2929

3030
test('core', async function (t) {
3131
await t.test('should expose the public api', async function () {
32-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
32+
assert.deepEqual(Object.keys(await import('hast-util-to-mdast')).sort(), [
3333
'defaultHandlers',
3434
'defaultNodeHandlers',
3535
'toMdast'

0 commit comments

Comments
 (0)