From cafeacc1b4141c8f15906eb55806b175ab992c6c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 19 Sep 2023 18:38:25 +0200 Subject: [PATCH] Change to use `exports` --- package.json | 3 +-- test.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 90eddb7..9c93fa8 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.js b/test.js index a467b7a..01af045 100644 --- a/test.js +++ b/test.js @@ -2,13 +2,13 @@ import assert from 'node:assert/strict' import test from 'node:test' import rehypeStringify from 'rehype-stringify' import remarkParse from 'remark-parse' +import remarkRehype from 'remark-rehype' import remarkStringify from 'remark-stringify' import {unified} from 'unified' -import remarkRehype from './index.js' test('remarkRehype', 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-rehype')).sort(), [ 'default', 'defaultFootnoteBackContent', 'defaultFootnoteBackLabel',