From 18d23a1b1bf410dc09915edd475edd4b04b9898c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 31 Aug 2023 15:45: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 c61fad9..1b08ce4 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,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 337fd32..0d231e8 100644 --- a/test.js +++ b/test.js @@ -6,13 +6,13 @@ import assert from 'node:assert/strict' import test from 'node:test' import rehypeParse from 'rehype-parse' import rehypeStringify from 'rehype-stringify' +import rehypeRemark from 'rehype-remark' import remarkStringify from 'remark-stringify' import {unified} from 'unified' -import rehypeRemark from './index.js' test('rehypeRemark', 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('rehype-remark')).sort(), [ 'default' ]) })