Skip to content

Commit 1a7cb9f

Browse files
committed
Change to use exports
1 parent db5ea46 commit 1a7cb9f

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

lib/id.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @typedef {import('css-selector-parser').AstRule} AstRule
33
*
4-
* @typedef {import('./index.js').Element} Element
4+
* @typedef {import('hast').Element} Element
55
*/
66

77
import {ok as assert} from 'devlop'

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
],
3131
"sideEffects": false,
3232
"type": "module",
33-
"main": "index.js",
34-
"types": "index.d.ts",
33+
"exports": "./index.js",
3534
"files": [
3635
"lib/",
3736
"index.d.ts",

test/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4+
import {selectAll} from 'hast-util-select'
45
import {u} from 'unist-builder'
5-
import {selectAll} from '../index.js'
66

77
test('hast-util-select', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
9+
assert.deepEqual(Object.keys(await import('hast-util-select')).sort(), [
1010
'matches',
1111
'select',
1212
'selectAll'

test/matches.js

Lines changed: 1 addition & 1 deletion
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 {h, s} from 'hastscript'
4+
import {matches} from 'hast-util-select'
45
import {u} from 'unist-builder'
5-
import {matches} from '../index.js'
66

77
test('select.matches()', async function (t) {
88
await t.test('invalid selector', async function (t) {

test/select-all.js

Lines changed: 1 addition & 1 deletion
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 {h, s} from 'hastscript'
4+
import {selectAll} from 'hast-util-select'
45
import {u} from 'unist-builder'
5-
import {selectAll} from '../index.js'
66

77
test('select.selectAll()', async function (t) {
88
await t.test('invalid selectors', async function (t) {

test/select.js

Lines changed: 1 addition & 1 deletion
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 {h, s} from 'hastscript'
4+
import {select} from 'hast-util-select'
45
import {u} from 'unist-builder'
5-
import {select} from '../index.js'
66

77
test('select.select()', async function (t) {
88
await t.test('invalid selectors', async function (t) {

test/svg.js

Lines changed: 1 addition & 1 deletion
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 {h, s} from 'hastscript'
4+
import {select, selectAll} from 'hast-util-select'
45
import {u} from 'unist-builder'
5-
import {select, selectAll} from '../index.js'
66

77
test('svg', async function (t) {
88
await t.test('should match svg (#1)', async function () {

0 commit comments

Comments
 (0)