Skip to content

Commit ec5f593

Browse files
committed
Change to use export map
1 parent 65bb974 commit ec5f593

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

index.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {Heading, Paragraph, Root} from 'mdast'
22
import {expectError, expectType} from 'tsd'
33
import type {Node} from 'unist'
4-
import {filter} from './index.js'
4+
import {filter} from 'unist-util-filter'
55

66
const root: Root = {type: 'root', children: []}
77
/* eslint-disable @typescript-eslint/consistent-type-assertions */

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
],
2727
"sideEffects": false,
2828
"type": "module",
29-
"main": "index.js",
30-
"types": "index.d.ts",
29+
"exports": "./index.js",
3130
"files": [
3231
"lib/",
3332
"index.d.ts",

test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
import assert from 'node:assert/strict'
77
import test from 'node:test'
88
import {u} from 'unist-builder'
9-
import {filter} from './index.js'
9+
import {filter} from 'unist-util-filter'
1010

1111
test('filter', async function (t) {
1212
await t.test('should expose the public api', async function () {
13-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['filter'])
13+
assert.deepEqual(Object.keys(await import('unist-util-filter')).sort(), [
14+
'filter'
15+
])
1416
})
1517

1618
await t.test(

0 commit comments

Comments
 (0)