From 733932dd918cc3783870247a16ee5cc2aa2a93a8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Sep 2023 13:28:24 +0200 Subject: [PATCH] Change to use `exports` --- package.json | 3 +-- test/index.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d50eaa8..6438286 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/index.js b/test/index.js index 6582d8e..788d6a2 100644 --- a/test/index.js +++ b/test/index.js @@ -8,11 +8,11 @@ import process from 'node:process' import test from 'node:test' import {isHidden} from 'is-hidden' import {remark} from 'remark' -import remarkDirective from '../index.js' +import remarkDirective from 'remark-directive' test('remarkDirective', 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-directive')).sort(), [ 'default' ]) })