Skip to content

Commit

Permalink
Refactor to use picocolors (#5574)
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Oct 6, 2021
1 parent 4ce6913 commit 585d28a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/cli.js
Expand Up @@ -11,7 +11,7 @@ const printConfig = require('./printConfig');
const resolveFrom = require('resolve-from');
const standalone = require('./standalone');
const writeOutputFile = require('./writeOutputFile');
const { red, dim } = require('nanocolors');
const { red, dim } = require('picocolors');

const EXIT_CODE_ERROR = 2;

Expand Down
2 changes: 1 addition & 1 deletion lib/formatters/stringFormatter.js
Expand Up @@ -3,7 +3,7 @@
const path = require('path');
const stringWidth = require('string-width');
const table = require('table');
const { yellow, dim, underline, blue, red, green } = require('nanocolors');
const { yellow, dim, underline, blue, red, green } = require('picocolors');

const MARGIN_WIDTHS = 9;

Expand Down
2 changes: 1 addition & 1 deletion lib/formatters/verboseFormatter.js
@@ -1,7 +1,7 @@
'use strict';

const stringFormatter = require('./stringFormatter');
const { underline, red, yellow, dim, green } = require('nanocolors');
const { underline, red, yellow, dim, green } = require('picocolors');

/** @typedef {import('stylelint').Formatter} Formatter */
/** @typedef {import('stylelint').StylelintWarning} StylelintWarning */
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/__tests__/checkInvalidCLIOptions.test.js
Expand Up @@ -2,7 +2,7 @@

const checkInvalidCLIOptions = require('../checkInvalidCLIOptions');
const EOL = require('os').EOL;
const { red: r, cyan: c } = require('nanocolors');
const { red: r, cyan: c } = require('picocolors');

describe('checkInvalidCLIOptions', () => {
const allowedOptions = {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/checkInvalidCLIOptions.js
Expand Up @@ -2,7 +2,7 @@

const EOL = require('os').EOL;
const levenshtein = require('fastest-levenshtein');
const { red, cyan } = require('nanocolors');
const { red, cyan } = require('picocolors');

/**
* @param {{ [key: string]: { alias?: string } }} allowedOptions
Expand Down
18 changes: 15 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -130,9 +130,9 @@
"mathml-tag-names": "^2.1.3",
"meow": "^9.0.0",
"micromatch": "^4.0.4",
"nanocolors": "^0.2.12",
"normalize-path": "^3.0.0",
"normalize-selector": "^0.2.0",
"picocolors": "^0.2.1",
"postcss": "^8.3.6",
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark-rule.js
Expand Up @@ -6,7 +6,7 @@ const got = require('got');
const normalizeRuleSettings = require('../lib/normalizeRuleSettings');
const postcss = require('postcss');
const rules = require('../lib/rules');
const { bold, yellow } = require('nanocolors');
const { bold, yellow } = require('picocolors');

const ruleName = process.argv[2];
const ruleOptions = process.argv[3];
Expand Down

0 comments on commit 585d28a

Please sign in to comment.