Skip to content

Commit

Permalink
Change to use export map
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 30, 2023
1 parent 24ea478 commit 15b015e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expectType} from 'tsd'
import type {Root} from 'mdast'
import {removePosition} from './index.js'
import {removePosition} from 'unist-util-remove-position'

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

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
9 changes: 5 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import assert from 'node:assert/strict'
import test from 'node:test'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {u} from 'unist-builder'
import {removePosition} from './index.js'
import {removePosition} from 'unist-util-remove-position'

test('removePosition', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
'removePosition'
])
assert.deepEqual(
Object.keys(await import('unist-util-remove-position')).sort(),
['removePosition']
)
})

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

0 comments on commit 15b015e

Please sign in to comment.