Skip to content

Commit 6d3783e

Browse files
authored
Fix reduce dependencies (#56)
* removing picocolors * changeset
1 parent c03767b commit 6d3783e

File tree

4 files changed

+52
-37
lines changed

4 files changed

+52
-37
lines changed

.changeset/plenty-socks-knock.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@navita/css': minor
3+
---
4+
5+
removing picocolors for theme comparison checks

packages/css/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"dependencies": {
3030
"@navita/adapter": "workspace:*",
3131
"deep-object-diff": "^1.1.9",
32-
"cssesc": "^3.0.0",
33-
"picocolors": "^1.0.0"
32+
"cssesc": "^3.0.0"
3433
},
3534
"devDependencies": {
3635
"@types/cssesc": "^3.0.0",

packages/css/src/validateContract.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Contract } from "@navita/types";
22
import { diff } from 'deep-object-diff';
3-
import pc from "picocolors";
43
import { walkObject } from "./helpers/walkObject";
54

65
const normaliseObject = (obj: Contract) => walkObject(obj, () => '');
@@ -21,11 +20,11 @@ function diffLine(value: string, nesting: number, type?: '+' | '-') {
2120

2221
if (process.env.NODE_ENV !== 'test') {
2322
if (type === '-') {
24-
return pc.red(line);
23+
return `\x1b[31m${line}\x1b[0m`; // Red for '-' type
2524
}
2625

2726
if (type === '+') {
28-
return pc.green(line);
27+
return `\x1b[32m${line}\x1b[0m`; // Green for '+' type
2928
}
3029
}
3130

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)