@xylabs/ts-scripts-yarn3 6.1.2 → 6.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1092,9 +1092,9 @@ var dupdeps = /* @__PURE__ */ __name(() => {
1092
1092
  // src/actions/lint.ts
1093
1093
  import chalk16 from "chalk";
1094
1094
  var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
1095
- console.log(chalk16.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1095
+ console.log(chalk16.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1096
1096
  const start = Date.now();
1097
- const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1097
+ const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1098
1098
  [
1099
1099
  "yarn",
1100
1100
  [
@@ -2197,10 +2197,10 @@ function getFiles(dir, ignoreFolders) {
2197
2197
  }
2198
2198
  __name(getFiles, "getFiles");
2199
2199
  var packageLint = /* @__PURE__ */ __name(async (fix2 = false, verbose = false, cache = true) => {
2200
- const start = Date.now();
2201
2200
  const pkg = process.env.INIT_CWD;
2202
2201
  const configPath = await getRootESLintConfig();
2203
2202
  const { default: eslintConfig } = await import(configPath.href);
2203
+ const start = Date.now();
2204
2204
  const ignoreFolders = [
2205
2205
  "node_modules",
2206
2206
  "dist",
@@ -2228,7 +2228,10 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false, verbose = false, c
2228
2228
  if (fix2) {
2229
2229
  await ESLint2.outputFixes(lintResults);
2230
2230
  }
2231
- console.log(chalk29.green(`Linted ${files.length} files in ${Date.now() - start}ms`));
2231
+ const filesCountColor = files.length < 100 ? "green" : files.length < 1e3 ? "yellow" : "red";
2232
+ const lintTime = Date.now() - start;
2233
+ const lintTimeColor = lintTime < 1e3 ? "green" : lintTime < 3e3 ? "yellow" : "red";
2234
+ console.log(chalk29.white(`Linted ${chalk29[filesCountColor](files.length)} files in ${chalk29[lintTimeColor](lintTime)}ms`));
2232
2235
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
2233
2236
  }, "packageLint");
2234
2237