Change to use exports

This commit is contained in:
Titus Wormer 2023-09-18 13:28:24 +02:00
parent 20c4a6b5e1
commit 733932dd91
No known key found for this signature in database
GPG key ID: E6E581152ED04E2E
2 changed files with 3 additions and 4 deletions

View file

@ -26,8 +26,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",

View file

@ -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'
])
})