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