Skip to content

Commit 80482a5

Browse files
committed
Change to use exports
1 parent ad9b1b2 commit 80482a5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
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",

test/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @typedef {import('hast').Element} Element
33
* @typedef {import('mdast').Paragraph} Paragraph
44
* @typedef {import('mdast').Root} Root
5+
* @typedef {import('remark-html').Options} Options
56
* @typedef {import('unified').Pluggable} Pluggable
6-
* @typedef {import('../index.js').Options} Options
77
*/
88

99
import assert from 'node:assert/strict'
@@ -16,16 +16,16 @@ import {toHtml} from 'hast-util-to-html'
1616
import remarkFrontmatter from 'remark-frontmatter'
1717
import remarkGfm from 'remark-gfm'
1818
import remarkGithub from 'remark-github'
19+
import remarkHtml from 'remark-html'
1920
import remarkParse from 'remark-parse'
2021
import remarkSlug from 'remark-slug'
2122
import remarkToc from 'remark-toc'
2223
import {unified} from 'unified'
2324
import {VFile} from 'vfile'
24-
import remarkHtml from '../index.js'
2525

2626
test('remarkHtml', async function (t) {
2727
await t.test('should expose the public api', async function () {
28-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
28+
assert.deepEqual(Object.keys(await import('remark-html')).sort(), [
2929
'default'
3030
])
3131
})

0 commit comments

Comments
 (0)