@xylabs/ts-scripts-yarn3 5.0.39 → 5.1.1

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/bin/xy.mjs CHANGED
@@ -1145,20 +1145,45 @@ var lintPackage = /* @__PURE__ */ __name(async ({ pkg }) => {
1145
1145
  dumpMessages(lintResults);
1146
1146
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
1147
1147
  }, "lintPackage");
1148
- var lint = /* @__PURE__ */ __name(async ({ pkg } = {}) => {
1148
+ var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental } = {}) => {
1149
1149
  return pkg ? await lintPackage({
1150
1150
  pkg
1151
- }) : runSteps("Lint-Caching [All]", [
1151
+ }) : lintAllPackages({
1152
+ verbose,
1153
+ incremental
1154
+ });
1155
+ }, "lint");
1156
+ var lintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
1157
+ console.log(chalk16.gray("Linting [All-Packages]"));
1158
+ const start = Date.now();
1159
+ const verboseOptions = verbose ? [
1160
+ "--verbose"
1161
+ ] : [
1162
+ "--no-verbose"
1163
+ ];
1164
+ const incrementalOptions = incremental ? [
1165
+ "--since",
1166
+ "-Apt"
1167
+ ] : [
1168
+ "--parallel",
1169
+ "-Apt"
1170
+ ];
1171
+ const result = runSteps("Lint [All-Packages]", [
1152
1172
  [
1153
1173
  "yarn",
1154
1174
  [
1155
- "eslint",
1156
- ".",
1157
- "--cache"
1175
+ "workspaces",
1176
+ "foreach",
1177
+ ...verboseOptions,
1178
+ ...incrementalOptions,
1179
+ "run",
1180
+ "package-lint"
1158
1181
  ]
1159
1182
  ]
1160
1183
  ]);
1161
- }, "lint");
1184
+ console.log(`${chalk16.gray("Linted in")} [${chalk16.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk16.gray("seconds")}`);
1185
+ return result;
1186
+ }, "lintAllPackages");
1162
1187
 
1163
1188
  // src/actions/lint-profile.ts
1164
1189
  var lintProfile = /* @__PURE__ */ __name(() => {