Skip to content

Commit 203f21d

Browse files
committed
Change to use exports
1 parent 0cec08b commit 203f21d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
],
3232
"sideEffects": false,
3333
"type": "module",
34-
"main": "index.js",
35-
"types": "index.d.ts",
34+
"exports": "./index.js",
3635
"files": [
3736
"lib/",
3837
"index.d.ts",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import {fromJs} from 'esast-util-from-js'
1515
import {jsx, toJs} from 'estree-util-to-js'
1616
import {walk} from 'estree-walker'
1717
import {h, s} from 'hastscript'
18+
import {toEstree} from 'hast-util-to-estree'
1819
import {fromMarkdown} from 'mdast-util-from-markdown'
1920
import {mdxFromMarkdown} from 'mdast-util-mdx'
2021
import {toHast} from 'mdast-util-to-hast'
2122
import {mdxjs} from 'micromark-extension-mdxjs'
2223
import {visit} from 'unist-util-visit'
23-
import {toEstree} from './index.js'
2424

2525
/** @type {['mdxFlowExpression', 'mdxJsxFlowElement', 'mdxJsxTextElement', 'mdxTextExpression', 'mdxjsEsm']} */
2626
const passThrough = [
@@ -33,7 +33,7 @@ const passThrough = [
3333

3434
test('toEstree', async function (t) {
3535
await t.test('should expose the public api', async function () {
36-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
36+
assert.deepEqual(Object.keys(await import('hast-util-to-estree')).sort(), [
3737
'defaultHandlers',
3838
'toEstree'
3939
])

0 commit comments

Comments
 (0)