Skip to content

Commit

Permalink
Change to use exports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 24, 2023
1 parent ad9b1b2 commit 80482a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @typedef {import('hast').Element} Element
* @typedef {import('mdast').Paragraph} Paragraph
* @typedef {import('mdast').Root} Root
* @typedef {import('remark-html').Options} Options
* @typedef {import('unified').Pluggable} Pluggable
* @typedef {import('../index.js').Options} Options
*/

import assert from 'node:assert/strict'
Expand All @@ -16,16 +16,16 @@ import {toHtml} from 'hast-util-to-html'
import remarkFrontmatter from 'remark-frontmatter'
import remarkGfm from 'remark-gfm'
import remarkGithub from 'remark-github'
import remarkHtml from 'remark-html'
import remarkParse from 'remark-parse'
import remarkSlug from 'remark-slug'
import remarkToc from 'remark-toc'
import {unified} from 'unified'
import {VFile} from 'vfile'
import remarkHtml from '../index.js'

test('remarkHtml', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
assert.deepEqual(Object.keys(await import('remark-html')).sort(), [
'default'
])
})
Expand Down

0 comments on commit 80482a5

Please sign in to comment.