Skip to content

Commit 91e3431

Browse files
committed
Change to use exports
1 parent 1d94b91 commit 91e3431

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

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

test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ import assert from 'node:assert/strict'
99
import test from 'node:test'
1010
import {Parser} from 'acorn'
1111
import jsx from 'acorn-jsx'
12-
import {walk} from 'estree-walker'
1312
import {generate} from 'astring'
14-
import {buildJsx} from './index.js'
13+
import {buildJsx} from 'estree-util-build-jsx'
14+
import {walk} from 'estree-walker'
1515

1616
const parser = Parser.extend(jsx())
1717

1818
test('estree-util-build-jsx', async function (t) {
1919
await t.test('should expose the public api', async function () {
20-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
21-
'buildJsx'
22-
])
20+
assert.deepEqual(
21+
Object.keys(await import('estree-util-build-jsx')).sort(),
22+
['buildJsx']
23+
)
2324
})
2425

2526
await t.test(

0 commit comments

Comments
 (0)