File tree 15 files changed +18
-19
lines changed
15 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 1
1
import { expectNotType , expectType } from 'tsd'
2
2
import type { Node , Parent } from 'unist'
3
- import { assert , parent } from './index.js '
3
+ import { assert , parent } from 'unist-util-assert '
4
4
5
5
const emptyNode = { type : 'a' }
6
6
const literalNode = { type : 'b' , value : 'c' }
Original file line number Diff line number Diff line change 26
26
*/
27
27
28
28
import nodeAssert from 'node:assert'
29
- import { inspect } from './ inspect.js '
29
+ import { inspect } from 'unist-util-assert/do-not-use-conditional- inspect'
30
30
31
31
const own = { } . hasOwnProperty
32
32
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 24
24
],
25
25
"sideEffects" : false ,
26
26
"type" : " module" ,
27
- "main" : " index.js" ,
28
- "browser" : {
29
- "./lib/inspect.js" : " ./lib/inspect.browser.js"
27
+ "exports" : {
28
+ "." : " ./index.js" ,
29
+ "./do-not-use-conditional-inspect" : {
30
+ "node" : " ./lib/inspect.node.js" ,
31
+ "default" : " ./lib/inspect.default.js"
32
+ }
30
33
},
31
- "react-native" : {
32
- "./lib/inspect.js" : " ./lib/inspect.browser.js"
33
- },
34
- "types" : " index.d.ts" ,
35
34
"files" : [
36
35
" lib/" ,
37
36
" index.d.ts" ,
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'children' , async function ( t ) {
6
6
await t . test (
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import test from 'node:test'
3
3
4
4
test ( 'assert' , async function ( t ) {
5
5
await t . test ( 'should expose the public api' , async function ( ) {
6
- assert . deepEqual ( Object . keys ( await import ( '../index.js ' ) ) . sort ( ) , [
6
+ assert . deepEqual ( Object . keys ( await import ( 'unist-util-assert ' ) ) . sort ( ) , [
7
7
'_void' ,
8
8
'assert' ,
9
9
'literal' ,
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
- import { literal } from '../index.js '
3
+ import { literal } from 'unist-util-assert '
4
4
5
5
test ( 'literal()' , async function ( t ) {
6
6
await t . test ( 'should throw the same errors as `assert()`' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'node' , async function ( t ) {
6
6
await t . test ( 'should throw if not given a node (#1)' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'non-defined' , async function ( t ) {
6
6
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
- import { parent } from '../index.js '
3
+ import { parent } from 'unist-util-assert '
4
4
5
5
test ( 'parent()' , async function ( t ) {
6
6
await t . test ( 'should throw the same errors as `assert()`' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'position' , async function ( t ) {
6
6
await t . test (
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'type' , async function ( t ) {
6
6
await t . test ( 'should throw if not given a `type` (#1)' , async function ( ) {
Original file line number Diff line number Diff line change 1
1
import nodeAssert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { assert } from '../index.js '
3
+ import { assert } from 'unist-util-assert '
4
4
5
5
test ( 'value' , async function ( t ) {
6
6
await t . test ( 'should throw if given a non-string `value`' , 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
- import { _void } from '../index.js '
3
+ import { _void } from 'unist-util-assert '
4
4
5
5
test ( '_void()' , async function ( t ) {
6
6
await t . test ( 'should throw the same errors as `assert()`' , async function ( ) {
You can’t perform that action at this time.
0 commit comments