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 1414 * Whether to include positional information.
1515 */
1616
17- import { color } from './ color.js '
17+ import { color } from 'unist-util-inspect/do-not-use-conditional- color'
1818
1919/**
2020 * Inspect a node, with color in Node, without color in browsers.
Original file line number Diff line number Diff line change 2525 ],
2626 "sideEffects" : false ,
2727 "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+ }
3134 },
32- "react-native" : {
33- "./lib/color.js" : " ./lib/color-browser.js"
34- },
35- "types" : " index.d.ts" ,
3635 "files" : [
3736 " lib/" ,
3837 " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ import assert from 'node:assert/strict'
66import test from 'node:test'
77/* eslint-disable-next-line unicorn/import-style */
88import { Chalk } from 'chalk'
9+ import { h } from 'hastscript'
10+ import { retext } from 'retext'
911import strip from 'strip-ansi'
1012import { u } from 'unist-builder'
11- import { h } from 'hastscript '
13+ import { inspect , inspectColor , inspectNoColor } from 'unist-util-inspect '
1214import { x } from 'xastscript'
13- import { retext } from 'retext'
1415import { fromXml } from 'xast-util-from-xml'
15- import { inspect , inspectColor , inspectNoColor } from './index.js'
1616
1717const chalkEnabled = new Chalk ( { level : 1 } )
1818
1919const paragraph = 'Some simple text. Other “sentence”.'
2020
2121test ( 'inspect()' , async function ( t ) {
2222 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 ( ) , [
2424 'inspect' ,
2525 'inspectColor' ,
2626 'inspectNoColor'
You can’t perform that action at this time.
0 commit comments