@xylabs/ts-scripts-yarn3 4.0.7 → 4.1.0
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/cycle.mjs +1 -5
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/index.mjs +11 -15
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs +3 -7
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs +3 -7
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +11 -15
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +3 -7
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +3 -7
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +1 -5
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +23 -25
- package/src/actions/cycle.ts +1 -3
package/dist/index.mjs
CHANGED
|
@@ -516,7 +516,7 @@ var mergeEntries = /* @__PURE__ */ __name((a, b) => [
|
|
|
516
516
|
].sort(), "mergeEntries");
|
|
517
517
|
var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
518
518
|
console.log(chalk4.green(`Generate ${filename3} Files`));
|
|
519
|
-
const
|
|
519
|
+
const cwd4 = INIT_CWD() ?? ".";
|
|
520
520
|
const workspaces = pkg ? [
|
|
521
521
|
yarnWorkspace(pkg)
|
|
522
522
|
] : yarnWorkspaces();
|
|
@@ -524,7 +524,7 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
|
524
524
|
const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
|
|
525
525
|
const results = workspaces.map(({ location, name }) => {
|
|
526
526
|
try {
|
|
527
|
-
writeEntries(location, mergeEntries(readEntries(
|
|
527
|
+
writeEntries(location, mergeEntries(readEntries(cwd4), readEntries(location)));
|
|
528
528
|
return 0;
|
|
529
529
|
} catch (ex) {
|
|
530
530
|
const error = ex;
|
|
@@ -927,7 +927,6 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
927
927
|
}, "copyAssets");
|
|
928
928
|
|
|
929
929
|
// src/actions/cycle.ts
|
|
930
|
-
import { cwd } from "node:process";
|
|
931
930
|
import { ESLint } from "eslint";
|
|
932
931
|
var cycle = /* @__PURE__ */ __name(async () => {
|
|
933
932
|
const eslint = new ESLint({
|
|
@@ -948,10 +947,7 @@ var cycle = /* @__PURE__ */ __name(async () => {
|
|
|
948
947
|
"packages/**/src/**/*.ts*"
|
|
949
948
|
]);
|
|
950
949
|
const formatter = await eslint.loadFormatter("stylish");
|
|
951
|
-
const resultText = formatter.format(results
|
|
952
|
-
cwd: cwd(),
|
|
953
|
-
rulesMeta: {}
|
|
954
|
-
});
|
|
950
|
+
const resultText = formatter.format(results);
|
|
955
951
|
console.log(resultText);
|
|
956
952
|
return results.length;
|
|
957
953
|
}, "cycle");
|
|
@@ -1556,7 +1552,7 @@ var packagePublint = /* @__PURE__ */ __name(async (params) => {
|
|
|
1556
1552
|
}, "packagePublint");
|
|
1557
1553
|
|
|
1558
1554
|
// src/actions/package/compile/packageCompileTsc.ts
|
|
1559
|
-
import { cwd
|
|
1555
|
+
import { cwd } from "node:process";
|
|
1560
1556
|
import chalk22 from "chalk";
|
|
1561
1557
|
import { createProgramFromConfig } from "tsc-prog";
|
|
1562
1558
|
import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getLineAndCharacterOfPosition, getPreEmitDiagnostics } from "typescript";
|
|
@@ -1585,7 +1581,7 @@ var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tscon
|
|
|
1585
1581
|
|
|
1586
1582
|
// src/actions/package/compile/packageCompileTsc.ts
|
|
1587
1583
|
var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerOptionsParam) => {
|
|
1588
|
-
const pkg = process.env.INIT_CWD ??
|
|
1584
|
+
const pkg = process.env.INIT_CWD ?? cwd();
|
|
1589
1585
|
const publint2 = config2?.publint ?? true;
|
|
1590
1586
|
const verbose = config2?.verbose ?? false;
|
|
1591
1587
|
const formatHost = {
|
|
@@ -1608,7 +1604,7 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
|
|
|
1608
1604
|
}
|
|
1609
1605
|
};
|
|
1610
1606
|
const program = createProgramFromConfig({
|
|
1611
|
-
basePath: pkg ??
|
|
1607
|
+
basePath: pkg ?? cwd(),
|
|
1612
1608
|
compilerOptions,
|
|
1613
1609
|
exclude: [
|
|
1614
1610
|
"dist",
|
|
@@ -1675,12 +1671,12 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode, verbose = false) =
|
|
|
1675
1671
|
}, "buildEntries");
|
|
1676
1672
|
|
|
1677
1673
|
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
1678
|
-
import { cwd as
|
|
1674
|
+
import { cwd as cwd2 } from "node:process";
|
|
1679
1675
|
import chalk23 from "chalk";
|
|
1680
1676
|
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1681
1677
|
import { DiagnosticCategory as DiagnosticCategory2 } from "typescript";
|
|
1682
1678
|
var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose } = {}, compilerOptionsParam) => {
|
|
1683
|
-
const pkg = process.env.INIT_CWD ??
|
|
1679
|
+
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1684
1680
|
if (verbose) {
|
|
1685
1681
|
console.log(`Compiling types with TSC [${pkg}]`);
|
|
1686
1682
|
}
|
|
@@ -1698,7 +1694,7 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose }
|
|
|
1698
1694
|
};
|
|
1699
1695
|
const files = buildEntries(folder, "all");
|
|
1700
1696
|
const result = createProgramFromConfig2({
|
|
1701
|
-
basePath: pkg ??
|
|
1697
|
+
basePath: pkg ?? cwd2(),
|
|
1702
1698
|
compilerOptions,
|
|
1703
1699
|
exclude: [
|
|
1704
1700
|
"dist",
|
|
@@ -1930,7 +1926,7 @@ var packageCopyAssets = /* @__PURE__ */ __name(async ({ target }) => {
|
|
|
1930
1926
|
|
|
1931
1927
|
// src/actions/package/deps.ts
|
|
1932
1928
|
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
1933
|
-
import { cwd as
|
|
1929
|
+
import { cwd as cwd3 } from "node:process";
|
|
1934
1930
|
import chalk26 from "chalk";
|
|
1935
1931
|
import depcheck from "depcheck";
|
|
1936
1932
|
var special = depcheck.special;
|
|
@@ -2027,7 +2023,7 @@ var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
|
|
|
2027
2023
|
};
|
|
2028
2024
|
}, "analyzeDeps");
|
|
2029
2025
|
var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
2030
|
-
const pkg = process.env.INIT_CWD ??
|
|
2026
|
+
const pkg = process.env.INIT_CWD ?? cwd3();
|
|
2031
2027
|
const pkgName = process.env.npm_package_name;
|
|
2032
2028
|
const packageContent = existsSync5(`${pkg}/package.json`) ? JSON.parse(readFileSync5(`${pkg}/package.json`, {
|
|
2033
2029
|
encoding: "utf8"
|