Skip to content

Commit 216587e

Browse files
committed
Change to use exports
1 parent bde4280 commit 216587e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
],
2828
"sideEffects": false,
2929
"type": "module",
30-
"main": "index.js",
31-
"types": "index.d.ts",
30+
"exports": "./index.js",
3231
"files": [
3332
"lib/",
3433
"index.d.ts",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {retext} from 'retext'
4+
import retextKeywords from 'retext-keywords'
45
import retextPos from 'retext-pos'
5-
import retextKeywords from './index.js'
66

77
// Fixture: First three paragraphs on Term Extraction from Wikipedia:
88
// https://en.wikipedia.org/wiki/Terminology_extraction.
@@ -48,7 +48,7 @@ const fixture =
4848

4949
test('retext-keywords', async function (t) {
5050
await t.test('should expose the public api', async function () {
51-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
51+
assert.deepEqual(Object.keys(await import('retext-keywords')).sort(), [
5252
'default'
5353
])
5454
})

0 commit comments

Comments
 (0)