Skip to content

Commit 21a6567

Browse files
committed
Change to use exports
1 parent 87b618b commit 21a6567

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

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

test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {hasProperty} from './index.js'
3+
import {hasProperty} from 'hast-util-has-property'
44

55
test('hasProperty', async function (t) {
66
await t.test('should expose the public api', async function () {
7-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
8-
'hasProperty'
9-
])
7+
assert.deepEqual(
8+
Object.keys(await import('hast-util-has-property')).sort(),
9+
['hasProperty']
10+
)
1011
})
1112

1213
await t.test('should return `false` without `element`', async function () {

0 commit comments

Comments
 (0)