Skip to content

Commit a5ac22a

Browse files
committed
Change to use export map
1 parent 07c45fa commit a5ac22a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
],
3131
"sideEffects": false,
3232
"type": "module",
33-
"main": "index.js",
34-
"types": "index.d.ts",
33+
"exports": "./index.js",
3534
"files": [
3635
"lib/",
3736
"index.d.ts",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ In browsers with [`esm.sh`][esmsh]:
6666
## Use
6767

6868
```js
69-
import {u} from 'unist-builder'
7069
import {normalizeHeadings} from 'mdast-normalize-headings'
70+
import {u} from 'unist-builder'
7171

7272
const tree = u('root', [
7373
u('heading', {depth: 1}, [u('text', 'title')]),

test/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
import assert from 'node:assert/strict'
66
import fs from 'node:fs/promises'
77
import test from 'node:test'
8+
import {normalizeHeadings} from 'mdast-normalize-headings'
89
import {fromMarkdown} from 'mdast-util-from-markdown'
910
import {removePosition} from 'unist-util-remove-position'
10-
import {normalizeHeadings} from '../index.js'
1111

1212
test('normalizeHeadings', async function (t) {
1313
await t.test('should expose the public api', async function () {
14-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
15-
'normalizeHeadings'
16-
])
14+
assert.deepEqual(
15+
Object.keys(await import('mdast-normalize-headings')).sort(),
16+
['normalizeHeadings']
17+
)
1718
})
1819

1920
/** @type {Record<string, string>} */

0 commit comments

Comments
 (0)