Skip to content

Commit 9e02a5b

Browse files
committed
Change to use export map
1 parent fba716f commit 9e02a5b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

+1-2
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.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
import assert from 'node:assert/strict'
66
import test from 'node:test'
7+
import {definitions} from 'mdast-util-definitions'
78
import {fromMarkdown} from 'mdast-util-from-markdown'
8-
import {definitions} from './index.js'
99

1010
test('definitions', async function (t) {
1111
await t.test('should expose the public api', async function () {
12-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
13-
'definitions'
14-
])
12+
assert.deepEqual(
13+
Object.keys(await import('mdast-util-definitions')).sort(),
14+
['definitions']
15+
)
1516
})
1617

1718
await t.test('should fail without node', async function () {

0 commit comments

Comments
 (0)