Skip to content

Commit 2843916

Browse files
authored
feat: replace picocolors with ansis (#138)
1 parent e017897 commit 2843916

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@
8181
}
8282
},
8383
"dependencies": {
84+
"ansis": "^3.12.0",
8485
"debug": "^4.4.0",
8586
"error-stack-parser-es": "^1.0.5",
8687
"open": "^10.1.0",
87-
"picocolors": "^1.1.1",
8888
"sirv": "^3.0.0"
8989
},
9090
"devDependencies": {

pnpm-lock.yaml

+9-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { HMRData, RpcFunctions } from '../types'
33
import type { InspectContextVite } from './context'
44
import type { ViteInspectOptions } from './options'
55
import process from 'node:process'
6+
import c from 'ansis'
67
import { debounce } from 'perfect-debounce'
7-
import c from 'picocolors'
88
import sirv from 'sirv'
99
import { createRPCServer } from 'vite-dev-rpc'
1010
import { DIR_CLIENT } from '../dirs'
@@ -246,7 +246,7 @@ export default function PluginInspect(options: ViteInspectOptions = {}): Plugin
246246
return
247247
const dir = await generateBuild(ctx)
248248

249-
this.environment!.logger.info(`${c.green('Inspect report generated at')} ${c.dim(`${dir}`)}`)
249+
this.environment!.logger.info(`${c.green('Inspect report generated at')} ${c.dim(dir)}`)
250250
if (_open && !isCI)
251251
createPreviewServer(dir)
252252
},

src/node/preview.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { AddressInfo } from 'node:net'
22
import { createServer } from 'node:http'
3-
import c from 'picocolors'
3+
import c from 'ansis'
44
import sirv from 'sirv'
55
import { openBrowser } from './utils'
66

0 commit comments

Comments
 (0)