File tree 11 files changed +14
-13
lines changed
11 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 23
23
],
24
24
"sideEffects" : false ,
25
25
"type" : " module" ,
26
- "main" : " index.js" ,
27
- "types" : " index.d.ts" ,
26
+ "exports" : " ./index.js" ,
28
27
"files" : [
29
28
" lib/" ,
30
29
" index.d.ts" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
4
import { x } from 'xastscript'
5
- import { toXml } from '../index.js '
5
+ import { toXml } from 'xast-util-to-xml '
6
6
7
7
test ( '`element` attributes' , async function ( t ) {
8
8
await t . test ( 'should ignore missing attributes' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`cdata`' , async function ( t ) {
7
7
await t . test ( 'should not encode `cdata`s' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`comment`' , async function ( t ) {
7
7
await t . test ( 'should serialize `comment`s' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( 'toXml()' , async function ( t ) {
7
7
await t . test ( 'should expose the public api' , async function ( ) {
8
- assert . deepEqual ( Object . keys ( await import ( '../index.js' ) ) . sort ( ) , [ 'toXml' ] )
8
+ assert . deepEqual ( Object . keys ( await import ( 'xast-util-to-xml' ) ) . sort ( ) , [
9
+ 'toXml'
10
+ ] )
9
11
} )
10
12
11
13
await t . test ( 'should throw on non-nodes' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`doctype`' , async function ( t ) {
7
7
await t . test ( 'should serialize doctypes without `name`' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { x } from 'xastscript'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`element`' , async function ( t ) {
7
7
await t . test ( 'should serialize `element`s w/o children' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`instruction`' , async function ( t ) {
7
7
await t . test (
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`raw`' , async function ( t ) {
7
7
await t . test ( 'should encode `raw`s' , async function ( ) {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
4
import { x } from 'xastscript'
5
- import { toXml } from '../index.js '
5
+ import { toXml } from 'xast-util-to-xml '
6
6
7
7
test ( '`root`' , async function ( t ) {
8
8
await t . test ( 'should serialize `root`s' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
3
import { u } from 'unist-builder'
4
- import { toXml } from '../index.js '
4
+ import { toXml } from 'xast-util-to-xml '
5
5
6
6
test ( '`text`' , async function ( t ) {
7
7
await t . test ( 'should serialize `text`s' , async function ( ) {
You can’t perform that action at this time.
0 commit comments