diff --git a/package.json b/package.json index 0a208c5..05ecfe7 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,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 269e1fa..3beb62f 100644 --- a/test/index.js +++ b/test/index.js @@ -1,5 +1,5 @@ /** - * @typedef {import('../index.js').Options} Options + * @typedef {import('remark-toc').Options} Options */ import assert from 'node:assert/strict' @@ -8,11 +8,11 @@ import process from 'node:process' import test from 'node:test' import {isHidden} from 'is-hidden' import {remark} from 'remark' -import remarkToc from '../index.js' +import remarkToc from 'remark-toc' test('remarkToc', 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-toc')).sort(), [ 'default' ]) })