Skip to content

Commit

Permalink
Fix reduce dependencies (#56)
Browse files Browse the repository at this point in the history
* removing picocolors

* changeset
  • Loading branch information
Zn4rK authored Oct 1, 2024
1 parent c03767b commit 6d3783e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 37 deletions.
5 changes: 5 additions & 0 deletions .changeset/plenty-socks-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@navita/css': minor
---

removing picocolors for theme comparison checks
3 changes: 1 addition & 2 deletions packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"dependencies": {
"@navita/adapter": "workspace:*",
"deep-object-diff": "^1.1.9",
"cssesc": "^3.0.0",
"picocolors": "^1.0.0"
"cssesc": "^3.0.0"
},
"devDependencies": {
"@types/cssesc": "^3.0.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/css/src/validateContract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Contract } from "@navita/types";
import { diff } from 'deep-object-diff';
import pc from "picocolors";
import { walkObject } from "./helpers/walkObject";

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

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

if (type === '+') {
return pc.green(line);
return `\x1b[32m${line}\x1b[0m`; // Green for '+' type
}
}

Expand Down
76 changes: 44 additions & 32 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d3783e

Please sign in to comment.