Skip to content

Commit ffb64b2

Browse files
committed
Change to use exports
1 parent 6fbf704 commit ffb64b2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
],
3232
"sideEffects": false,
3333
"type": "module",
34-
"main": "index.js",
35-
"types": "index.d.ts",
34+
"exports": "./index.js",
3635
"files": [
3736
"lib/",
3837
"index.d.ts",

test/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('../index.js').Options} Options
2+
* @typedef {import('remark-toc').Options} Options
33
*/
44

55
import assert from 'node:assert/strict'
@@ -8,11 +8,11 @@ import process from 'node:process'
88
import test from 'node:test'
99
import {isHidden} from 'is-hidden'
1010
import {remark} from 'remark'
11-
import remarkToc from '../index.js'
11+
import remarkToc from 'remark-toc'
1212

1313
test('remarkToc', async function (t) {
1414
await t.test('should expose the public api', async function () {
15-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
15+
assert.deepEqual(Object.keys(await import('remark-toc')).sort(), [
1616
'default'
1717
])
1818
})

0 commit comments

Comments
 (0)