diff --git a/package.json b/package.json index 965e09d..82c66bd 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "lib/", "index.d.ts", diff --git a/test/index.js b/test/index.js index 0c2f482..4f763ad 100644 --- a/test/index.js +++ b/test/index.js @@ -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' @@ -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' ]) })