Skip to content

Commit b12a1b9

Browse files
committed
Change to use export map
1 parent 7a4a5e1 commit b12a1b9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3+
import {squeezeParagraphs} from 'mdast-squeeze-paragraphs'
34
import {u} from 'unist-builder'
4-
import {squeezeParagraphs} from './index.js'
55

66
test('squeezeParagraphs', async function (t) {
7+
await t.test('should expose the public api', async function () {
8+
assert.deepEqual(
9+
Object.keys(await import('mdast-squeeze-paragraphs')).sort(),
10+
['squeezeParagraphs']
11+
)
12+
})
13+
714
await t.test('should work on a tree', async function () {
815
const tree = u('root', [
916
u('paragraph', []),

0 commit comments

Comments
 (0)