Skip to content

Commit 4edde89

Browse files
committed
Change to use exports
1 parent c1743e6 commit 4edde89

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
],
2727
"sideEffects": false,
2828
"type": "module",
29-
"main": "index.js",
30-
"types": "index.d.ts",
29+
"exports": "./index.js",
3130
"files": [
3231
"lib/",
3332
"index.d.ts",

test.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
/**
2-
* @typedef {import('hast').Root} Root
32
* @typedef {import('./test-types.js')} DoNotTouchAsThisImportIncludesCustomNodesInTree
43
*/
54

65
import assert from 'node:assert/strict'
76
import test from 'node:test'
87
import {h, s} from 'hastscript'
8+
import {raw} from 'hast-util-raw'
99
import {toHtml} from 'hast-util-to-html'
1010
import {fromMarkdown} from 'mdast-util-from-markdown'
1111
import {toHast} from 'mdast-util-to-hast'
1212
import {u} from 'unist-builder'
1313
import {VFile} from 'vfile'
14-
import {raw} from './index.js'
1514

1615
test('raw', async function (t) {
1716
await t.test('should expose the public api', async function () {
18-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['raw'])
17+
assert.deepEqual(Object.keys(await import('hast-util-raw')).sort(), ['raw'])
1918
})
2019

2120
await t.test('should throw for unknown nodes', async function () {

0 commit comments

Comments
 (0)