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 18, 2023
1 parent 2eb2310 commit 813df9f
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 @@ -28,8 +28,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
@@ -1,6 +1,6 @@
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('../index.js').Options} Options
* @typedef {import('remark-frontmatter').Options} Options
*/

import assert from 'node:assert/strict'
Expand All @@ -9,11 +9,11 @@ import process from 'node:process'
import test from 'node:test'
import {isHidden} from 'is-hidden'
import {remark} from 'remark'
import remarkFrontmatter from '../index.js'
import remarkFrontmatter from 'remark-frontmatter'

test('remarkFrontmatter', 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-frontmatter')).sort(), [
'default'
])
})
Expand Down

0 comments on commit 813df9f

Please # to comment.