Skip to content

Commit 320b2ff

Browse files
committed
Change to use exports
1 parent a6b48ab commit 320b2ff

35 files changed

+37
-38
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/attribute.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} from 'hastscript'
4+
import {toHtml} from 'hast-util-to-html'
45
import {u} from 'unist-builder'
5-
import {toHtml} from '../index.js'
66

77
test('`element` attributes', async (t) => {
88
await t.test('should support unknown properties', async function (t) {

test/comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3+
import {toHtml} from 'hast-util-to-html'
34
import {u} from 'unist-builder'
4-
import {toHtml} from '../index.js'
55

66
test('`comment`', async function (t) {
77
await t.test('should serialize `comment`s', async function () {

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 {toHtml} from 'hast-util-to-html'
45
import {u} from 'unist-builder'
5-
import {toHtml} from '../index.js'
66

77
test('toHtml()', 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-to-html')).sort(), [
1010
'toHtml'
1111
])
1212
})

test/doctype.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
3+
import {toHtml} from 'hast-util-to-html'
34
import {u} from 'unist-builder'
4-
import {toHtml} from '../index.js'
55

66
test('`doctype`', async function (t) {
77
await t.test('should serialize doctypes', async function () {

test/element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4-
import {toHtml} from '../index.js'
4+
import {toHtml} from 'hast-util-to-html'
55

66
test('`element`', async function (t) {
77
await t.test('should serialize `element`s', async function () {

test/omission-closing-body.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} from 'hastscript'
4+
import {toHtml} from 'hast-util-to-html'
45
import {u} from 'unist-builder'
5-
import {toHtml} from '../index.js'
66

77
test('`body` (closing)', async function (t) {
88
await t.test('should omit tag without following', async function () {

test/omission-closing-caption.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} from 'hastscript'
4+
import {toHtml} from 'hast-util-to-html'
45
import {u} from 'unist-builder'
5-
import {toHtml} from '../index.js'
66

77
test('`caption` (closing)', async function (t) {
88
await t.test('should not omit tag without children', async function () {

test/omission-closing-colgroup.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} from 'hastscript'
4+
import {toHtml} from 'hast-util-to-html'
45
import {u} from 'unist-builder'
5-
import {toHtml} from '../index.js'
66

77
test('`colgroup` (closing)', async function (t) {
88
await t.test('should not omit tag without children', async function () {

test/omission-closing-dd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4-
import {toHtml} from '../index.js'
4+
import {toHtml} from 'hast-util-to-html'
55

66
test('`dd` (closing)', async function (t) {
77
await t.test('should omit tag without parent', async function () {

0 commit comments

Comments
 (0)