Skip to content

Commit 2a7cf87

Browse files
committed
Change to use export map
1 parent d765e40 commit 2a7cf87

17 files changed

+20
-24
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 'mdast-util-assert'
44

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

test/code.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 'mdast-util-assert'
44

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

test/core.js

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

44
test('assert', async function (t) {
55
await t.test('should expose the public api', async function () {
6-
nodeAssert.deepEqual(Object.keys(await import('../index.js')).sort(), [
7-
'_void',
8-
'assert',
9-
'literal',
10-
'parent',
11-
'wrap'
12-
])
6+
nodeAssert.deepEqual(
7+
Object.keys(await import('mdast-util-assert')).sort(),
8+
['_void', 'assert', 'literal', 'parent', 'wrap']
9+
)
1310
})
1411
})

test/definition.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 'mdast-util-assert'
44

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

test/footnote-definition.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 'mdast-util-assert'
44

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

test/footnote-reference.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 'mdast-util-assert'
44

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

test/heading.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 'mdast-util-assert'
44

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

test/image-reference.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 'mdast-util-assert'
44

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

test/image.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 'mdast-util-assert'
44

55
test('assert(image)', async function (t) {
66
await t.test('should throw without `url`', async function () {

test/link-reference.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 'mdast-util-assert'
44

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

test/link.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 'mdast-util-assert'
44

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

test/list-item.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 'mdast-util-assert'
44

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

test/list.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 'mdast-util-assert'
44

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

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 'mdast-util-assert'
44

55
test('node', async function (t) {
66
await t.test('should throw if not given a node (#1)', 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 'mdast-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/table.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 'mdast-util-assert'
44

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

0 commit comments

Comments
 (0)