From 27f1cdce51ee7b9994e7c2dc9baf1ad00b0a8833 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 22 Sep 2023 18:44:36 +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 07f982b..19684a5 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 2a31f0d..6795c41 100644 --- a/test.js +++ b/test.js @@ -1,14 +1,14 @@ import assert from 'node:assert/strict' import test from 'node:test' import rehypeStringify from 'rehype-stringify' +import remarkBreaks from 'remark-breaks' import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import {unified} from 'unified' -import remarkBreaks from './index.js' test('remarkBreaks', 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-breaks')).sort(), [ 'default' ]) })