File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Expand file tree Collapse file tree 5 files changed +11
-12
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 14
14
* Whether to include positional information.
15
15
*/
16
16
17
- import { color } from './ color.js '
17
+ import { color } from 'unist-util-inspect/do-not-use-conditional- color'
18
18
19
19
/**
20
20
* Inspect a node, with color in Node, without color in browsers.
Original file line number Diff line number Diff line change 25
25
],
26
26
"sideEffects" : false ,
27
27
"type" : " module" ,
28
- "main" : " index.js" ,
29
- "browser" : {
30
- "./lib/color.js" : " ./lib/color-browser.js"
28
+ "exports" : {
29
+ "." : " ./index.js" ,
30
+ "./do-not-use-conditional-color" : {
31
+ "node" : " ./lib/color.node.js" ,
32
+ "default" : " ./lib/color.default.js"
33
+ }
31
34
},
32
- "react-native" : {
33
- "./lib/color.js" : " ./lib/color-browser.js"
34
- },
35
- "types" : " index.d.ts" ,
36
35
"files" : [
37
36
" lib/" ,
38
37
" index.d.ts" ,
Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ import assert from 'node:assert/strict'
6
6
import test from 'node:test'
7
7
/* eslint-disable-next-line unicorn/import-style */
8
8
import { Chalk } from 'chalk'
9
+ import { h } from 'hastscript'
10
+ import { retext } from 'retext'
9
11
import strip from 'strip-ansi'
10
12
import { u } from 'unist-builder'
11
- import { h } from 'hastscript '
13
+ import { inspect , inspectColor , inspectNoColor } from 'unist-util-inspect '
12
14
import { x } from 'xastscript'
13
- import { retext } from 'retext'
14
15
import { fromXml } from 'xast-util-from-xml'
15
- import { inspect , inspectColor , inspectNoColor } from './index.js'
16
16
17
17
const chalkEnabled = new Chalk ( { level : 1 } )
18
18
19
19
const paragraph = 'Some simple text. Other “sentence”.'
20
20
21
21
test ( 'inspect()' , async function ( t ) {
22
22
await t . test ( 'should expose the public api' , async function ( ) {
23
- assert . deepEqual ( Object . keys ( await import ( './index.js ' ) ) . sort ( ) , [
23
+ assert . deepEqual ( Object . keys ( await import ( 'unist-util-inspect ' ) ) . sort ( ) , [
24
24
'inspect' ,
25
25
'inspectColor' ,
26
26
'inspectNoColor'
You can’t perform that action at this time.
0 commit comments