Skip to content

Commit dfdf244

Browse files
committed
Change to use export map
1 parent b795329 commit dfdf244

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
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 {expectAssignable, expectType} from 'tsd'
22
import type {HTML, List, ListItem, Text} from 'mdast'
3-
import {u} from './index.js'
3+
import {u} from 'unist-builder'
44

55
expectType<{type: 'example'}>(u('example'))
66
expectType<{type: 'example'} & {property: true}>(u('example', {property: true}))

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {u} from './index.js'
3+
import {u} from 'unist-builder'
44

55
test('u', async function (t) {
66
await t.test('should expose the public api', async function () {
7-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['u'])
7+
assert.deepEqual(Object.keys(await import('unist-builder')).sort(), ['u'])
88
})
99

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

0 commit comments

Comments
 (0)