From 286bf1a30367bf57fd0d76b3df0fc6b200c70ce4 Mon Sep 17 00:00:00 2001 From: sverweij Date: Sat, 6 Jul 2024 16:46:01 +0200 Subject: [PATCH 1/2] refactor: replaces chalk with tinycolors --- package-lock.json | 5 +-- package.json | 12 +++---- src/cli/format-meta-info.mjs | 6 ++-- src/cli/index.mjs | 12 ++++--- src/cli/init-config/write-config.mjs | 4 +-- .../write-run-scripts-to-manifest.mjs | 8 ++--- src/cli/listeners/cli-feedback.mjs | 4 +-- .../performance-log/format-helpers.mjs | 8 ++--- src/report/error.mjs | 32 ++++++++--------- src/report/metrics.mjs | 4 +-- src/report/text.mjs | 4 +-- test/cli/index.spec.mjs | 9 ++--- .../format-helpers.spec.mjs | 11 ------ test/report/error/error-long.spec.mjs | 9 ----- test/report/error/error.spec.mjs | 9 ----- test/report/text/text.spec.mjs | 36 +++++++++---------- 16 files changed, 70 insertions(+), 103 deletions(-) diff --git a/package-lock.json b/package-lock.json index 729f3c211..9757d50df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "acorn-loose": "8.4.0", "acorn-walk": "8.3.3", "ajv": "8.16.0", - "chalk": "5.3.0", "commander": "12.1.0", "enhanced-resolve": "5.17.0", "ignore": "5.3.1", @@ -24,6 +23,7 @@ "json5": "2.2.3", "lodash": "4.17.21", "memoize": "10.0.0", + "picocolors": "1.0.1", "picomatch": "4.0.2", "prompts": "2.4.2", "rechoir": "^0.8.0", @@ -2058,6 +2058,7 @@ }, "node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -5476,7 +5477,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.2", diff --git a/package.json b/package.json index 550f97dee..84640efe4 100644 --- a/package.json +++ b/package.json @@ -187,11 +187,11 @@ "scm:push:gitlab-mirror:commits": "git push gitlab-mirror", "scm:push:gitlab-mirror:tags": "git push --tags gitlab-mirror", "scm:stage": "git add .", - "test": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings mocha", - "test:i": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings mocha --grep \"^\\[[I]\\]\"", - "test:u": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings mocha --grep \"^\\[[U]\\]\"", - "test:e": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings mocha --grep \"^\\[[E]\\]\"", - "test:cover": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings c8 mocha", + "test": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings NO_COLOR=1 mocha", + "test:i": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings NO_COLOR=1 mocha --grep \"^\\[[I]\\]\"", + "test:u": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings NO_COLOR=1 mocha --grep \"^\\[[U]\\]\"", + "test:e": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings NO_COLOR=1 mocha --grep \"^\\[[E]\\]\"", + "test:cover": "LANG=en_US.UTF-8 NODE_OPTIONS=--no-warnings NO_COLOR=1 c8 mocha", "test:glob": "set -f && test \"`bin/dependency-cruise.mjs --no-config test/extract/__mocks__/gather-globbing/packages/**/src/**/*.js | grep \"no dependency violations found\"`\" = \"✔ no dependency violations found (6 modules, 0 dependencies cruised)\"", "test:load": "hyperfine --warmup 3 --runs 30 \"bin/dependency-cruise.mjs src bin test configs types tools --ignore-known --no-cache --no-progress\"", "test:load:short": "hyperfine --warmup 1 --runs 5 \"bin/dependency-cruise.mjs src bin test configs types tools --ignore-known --no-cache --no-progress\"", @@ -210,7 +210,6 @@ "acorn-loose": "8.4.0", "acorn-walk": "8.3.3", "ajv": "8.16.0", - "chalk": "5.3.0", "commander": "12.1.0", "enhanced-resolve": "5.17.0", "ignore": "5.3.1", @@ -219,6 +218,7 @@ "json5": "2.2.3", "lodash": "4.17.21", "memoize": "10.0.0", + "picocolors": "1.0.1", "picomatch": "4.0.2", "prompts": "2.4.2", "rechoir": "^0.8.0", diff --git a/src/cli/format-meta-info.mjs b/src/cli/format-meta-info.mjs index 9c6f623e0..dc39e280f 100644 --- a/src/cli/format-meta-info.mjs +++ b/src/cli/format-meta-info.mjs @@ -1,9 +1,9 @@ -import chalk from "chalk"; +import pc from "picocolors"; import { getAvailableTranspilers, allExtensions } from "#main/index.mjs"; function bool2Symbol(pBool) { - return pBool ? chalk.green("✔") : chalk.red("x"); + return pBool ? pc.green("✔") : pc.red("x"); } function formatTranspilers() { @@ -28,7 +28,7 @@ export default function formatMetaInfo() { return ` Supported: - If you need a supported, but not enabled transpiler ('${chalk.red( + If you need a supported, but not enabled transpiler ('${pc.red( "x", )}' below), just install it in the same folder dependency-cruiser is installed. E.g. 'npm i livescript' diff --git a/src/cli/index.mjs b/src/cli/index.mjs index acd0e79d3..0d01a6619 100644 --- a/src/cli/index.mjs +++ b/src/cli/index.mjs @@ -2,7 +2,7 @@ import { join } from "node:path"; import picomatch from "picomatch"; import set from "lodash/set.js"; import isInstalledGlobally from "is-installed-globally"; -import chalk from "chalk"; +import pc from "picocolors"; import assertFileExistence from "./utl/assert-file-existence.mjs"; import normalizeCliOptions from "./normalize-cli-options.mjs"; @@ -159,11 +159,13 @@ export default async function executeCli( /* c8 ignore start */ if (isInstalledGlobally) { lStreams.stderr.write( - `\n ${chalk.yellow( + `\n ${pc.yellow( "WARNING", )}: You're running a globally installed dependency-cruiser.\n\n` + - ` We recommend to ${chalk.bold.italic.underline( - "install and run it as a local devDependency", + ` We recommend to ${pc.bold( + pc.italic( + pc.underline("install and run it as a local devDependency"), + ), )} in\n` + ` your project instead. There it has your project's environment and\n` + ` transpilers at its disposal. That will ensure it can find e.g.\n` + @@ -183,7 +185,7 @@ export default async function executeCli( lExitCode = await runCruise(pFileDirectoryArray, lCruiseOptions); } } catch (pError) { - lStreams.stderr.write(`\n ${chalk.red("ERROR")}: ${pError.message}\n`); + lStreams.stderr.write(`\n ${pc.red("ERROR")}: ${pError.message}\n`); bus.emit("end"); lExitCode = 1; } diff --git a/src/cli/init-config/write-config.mjs b/src/cli/init-config/write-config.mjs index aae36ae00..8e853945e 100644 --- a/src/cli/init-config/write-config.mjs +++ b/src/cli/init-config/write-config.mjs @@ -1,5 +1,5 @@ import { writeFileSync } from "node:fs"; -import chalk from "chalk"; +import pc from "picocolors"; import { fileExists, getDefaultConfigFileName, @@ -29,7 +29,7 @@ export default function writeConfig( try { writeFileSync(pFileName, pConfig); pOutStream.write( - `\n ${chalk.green("✔")} Successfully created '${pFileName}'\n\n`, + `\n ${pc.green("✔")} Successfully created '${pFileName}'\n\n`, ); /* c8 ignore start */ } catch (pError) { diff --git a/src/cli/init-config/write-run-scripts-to-manifest.mjs b/src/cli/init-config/write-run-scripts-to-manifest.mjs index c76c22872..abf2e4703 100644 --- a/src/cli/init-config/write-run-scripts-to-manifest.mjs +++ b/src/cli/init-config/write-run-scripts-to-manifest.mjs @@ -2,7 +2,7 @@ /* eslint-disable security/detect-object-injection */ import { writeFileSync } from "node:fs"; import { EOL } from "node:os"; -import chalk from "chalk"; +import pc from "picocolors"; import { PACKAGE_MANIFEST as _PACKAGE_MANIFEST } from "../defaults.mjs"; import { readManifest } from "./environment-helpers.mjs"; import { folderNameArrayToRE } from "./utl.mjs"; @@ -126,16 +126,14 @@ export function addRunScriptsToManifest(pManifest, pAdditionalRunScripts) { } function getSuccessMessage(pDestinationManifestFileName) { - const lExplanationIndent = 6; - return EXPERIMENTAL_SCRIPT_DOC.reduce( (pAll, pScript) => { return `${pAll}${ - `\n ${chalk.green("►")} ${pScript.headline}` + + `\n ${pc.green("►")} ${pScript.headline}` + `\n${pScript.description}\n\n` }`; }, - ` ${chalk.green("✔")} Run scripts added to '${pDestinationManifestFileName}':\n`, + ` ${pc.green("✔")} Run scripts added to '${pDestinationManifestFileName}':\n`, ); } diff --git a/src/cli/listeners/cli-feedback.mjs b/src/cli/listeners/cli-feedback.mjs index 86284d1af..3c7372cc4 100644 --- a/src/cli/listeners/cli-feedback.mjs +++ b/src/cli/listeners/cli-feedback.mjs @@ -1,4 +1,4 @@ -import chalk from "chalk"; +import pc from "picocolors"; import { SUMMARY } from "#utl/bus.mjs"; const FULL_ON = 100; @@ -17,7 +17,7 @@ function getPercentageBar(pPercentage, pParameters) { const lBlocks = Math.floor(lParameters.barSize * lPercentage); const lBlanks = lParameters.barSize - lBlocks; - return `${chalk.green(lParameters.block.repeat(lBlocks))}${chalk.green( + return `${pc.green(lParameters.block.repeat(lBlocks))}${pc.green( lParameters.blank.repeat(lBlanks), )} ${Math.round(FULL_ON * lPercentage)}%`; } diff --git a/src/cli/listeners/performance-log/format-helpers.mjs b/src/cli/listeners/performance-log/format-helpers.mjs index f277c4a46..74e3417ef 100644 --- a/src/cli/listeners/performance-log/format-helpers.mjs +++ b/src/cli/listeners/performance-log/format-helpers.mjs @@ -1,4 +1,4 @@ -import chalk from "chalk"; +import pc from "picocolors"; import { INFO } from "#utl/bus.mjs"; const MS_PER_SECOND = 1000; @@ -43,7 +43,7 @@ export function formatDividerLine() { } export function formatHeader() { - return chalk + return pc .bold( `${ pad("∆ rss") + @@ -59,7 +59,7 @@ export function formatHeader() { } function formatMessage(pMessage, pLevel) { - return pLevel >= INFO ? chalk.dim(pMessage) : pMessage; + return pLevel >= INFO ? pc.dim(pMessage) : pMessage; } export function formatTime( @@ -81,7 +81,7 @@ export function formatMemory(pBytes, pLevel) { ); return formatMessage( - (pBytes < 0 ? chalk.blue(lReturnValue) : lReturnValue).concat(" "), + (pBytes < 0 ? pc.blue(lReturnValue) : lReturnValue).concat(" "), pLevel, ); } diff --git a/src/report/error.mjs b/src/report/error.mjs index 04dc76948..79e4f619a 100644 --- a/src/report/error.mjs +++ b/src/report/error.mjs @@ -1,5 +1,5 @@ import { EOL } from "node:os"; -import chalk from "chalk"; +import pc from "picocolors"; import { formatPercentage, formatViolation as _formatViolation, @@ -7,11 +7,11 @@ import { import { findRuleByName } from "#graph-utl/rule-set.mjs"; import wrapAndIndent from "#utl/wrap-and-indent.mjs"; -const SEVERITY2CHALK = new Map([ - ["error", chalk.red], - ["warn", chalk.yellow], - ["info", chalk.cyan], - ["ignore", chalk.gray], +const SEVERITY2COLOR_FN = new Map([ + ["error", pc.red], + ["warn", pc.yellow], + ["info", pc.cyan], + ["ignore", pc.gray], ]); const EXTRA_PATH_INFORMATION_INDENT = 6; @@ -26,26 +26,26 @@ function formatMiniDependency(pMiniDependency) { } function formatModuleViolation(pViolation) { - return chalk.bold(pViolation.from); + return pc.bold(pViolation.from); } function formatDependencyViolation(pViolation) { - return `${chalk.bold(pViolation.from)} → ${chalk.bold(pViolation.to)}`; + return `${pc.bold(pViolation.from)} → ${pc.bold(pViolation.to)}`; } function formatCycleViolation(pViolation) { - return `${chalk.bold(pViolation.from)} → ${formatMiniDependency(pViolation.cycle)}`; + return `${pc.bold(pViolation.from)} → ${formatMiniDependency(pViolation.cycle)}`; } function formatReachabilityViolation(pViolation) { - return `${chalk.bold(pViolation.from)} → ${chalk.bold( + return `${pc.bold(pViolation.from)} → ${pc.bold( pViolation.to, )}${formatMiniDependency(pViolation.via)}`; } function formatInstabilityViolation(pViolation) { return `${formatDependencyViolation(pViolation)}${EOL}${wrapAndIndent( - chalk.dim( + pc.dim( `instability: ${formatPercentage(pViolation.metrics.from.instability)} → ${formatPercentage(pViolation.metrics.to.instability)}`, ), EXTRA_PATH_INFORMATION_INDENT, @@ -67,12 +67,12 @@ function formatViolation(pViolation) { ); return ( - `${SEVERITY2CHALK.get(pViolation.rule.severity)( + `${SEVERITY2COLOR_FN.get(pViolation.rule.severity)( pViolation.rule.severity, )} ${pViolation.rule.name}: ${lFormattedViolators}` + `${ pViolation.comment - ? `${EOL}${wrapAndIndent(chalk.dim(pViolation.comment))}${EOL}` + ? `${EOL}${wrapAndIndent(pc.dim(pViolation.comment))}${EOL}` : "" }` ); @@ -93,7 +93,7 @@ function formatSummary(pSummary) { pSummary.totalCruised } modules, ${pSummary.totalDependenciesCruised} dependencies cruised.${EOL}`; - return pSummary.error > 0 ? chalk.red(lMessage) : lMessage; + return pSummary.error > 0 ? pc.red(lMessage) : lMessage; } function addExplanation(pRuleSet, pLong) { @@ -107,7 +107,7 @@ function addExplanation(pRuleSet, pLong) { function formatIgnoreWarning(pNumberOfIgnoredViolations) { if (pNumberOfIgnoredViolations > 0) { - return chalk.yellow( + return pc.yellow( `‼ ${pNumberOfIgnoredViolations} known violations ignored. Run with --no-ignore-known to see them.${EOL}`, ); } @@ -120,7 +120,7 @@ function report(pResults, pLong) { ); if (lNonIgnorableViolations.length === 0) { - return `${EOL}${chalk.green("✔")} no dependency violations found (${ + return `${EOL}${pc.green("✔")} no dependency violations found (${ pResults.summary.totalCruised } modules, ${ pResults.summary.totalDependenciesCruised diff --git a/src/report/metrics.mjs b/src/report/metrics.mjs index 07f6896f0..5ec3ae13d 100644 --- a/src/report/metrics.mjs +++ b/src/report/metrics.mjs @@ -1,5 +1,5 @@ import { EOL } from "node:os"; -import chalk from "chalk"; +import pc from "picocolors"; import { formatNumber, formatPercentage } from "./utl/index.mjs"; /** @@ -224,7 +224,7 @@ function formatToTextData(pData, pMetaData) { * @returns {string} */ function formatToTextTable(pData, pMetaData) { - return [chalk.bold(formatToTextHeader(pMetaData))] + return [pc.bold(formatToTextHeader(pMetaData))] .concat(formatToTextDemarcationLine(pMetaData)) .concat(formatToTextData(pData, pMetaData)) .join(EOL) diff --git a/src/report/text.mjs b/src/report/text.mjs index f4accbb4e..728b6cf03 100644 --- a/src/report/text.mjs +++ b/src/report/text.mjs @@ -1,4 +1,4 @@ -import chalk from "chalk"; +import pc from "picocolors"; const DEFAULT_OPTIONS = { highlightFocused: false, @@ -36,7 +36,7 @@ function toFlatDependencies(pModules, pModulesInFocus, pHighlightFocused) { } function stringifyModule(pModule) { - return pModule.highlight ? chalk.underline(pModule.name) : pModule.name; + return pModule.highlight ? pc.underline(pModule.name) : pModule.name; } function stringify(pFlatDependency) { diff --git a/test/cli/index.spec.mjs b/test/cli/index.spec.mjs index fd4d631d8..431c5ca65 100644 --- a/test/cli/index.spec.mjs +++ b/test/cli/index.spec.mjs @@ -3,7 +3,6 @@ import { doesNotThrow, equal, throws, match } from "node:assert/strict"; // path.posix instead of path because otherwise on win32 the resulting // outputTo would contain \\ instead of / which for this unit test doesn't matter import { join, posix as path } from "node:path"; -import chalk from "chalk"; import { assertFileEqual, assertJSONFileEqual } from "./asserthelpers.utl.mjs"; import deleteDammit from "./delete-dammit.utl.cjs"; import { @@ -238,16 +237,12 @@ describe("[E] cli/index", () => { }); describe("[E] specials", () => { - let lChalkLevel = chalk.level; const lOriginalStdoutWrite = process.stdout.write; - before("disable chalk coloring", () => { - chalk.level = 0; - }); - after("enable chalk coloring again", () => { - chalk.level = lChalkLevel; + after("enable coloring again", () => { process.stdout.write = lOriginalStdoutWrite; }); + it("dependency-cruises multiple files and folders in one go", async () => { const lOutputFileName = "multiple-in-one-go.json"; const lOutputTo = path.join(OUT_DIR, lOutputFileName); diff --git a/test/cli/listeners/performance-log-listener/format-helpers.spec.mjs b/test/cli/listeners/performance-log-listener/format-helpers.spec.mjs index 71daaa323..a591ea625 100644 --- a/test/cli/listeners/performance-log-listener/format-helpers.spec.mjs +++ b/test/cli/listeners/performance-log-listener/format-helpers.spec.mjs @@ -1,6 +1,5 @@ /* eslint-disable no-magic-numbers */ import { match, equal } from "node:assert/strict"; -import chalk from "chalk"; import { formatTime, formatMemory, @@ -50,16 +49,6 @@ describe("[U] cli/listeners/performance-log/format-helpers - formatTime", () => }); describe("[U] cli/listeners/performance-log/format-helpers - formatMemory", () => { - let lChalkLevel = chalk.level; - - before("disable chalk coloring", () => { - chalk.level = 0; - }); - - after("enable chalk coloring again", () => { - chalk.level = lChalkLevel; - }); - it("converts to kB, left pads & adds the unit at the end", () => { equal(formatMemory(4033856), " +3,939kB "); }); diff --git a/test/report/error/error-long.spec.mjs b/test/report/error/error-long.spec.mjs index 76e169ddb..4d725dcff 100644 --- a/test/report/error/error-long.spec.mjs +++ b/test/report/error/error-long.spec.mjs @@ -2,7 +2,6 @@ /* eslint-disable no-magic-numbers */ import { equal, match } from "node:assert/strict"; import { EOL } from "node:os"; -import chalk from "chalk"; import okDeps from "./__mocks__/everything-fine.mjs"; import deps from "./__mocks__/cjs-no-dependency-valid.mjs"; import warnDeps from "./__mocks__/err-only-warnings.mjs"; @@ -11,14 +10,6 @@ import orphanErrs from "./__mocks__/orphan-deps.mjs"; import render from "#report/error-long.mjs"; describe("[I] report/error-long", () => { - let chalkLevel = chalk.level; - - before("disable chalk coloring", () => { - chalk.level = 0; - }); - after("put chalk enabled back to its original value", () => { - chalk.level = chalkLevel; - }); it("says everything fine", () => { const lResult = render(okDeps); diff --git a/test/report/error/error.spec.mjs b/test/report/error/error.spec.mjs index 10e0b832f..252293944 100644 --- a/test/report/error/error.spec.mjs +++ b/test/report/error/error.spec.mjs @@ -2,7 +2,6 @@ /* eslint-disable no-magic-numbers */ import { doesNotMatch, match, equal } from "node:assert/strict"; import { EOL } from "node:os"; -import chalk from "chalk"; import okdeps from "./__mocks__/everything-fine.mjs"; import dependencies from "./__mocks__/cjs-no-dependency-valid.mjs"; import onlyWarningDependencies from "./__mocks__/err-only-warnings.mjs"; @@ -17,14 +16,6 @@ import unknownViolationType from "./__mocks__/unknown-violation-type.mjs"; import render from "#report/error.mjs"; describe("[I] report/error", () => { - let chalkLevel = chalk.level; - - before("disable chalk coloring", () => { - chalk.level = 0; - }); - after("put chalk enabled back to its original value", () => { - chalk.level = chalkLevel; - }); it("says everything fine", () => { const lResult = render(okdeps); diff --git a/test/report/text/text.spec.mjs b/test/report/text/text.spec.mjs index 84a45a280..368a4dab1 100644 --- a/test/report/text/text.spec.mjs +++ b/test/report/text/text.spec.mjs @@ -1,23 +1,12 @@ import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { equal } from "node:assert/strict"; -import chalk from "chalk"; import normalizeNewline from "normalize-newline"; import dependencies from "./__mocks__/dependencies.mjs"; import cruiseResultWithFocus from "./__mocks__/cruise-result-with-focus.mjs"; import renderText from "#report/text.mjs"; describe("[I] report/text", () => { - let lOldChalkLevel = 0; - before("override chalk default support level to superhigh", () => { - lOldChalkLevel = chalk.level; - chalk.level = 1; - }); - - after("set chalk level back to what it was", () => { - chalk.level = lOldChalkLevel; - }); - it("renders a bunch of dependencies", () => { const lResult = renderText(dependencies); const lExpectedOutput = normalizeNewline( @@ -38,14 +27,25 @@ describe("[I] report/text", () => { highlightFocused: true, }); + // const lExpectedOutput = + // "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → src/main/utl/normalize-re-properties.js\n" + + // "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → node_modules/lodash/cloneDeep.js\n" + + // "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → node_modules/lodash/has.js\n" + + // "src/main/index.js → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + + // "test/enrich/derive/reachable/index.spec.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + + // "test/main/rule-set/normalize.spec.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + + // "test/validate/parse-ruleset.utl.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n"; + + // we're running our tests with NO_COLOR=1, so the expected output is without the ANSI codes + // TODO: figure out a way to still do this that isn't super klunky const lExpectedOutput = - "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → src/main/utl/normalize-re-properties.js\n" + - "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → node_modules/lodash/cloneDeep.js\n" + - "\u001B[4msrc/main/rule-set/normalize.js\u001B[24m → node_modules/lodash/has.js\n" + - "src/main/index.js → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + - "test/enrich/derive/reachable/index.spec.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + - "test/main/rule-set/normalize.spec.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n" + - "test/validate/parse-ruleset.utl.mjs → \u001B[4msrc/main/rule-set/normalize.js\u001B[24m\n"; + "src/main/rule-set/normalize.js → src/main/utl/normalize-re-properties.js\n" + + "src/main/rule-set/normalize.js → node_modules/lodash/cloneDeep.js\n" + + "src/main/rule-set/normalize.js → node_modules/lodash/has.js\n" + + "src/main/index.js → src/main/rule-set/normalize.js\n" + + "test/enrich/derive/reachable/index.spec.mjs → src/main/rule-set/normalize.js\n" + + "test/main/rule-set/normalize.spec.mjs → src/main/rule-set/normalize.js\n" + + "test/validate/parse-ruleset.utl.mjs → src/main/rule-set/normalize.js\n"; equal(normalizeNewline(lResult.output), lExpectedOutput); }); From d7c481a349b5eae709896bfb8be57314b2daf776 Mon Sep 17 00:00:00 2001 From: sverweij Date: Sat, 6 Jul 2024 17:00:15 +0200 Subject: [PATCH 2/2] fix(ci): whip windows into conformance. again. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4df25e2a4..215fca3f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: check-windows: env: PLATFORM: windows-latest + NO_COLOR: 1 runs-on: windows-latest steps: - uses: actions/checkout@v4