@xylabs/ts-scripts-yarn3 5.1.3 → 5.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/xy/index.mjs CHANGED
@@ -933,53 +933,23 @@ var lintPackage = /* @__PURE__ */ __name(async ({ pkg, fix: fix2 }) => {
933
933
  dumpMessages(lintResults);
934
934
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
935
935
  }, "lintPackage");
936
+ var lintAll = /* @__PURE__ */ __name(async ({ fix: fix2 }) => {
937
+ const workspace = yarnWorkspaces();
938
+ return (await Promise.all(workspace.map((ws) => lintPackage({
939
+ pkg: ws.name,
940
+ fix: fix2
941
+ })))).reduce((prev, curr) => prev + curr, 0);
942
+ }, "lintAll");
936
943
  var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental, fix: fix2 } = {}) => {
937
944
  return pkg ? await lintPackage({
938
945
  pkg,
939
946
  fix: fix2
940
- }) : lintAllPackages({
947
+ }) : lintAll({
941
948
  verbose,
942
949
  incremental,
943
950
  fix: fix2
944
951
  });
945
952
  }, "lint");
946
- var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incremental } = {}) => {
947
- console.log(chalk13.gray("Linting [All-Packages]"));
948
- const start = Date.now();
949
- const verboseOptions = verbose ? [
950
- "--verbose"
951
- ] : [
952
- "--no-verbose"
953
- ];
954
- const fixOptions = fix2 ? [
955
- "--fix"
956
- ] : [
957
- ""
958
- ];
959
- const incrementalOptions = incremental ? [
960
- "--since",
961
- "-Apt"
962
- ] : [
963
- "--parallel",
964
- "-Apt"
965
- ];
966
- const result = runSteps("Lint [All-Packages]", [
967
- [
968
- "yarn",
969
- [
970
- "workspaces",
971
- "foreach",
972
- ...verboseOptions,
973
- ...incrementalOptions,
974
- "run",
975
- "package-lint",
976
- ...fixOptions
977
- ]
978
- ]
979
- ]);
980
- console.log(`${chalk13.gray("Linted in")} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`);
981
- return result;
982
- }, "lintAllPackages");
983
953
 
984
954
  // src/actions/fix.ts
985
955
  var fix = /* @__PURE__ */ __name(async () => {