Skip to content

Commit 35121ac

Browse files
authored
refactor: replace kleur with styleText (#1210)
* refactor: replace kleur with styleText * chore: update lockfile
1 parent 176f8c6 commit 35121ac

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.changeset/tiny-otters-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/vite-plugin-svelte': patch
3+
---
4+
5+
replace kleur dependency with builtin node:utils styleText

packages/vite-plugin-svelte/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"@sveltejs/vite-plugin-svelte-inspector": "^5.0.0",
4343
"debug": "^4.4.1",
4444
"deepmerge": "^4.3.1",
45-
"kleur": "^4.1.5",
4645
"magic-string": "^0.30.17",
4746
"vitefu": "^1.1.1"
4847
},

packages/vite-plugin-svelte/src/utils/log.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* eslint-disable no-console */
2-
import { cyan, red, yellow } from 'kleur/colors';
2+
3+
import { styleText } from 'node:util';
4+
const cyan = (/** @type {string} */ txt) => styleText('cyan', txt);
5+
const yellow = (/** @type {string} */ txt) => styleText('yellow', txt);
6+
const red = (/** @type {string} */ txt) => styleText('red', txt);
7+
38
import debug from 'debug';
49

510
/** @type {import('../types/log.d.ts').LogLevel[]} */

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)