From cd34249eaea4800e6a76d1bfb435c569064c18d7 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 26 Aug 2023 12:02:50 +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 817b2fb..7886e09 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,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 081f6d4..fd0eedc 100644 --- a/test.js +++ b/test.js @@ -9,11 +9,11 @@ import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import {unified} from 'unified' import {visit} from 'unist-util-visit' -import rehypeRaw from './index.js' +import rehypeRaw from 'rehype-raw' test('rehypeRaw', 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-raw')).sort(), [ 'default' ]) })