Skip to content

Commit edfef2d

Browse files
committed
Change to use exports
1 parent b830f22 commit edfef2d

File tree

10 files changed

+10
-11
lines changed

10 files changed

+10
-11
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
],
2626
"sideEffects": false,
2727
"type": "module",
28-
"main": "index.js",
29-
"types": "index.d.ts",
28+
"exports": "./index.js",
3029
"files": [
3130
"lib/",
3231
"index.d.ts",

test/children.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('children', async function (t) {
66
await t.test(

test/comment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('assert(comment)', async function (t) {
66
await t.test(

test/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import test from 'node:test'
33

44
test('api', async function (t) {
55
await t.test('should expose the public api', async function () {
6-
nodeAssert.deepEqual(Object.keys(await import('../index.js')).sort(), [
6+
nodeAssert.deepEqual(Object.keys(await import('hast-util-assert')).sort(), [
77
'_void',
88
'assert',
99
'literal',

test/doctype.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('assert(doctype)', async function (t) {
66
await t.test('should allow doctypes', async function () {

test/element.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('assert(element)', async function (t) {
66
await t.test(

test/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('node', async function (t) {
66
await t.test('should throw if not given a node (#1)', async function () {

test/parent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {parent} from '../index.js'
3+
import {parent} from 'hast-util-assert'
44

55
test('parent', async function (t) {
66
await t.test('should throw if not given a node', async function () {

test/root.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('assert(root)', async function (t) {
66
await t.test('should throw if a `root` is not a parent', async function () {

test/text.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nodeAssert from 'node:assert/strict'
22
import test from 'node:test'
3-
import {assert} from '../index.js'
3+
import {assert} from 'hast-util-assert'
44

55
test('assert(text)', async function (t) {
66
await t.test(

0 commit comments

Comments
 (0)