Skip to content

Commit 15b015e

Browse files
committed
Change to use export map
1 parent 24ea478 commit 15b015e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {expectType} from 'tsd'
22
import type {Root} from 'mdast'
3-
import {removePosition} from './index.js'
3+
import {removePosition} from 'unist-util-remove-position'
44

55
const tree: Root = {type: 'root', children: []}
66

package.json

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

test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {fromMarkdown} from 'mdast-util-from-markdown'
44
import {u} from 'unist-builder'
5-
import {removePosition} from './index.js'
5+
import {removePosition} from 'unist-util-remove-position'
66

77
test('removePosition', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
10-
'removePosition'
11-
])
9+
assert.deepEqual(
10+
Object.keys(await import('unist-util-remove-position')).sort(),
11+
['removePosition']
12+
)
1213
})
1314

1415
await t.test('should work softly', async function () {

0 commit comments

Comments
 (0)