@xylabs/ts-scripts-yarn3 7.1.3 → 7.1.5

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.d.ts CHANGED
@@ -191,7 +191,7 @@ interface LintPackageParams {
191
191
  pkg: string;
192
192
  verbose?: boolean;
193
193
  }
194
- declare const lintPackage: ({ pkg, fix }: LintParams & Required<Pick<LintParams, "pkg">>) => number;
194
+ declare const lintPackage: ({ pkg, fix, verbose, }: LintParams & Required<Pick<LintParams, "pkg">>) => number;
195
195
  declare const lint: ({ pkg, verbose, incremental, fix, }?: LintParams) => number;
196
196
  declare const lintAllPackages: ({ fix }?: LintParams) => number;
197
197
 
package/dist/index.mjs CHANGED
@@ -1116,7 +1116,11 @@ var dupdeps = () => {
1116
1116
 
1117
1117
  // src/actions/lint.ts
1118
1118
  import chalk19 from "chalk";
1119
- var lintPackage = ({ pkg, fix: fix2 }) => {
1119
+ var lintPackage = ({
1120
+ pkg,
1121
+ fix: fix2,
1122
+ verbose
1123
+ }) => {
1120
1124
  console.log(chalk19.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1121
1125
  const start = Date.now();
1122
1126
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
@@ -1124,7 +1128,7 @@ var lintPackage = ({ pkg, fix: fix2 }) => {
1124
1128
  "workspace",
1125
1129
  pkg,
1126
1130
  "run",
1127
- fix2 ? "package-fix" : "package-lint"
1131
+ fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
1128
1132
  ]]
1129
1133
  ]);
1130
1134
  console.log(chalk19.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk19.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk19.gray("seconds")}`));
@@ -1140,7 +1144,11 @@ var lint = ({
1140
1144
  verbose,
1141
1145
  incremental,
1142
1146
  fix: fix2
1143
- }) : lintPackage({ pkg, fix: fix2 });
1147
+ }) : lintPackage({
1148
+ pkg,
1149
+ fix: fix2,
1150
+ verbose
1151
+ });
1144
1152
  };
1145
1153
  var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1146
1154
  console.log(chalk19.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
@@ -2003,8 +2011,12 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2003
2011
  cache
2004
2012
  });
2005
2013
  const files = getFiles(cwd4(), ignoreFolders);
2014
+ console.log(chalk32.green(`Linting ${pkg} [files = ${files.length}]`));
2006
2015
  if (verbose) {
2007
- console.log(chalk32.green(`Linting ${pkg} [files = ${files.length}]`));
2016
+ for (const file of files) {
2017
+ console.log(chalk32.gray(` ${file}
2018
+ `));
2019
+ }
2008
2020
  }
2009
2021
  const lintResults = await engine.lintFiles(files);
2010
2022
  dumpMessages(lintResults);
@@ -2697,7 +2709,15 @@ var xyLintCommands = (args) => {
2697
2709
  (argv) => {
2698
2710
  if (argv.verbose) console.log("Lint");
2699
2711
  const start = Date.now();
2700
- process.exitCode = argv.fix ? fix({ pkg: argv.package, cache: argv.cache }) : lint({ pkg: argv.package, cache: argv.cache });
2712
+ process.exitCode = argv.fix ? fix({
2713
+ pkg: argv.package,
2714
+ cache: argv.cache,
2715
+ verbose: !!argv.verbose
2716
+ }) : lint({
2717
+ pkg: argv.package,
2718
+ cache: argv.cache,
2719
+ verbose: !!argv.verbose
2720
+ });
2701
2721
  console.log(chalk37.blue(`Finished in ${Date.now() - start}ms`));
2702
2722
  }
2703
2723
  ).command(