@xylabs/ts-scripts-yarn3 6.5.12 → 6.5.14
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/build.mjs +5 -5
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/fix.mjs +2 -2
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +10 -10
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint.mjs +2 -2
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +1 -1
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +1 -1
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +1 -1
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +3 -3
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +2 -2
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +1 -1
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +1 -1
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +1 -1
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +1 -1
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +1 -1
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +1 -1
- package/dist/bin/package/compile-types.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +1 -1
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +2 -2
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +2 -2
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +1 -1
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +2 -2
- package/dist/bin/package/relint.mjs.map +1 -1
- package/dist/bin/xy.mjs +7 -7
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +7 -7
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +7 -7
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +5 -5
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -2
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -483,18 +483,18 @@ var build = async ({
|
|
|
483
483
|
pkg
|
|
484
484
|
}) => {
|
|
485
485
|
const start = Date.now();
|
|
486
|
-
const pkgOptions = pkg ? [
|
|
486
|
+
const pkgOptions = pkg === void 0 ? [] : [pkg];
|
|
487
487
|
const incrementalOptions = incremental ? ["-i"] : [];
|
|
488
488
|
const verboseOptions = verbose ? ["-v"] : [];
|
|
489
|
-
const targetOptions = target ? ["-t", target]
|
|
490
|
-
const jobsOptions = jobs ? ["-j", `${jobs}`]
|
|
491
|
-
if (jobs) {
|
|
489
|
+
const targetOptions = target === void 0 ? [] : ["-t", target];
|
|
490
|
+
const jobsOptions = jobs === void 0 ? [] : ["-j", `${jobs}`];
|
|
491
|
+
if (jobs !== void 0) {
|
|
492
492
|
console.log(chalk9.blue(`Jobs set to [${jobs}]`));
|
|
493
493
|
}
|
|
494
494
|
const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
|
|
495
495
|
["yarn", ["xy", "compile", ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions, "--types", "tsup"]],
|
|
496
496
|
["yarn", ["xy", "publint", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
497
|
-
["yarn", ["xy", "
|
|
497
|
+
["yarn", ["xy", "deplint", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
498
498
|
["yarn", ["xy", "lint", ...pkgOptions, ...verboseOptions, ...incrementalOptions]]
|
|
499
499
|
]);
|
|
500
500
|
console.log(`${chalk9.gray("Built in")} [${chalk9.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk9.gray("seconds")}`);
|
|
@@ -1157,11 +1157,11 @@ var lint = ({
|
|
|
1157
1157
|
incremental,
|
|
1158
1158
|
fix: fix2
|
|
1159
1159
|
} = {}) => {
|
|
1160
|
-
return pkg
|
|
1160
|
+
return pkg === void 0 ? lintAllPackages({
|
|
1161
1161
|
verbose,
|
|
1162
1162
|
incremental,
|
|
1163
1163
|
fix: fix2
|
|
1164
|
-
});
|
|
1164
|
+
}) : lintPackage({ pkg, fix: fix2 });
|
|
1165
1165
|
};
|
|
1166
1166
|
var lintAllPackages = ({ fix: fix2 = false } = {}) => {
|
|
1167
1167
|
console.log(chalk20.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
@@ -1507,7 +1507,7 @@ var packageCompileTscTypes = (folder = "src", config2 = {}, compilerOptionsParam
|
|
|
1507
1507
|
noEmit: false
|
|
1508
1508
|
};
|
|
1509
1509
|
const validTsExt = [".ts", ".tsx", ".d.ts", ".cts", ".d.cts", ".mts", ".d.mts"];
|
|
1510
|
-
const excludes = [".stories.", ".spec."];
|
|
1510
|
+
const excludes = [".stories.", ".spec.", "/stories/", "/spec/"];
|
|
1511
1511
|
const files = buildEntries(folder, "all", verbose).filter((file) => validTsExt.find((ext) => file.endsWith(ext)) && !excludes.some((exclude) => file.includes(exclude)));
|
|
1512
1512
|
console.log(chalk27.green(`Compiling Types ${pkg}: ${files.length}`));
|
|
1513
1513
|
if (files.length > 0) {
|
|
@@ -1977,7 +1977,7 @@ ${lintResult.filePath}`));
|
|
|
1977
1977
|
};
|
|
1978
1978
|
async function getRootESLintConfig() {
|
|
1979
1979
|
const configPath = await findUp("eslint.config.mjs");
|
|
1980
|
-
if (
|
|
1980
|
+
if (configPath === void 0) {
|
|
1981
1981
|
throw new Error("eslint.config.mjs not found in the monorepo");
|
|
1982
1982
|
}
|
|
1983
1983
|
return pathToFileURL(configPath);
|
|
@@ -1988,7 +1988,7 @@ function getFiles(dir, ignoreFolders) {
|
|
|
1988
1988
|
if (ignoreFolders.includes(subDirectory)) return [];
|
|
1989
1989
|
return readdirSync(dir, { withFileTypes: true }).flatMap((dirent) => {
|
|
1990
1990
|
const res = path9.resolve(dir, dirent.name);
|
|
1991
|
-
const relativePath = subDirectory ? `${subDirectory}/${dirent.name}
|
|
1991
|
+
const relativePath = subDirectory === void 0 ? dirent.name : `${subDirectory}/${dirent.name}`;
|
|
1992
1992
|
const ignoreMatchers = ignoreFolders.map((pattern) => picomatch(pattern));
|
|
1993
1993
|
if (ignoreMatchers.some((isMatch) => isMatch(relativePath))) return [];
|
|
1994
1994
|
return dirent.isDirectory() ? getFiles(res, ignoreFolders) : [res];
|