diff --git a/.changeset/plenty-socks-knock.md b/.changeset/plenty-socks-knock.md new file mode 100644 index 0000000..be97f7c --- /dev/null +++ b/.changeset/plenty-socks-knock.md @@ -0,0 +1,5 @@ +--- +'@navita/css': minor +--- + +removing picocolors for theme comparison checks diff --git a/packages/css/package.json b/packages/css/package.json index c4e48e4..bd5a74e 100644 --- a/packages/css/package.json +++ b/packages/css/package.json @@ -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", diff --git a/packages/css/src/validateContract.ts b/packages/css/src/validateContract.ts index f514181..ba493f3 100644 --- a/packages/css/src/validateContract.ts +++ b/packages/css/src/validateContract.ts @@ -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, () => ''); @@ -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 } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cc4bdc..719e32c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -339,9 +339,6 @@ importers: deep-object-diff: specifier: ^1.1.9 version: 1.1.9 - picocolors: - specifier: ^1.0.0 - version: 1.1.0 devDependencies: '@navita/types': specifier: workspace:* @@ -2037,12 +2034,12 @@ packages: '@fastify/deepmerge@1.3.0': resolution: {integrity: sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A==} - '@grpc/grpc-js@1.11.3': - resolution: {integrity: sha512-i9UraDzFHMR+Iz/MhFLljT+fCpgxZ3O6CxwGJ8YuNYHJItIHUzKJpW2LvoFZNnGPwqc9iWy9RAucxV0JoR9aUQ==} - engines: {node: '>=12.10.0'} + '@grpc/grpc-js@1.9.0': + resolution: {integrity: sha512-H8+iZh+kCE6VR/Krj6W28Y/ZlxoZ1fOzsNt77nrdE3knkbSelW1Uus192xOFCxHyeszLj8i4APQkSIXjAoOxXg==} + engines: {node: ^8.13.0 || >=10.10.0} - '@grpc/proto-loader@0.7.13': - resolution: {integrity: sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==} + '@grpc/proto-loader@0.7.8': + resolution: {integrity: sha512-GU12e2c8dmdXb7XUlOgYWZ2o2i+z9/VeACkxTA/zzAe2IjclC5PnVL0lpgjhrqfpDYHzM8B1TF6pqWegMYAzlA==} engines: {node: '>=6'} hasBin: true @@ -2161,9 +2158,6 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@js-sdsl/ordered-map@4.4.2': - resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} - '@js-temporal/polyfill@0.4.4': resolution: {integrity: sha512-2X6bvghJ/JAoZO52lbgyAPFj8uCflhTo2g7nkFzEQdXd/D8rEeD4HtmTEpmtGCva260fcd66YNXBOYdnmHqSOg==} engines: {node: '>=12'} @@ -3106,6 +3100,9 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/long@4.0.2': + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + '@types/mdast@3.0.15': resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} @@ -4001,8 +3998,8 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - css-declaration-sorter@6.4.1: - resolution: {integrity: sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==} + css-declaration-sorter@6.4.0: + resolution: {integrity: sha512-jDfsatwWMWN0MODAFuHszfjphEXfNw9JUAhmY4pLu3TyTU+ohUpsbVtbU+1MZn4a47D9kqh03i4eyOm+74+zew==} engines: {node: ^10 || ^12 || >=14} peerDependencies: postcss: ^8.0.9 @@ -5709,6 +5706,9 @@ packages: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} + long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + long@5.2.3: resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} @@ -6592,6 +6592,10 @@ packages: peerDependencies: postcss: ^8.2.15 + postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} + engines: {node: '>=4'} + postcss-selector-parser@6.1.2: resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} @@ -6681,8 +6685,8 @@ packages: property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} - protobufjs@7.4.0: - resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} + protobufjs@7.2.4: + resolution: {integrity: sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==} engines: {node: '>=12.0.0'} proxy-addr@2.0.7: @@ -9464,16 +9468,17 @@ snapshots: '@fastify/deepmerge@1.3.0': {} - '@grpc/grpc-js@1.11.3': + '@grpc/grpc-js@1.9.0': dependencies: - '@grpc/proto-loader': 0.7.13 - '@js-sdsl/ordered-map': 4.4.2 + '@grpc/proto-loader': 0.7.8 + '@types/node': 20.4.8 - '@grpc/proto-loader@0.7.13': + '@grpc/proto-loader@0.7.8': dependencies: + '@types/long': 4.0.2 lodash.camelcase: 4.3.0 - long: 5.2.3 - protobufjs: 7.4.0 + long: 4.0.0 + protobufjs: 7.2.4 yargs: 17.7.2 '@humanwhocodes/config-array@0.11.14': @@ -9696,8 +9701,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@js-sdsl/ordered-map@4.4.2': {} - '@js-temporal/polyfill@0.4.4': dependencies: jsbi: 4.3.0 @@ -9925,7 +9928,7 @@ snapshots: '@opentelemetry/exporter-trace-otlp-grpc@0.39.1(@opentelemetry/api@1.9.0)': dependencies: - '@grpc/grpc-js': 1.11.3 + '@grpc/grpc-js': 1.9.0 '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.13.0(@opentelemetry/api@1.9.0) '@opentelemetry/otlp-grpc-exporter-base': 0.39.1(@opentelemetry/api@1.9.0) @@ -9940,11 +9943,11 @@ snapshots: '@opentelemetry/otlp-grpc-exporter-base@0.39.1(@opentelemetry/api@1.9.0)': dependencies: - '@grpc/grpc-js': 1.11.3 + '@grpc/grpc-js': 1.9.0 '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.13.0(@opentelemetry/api@1.9.0) '@opentelemetry/otlp-exporter-base': 0.39.1(@opentelemetry/api@1.9.0) - protobufjs: 7.4.0 + protobufjs: 7.2.4 '@opentelemetry/otlp-transformer@0.39.1(@opentelemetry/api@1.9.0)': dependencies: @@ -10616,6 +10619,8 @@ snapshots: '@types/json5@0.0.29': {} + '@types/long@4.0.2': {} + '@types/mdast@3.0.15': dependencies: '@types/unist': 2.0.11 @@ -11752,7 +11757,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-declaration-sorter@6.4.1(postcss@8.4.47): + css-declaration-sorter@6.4.0(postcss@8.4.47): dependencies: postcss: 8.4.47 @@ -11798,7 +11803,7 @@ snapshots: cssnano-preset-default@5.2.14(postcss@8.4.47): dependencies: - css-declaration-sorter: 6.4.1(postcss@8.4.47) + css-declaration-sorter: 6.4.0(postcss@8.4.47) cssnano-utils: 3.1.0(postcss@8.4.47) postcss: 8.4.47 postcss-calc: 8.2.4(postcss@8.4.47) @@ -14261,6 +14266,8 @@ snapshots: chalk: 4.1.2 is-unicode-supported: 0.1.0 + long@4.0.0: {} + long@5.2.3: {} longest-streak@3.1.0: {} @@ -15245,7 +15252,7 @@ snapshots: caniuse-api: 3.0.0 cssnano-utils: 3.1.0(postcss@8.4.47) postcss: 8.4.47 - postcss-selector-parser: 6.1.2 + postcss-selector-parser: 6.0.13 postcss-minify-font-values@5.1.0(postcss@8.4.47): dependencies: @@ -15269,7 +15276,7 @@ snapshots: postcss-minify-selectors@5.2.1(postcss@8.4.47): dependencies: postcss: 8.4.47 - postcss-selector-parser: 6.1.2 + postcss-selector-parser: 6.0.13 postcss-modules-extract-imports@3.1.0(postcss@8.4.47): dependencies: @@ -15367,6 +15374,11 @@ snapshots: postcss: 8.4.47 postcss-value-parser: 4.2.0 + postcss-selector-parser@6.0.13: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + postcss-selector-parser@6.1.2: dependencies: cssesc: 3.0.0 @@ -15381,7 +15393,7 @@ snapshots: postcss-unique-selectors@5.1.1(postcss@8.4.47): dependencies: postcss: 8.4.47 - postcss-selector-parser: 6.1.2 + postcss-selector-parser: 6.0.13 postcss-value-parser@4.2.0: {} @@ -15452,7 +15464,7 @@ snapshots: property-information@6.5.0: {} - protobufjs@7.4.0: + protobufjs@7.2.4: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2