@xylabs/ts-scripts-yarn3 4.0.7 → 4.2.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 +18 -163
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +6 -146
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/getCompilerOptions.mjs +3 -143
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +6 -146
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +3 -143
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +3 -143
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +3 -143
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/deps.mjs +0 -1
- package/dist/actions/package/deps.mjs.map +1 -1
- package/dist/actions/package/index.mjs +6 -147
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +6 -146
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/test.mjs +1 -1
- package/dist/actions/test.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +6 -146
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +6 -146
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +6 -146
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +3 -143
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +6 -146
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/deps.mjs +0 -1
- package/dist/bin/package/deps.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +6 -146
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs +4 -8
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs +4 -8
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +18 -163
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.mjs +3 -143
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/loadConfig.mjs +3 -143
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/xy/index.mjs +4 -8
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +4 -8
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +1 -1
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +1 -5
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +23 -28
- package/spec/yarn/workspace/tsconfig.json +1 -1
- package/src/actions/cycle.ts +1 -3
- package/src/actions/package/deps.ts +0 -1
- package/src/actions/test.ts +1 -1
- package/tsconfig.json +1 -2
package/dist/actions/cycle.mjs
CHANGED
|
@@ -2,7 +2,6 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
4
|
// src/actions/cycle.ts
|
|
5
|
-
import { cwd } from "node:process";
|
|
6
5
|
import { ESLint } from "eslint";
|
|
7
6
|
var cycle = /* @__PURE__ */ __name(async () => {
|
|
8
7
|
const eslint = new ESLint({
|
|
@@ -23,10 +22,7 @@ var cycle = /* @__PURE__ */ __name(async () => {
|
|
|
23
22
|
"packages/**/src/**/*.ts*"
|
|
24
23
|
]);
|
|
25
24
|
const formatter = await eslint.loadFormatter("stylish");
|
|
26
|
-
const resultText = formatter.format(results
|
|
27
|
-
cwd: cwd(),
|
|
28
|
-
rulesMeta: {}
|
|
29
|
-
});
|
|
25
|
+
const resultText = formatter.format(results);
|
|
30
26
|
console.log(resultText);
|
|
31
27
|
return results.length;
|
|
32
28
|
}, "cycle");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/cycle.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/actions/cycle.ts"],"sourcesContent":["import { ESLint } from 'eslint'\n\nexport const cycle = async () => {\n const eslint = new ESLint({\n fix: false,\n overrideConfig: { rules: { 'import-x/no-cycle': ['error', { maxDepth: 10 }] } },\n })\n const results = await eslint.lintFiles(['src/**/*.ts*', 'packages/**/src/**/*.ts*'])\n\n const formatter = await eslint.loadFormatter('stylish')\n const resultText = formatter.format(results)\n console.log(resultText)\n\n return results.length\n}\n"],"mappings":";;;;AAAA,SAASA,cAAc;AAEhB,IAAMC,QAAQ,mCAAA;AACnB,QAAMC,SAAS,IAAIC,OAAO;IACxBC,KAAK;IACLC,gBAAgB;MAAEC,OAAO;QAAE,qBAAqB;UAAC;UAAS;YAAEC,UAAU;UAAG;;MAAG;IAAE;EAChF,CAAA;AACA,QAAMC,UAAU,MAAMN,OAAOO,UAAU;IAAC;IAAgB;GAA2B;AAEnF,QAAMC,YAAY,MAAMR,OAAOS,cAAc,SAAA;AAC7C,QAAMC,aAAaF,UAAUG,OAAOL,OAAAA;AACpCM,UAAQC,IAAIH,UAAAA;AAEZ,SAAOJ,QAAQQ;AACjB,GAZqB;","names":["ESLint","cycle","eslint","ESLint","fix","overrideConfig","rules","maxDepth","results","lintFiles","formatter","loadFormatter","resultText","format","console","log","length"]}
|
package/dist/actions/index.mjs
CHANGED
|
@@ -1,145 +1,5 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/deepmerge/dist/cjs.js
|
|
29
|
-
var require_cjs = __commonJS({
|
|
30
|
-
"../../node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
31
|
-
"use strict";
|
|
32
|
-
var isMergeableObject = /* @__PURE__ */ __name(function isMergeableObject2(value) {
|
|
33
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
34
|
-
}, "isMergeableObject");
|
|
35
|
-
function isNonNullObject(value) {
|
|
36
|
-
return !!value && typeof value === "object";
|
|
37
|
-
}
|
|
38
|
-
__name(isNonNullObject, "isNonNullObject");
|
|
39
|
-
function isSpecial(value) {
|
|
40
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
41
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
42
|
-
}
|
|
43
|
-
__name(isSpecial, "isSpecial");
|
|
44
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
45
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
46
|
-
function isReactElement(value) {
|
|
47
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
48
|
-
}
|
|
49
|
-
__name(isReactElement, "isReactElement");
|
|
50
|
-
function emptyTarget(val) {
|
|
51
|
-
return Array.isArray(val) ? [] : {};
|
|
52
|
-
}
|
|
53
|
-
__name(emptyTarget, "emptyTarget");
|
|
54
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
55
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge3(emptyTarget(value), value, options) : value;
|
|
56
|
-
}
|
|
57
|
-
__name(cloneUnlessOtherwiseSpecified, "cloneUnlessOtherwiseSpecified");
|
|
58
|
-
function defaultArrayMerge(target, source, options) {
|
|
59
|
-
return target.concat(source).map(function(element) {
|
|
60
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
__name(defaultArrayMerge, "defaultArrayMerge");
|
|
64
|
-
function getMergeFunction(key, options) {
|
|
65
|
-
if (!options.customMerge) {
|
|
66
|
-
return deepmerge3;
|
|
67
|
-
}
|
|
68
|
-
var customMerge = options.customMerge(key);
|
|
69
|
-
return typeof customMerge === "function" ? customMerge : deepmerge3;
|
|
70
|
-
}
|
|
71
|
-
__name(getMergeFunction, "getMergeFunction");
|
|
72
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
73
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
74
|
-
return Object.propertyIsEnumerable.call(target, symbol);
|
|
75
|
-
}) : [];
|
|
76
|
-
}
|
|
77
|
-
__name(getEnumerableOwnPropertySymbols, "getEnumerableOwnPropertySymbols");
|
|
78
|
-
function getKeys(target) {
|
|
79
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
80
|
-
}
|
|
81
|
-
__name(getKeys, "getKeys");
|
|
82
|
-
function propertyIsOnObject(object, property) {
|
|
83
|
-
try {
|
|
84
|
-
return property in object;
|
|
85
|
-
} catch (_) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
__name(propertyIsOnObject, "propertyIsOnObject");
|
|
90
|
-
function propertyIsUnsafe(target, key) {
|
|
91
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
92
|
-
}
|
|
93
|
-
__name(propertyIsUnsafe, "propertyIsUnsafe");
|
|
94
|
-
function mergeObject(target, source, options) {
|
|
95
|
-
var destination = {};
|
|
96
|
-
if (options.isMergeableObject(target)) {
|
|
97
|
-
getKeys(target).forEach(function(key) {
|
|
98
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
getKeys(source).forEach(function(key) {
|
|
102
|
-
if (propertyIsUnsafe(target, key)) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
106
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
107
|
-
} else {
|
|
108
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
return destination;
|
|
112
|
-
}
|
|
113
|
-
__name(mergeObject, "mergeObject");
|
|
114
|
-
function deepmerge3(target, source, options) {
|
|
115
|
-
options = options || {};
|
|
116
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
117
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
118
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
119
|
-
var sourceIsArray = Array.isArray(source);
|
|
120
|
-
var targetIsArray = Array.isArray(target);
|
|
121
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
122
|
-
if (!sourceAndTargetTypesMatch) {
|
|
123
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
124
|
-
} else if (sourceIsArray) {
|
|
125
|
-
return options.arrayMerge(target, source, options);
|
|
126
|
-
} else {
|
|
127
|
-
return mergeObject(target, source, options);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
__name(deepmerge3, "deepmerge");
|
|
131
|
-
deepmerge3.all = /* @__PURE__ */ __name(function deepmergeAll(array, options) {
|
|
132
|
-
if (!Array.isArray(array)) {
|
|
133
|
-
throw new Error("first argument should be an array");
|
|
134
|
-
}
|
|
135
|
-
return array.reduce(function(prev, next) {
|
|
136
|
-
return deepmerge3(prev, next, options);
|
|
137
|
-
}, {});
|
|
138
|
-
}, "deepmergeAll");
|
|
139
|
-
var deepmerge_1 = deepmerge3;
|
|
140
|
-
module.exports = deepmerge_1;
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
3
|
|
|
144
4
|
// src/actions/build.ts
|
|
145
5
|
import chalk8 from "chalk";
|
|
@@ -446,7 +306,7 @@ var mergeEntries = /* @__PURE__ */ __name((a, b) => [
|
|
|
446
306
|
].sort(), "mergeEntries");
|
|
447
307
|
var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
448
308
|
console.log(chalk4.green(`Generate ${filename3} Files`));
|
|
449
|
-
const
|
|
309
|
+
const cwd4 = INIT_CWD() ?? ".";
|
|
450
310
|
const workspaces = pkg ? [
|
|
451
311
|
yarnWorkspace(pkg)
|
|
452
312
|
] : yarnWorkspaces();
|
|
@@ -454,7 +314,7 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
|
454
314
|
const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
|
|
455
315
|
const results = workspaces.map(({ location, name }) => {
|
|
456
316
|
try {
|
|
457
|
-
writeEntries(location, mergeEntries(readEntries(
|
|
317
|
+
writeEntries(location, mergeEntries(readEntries(cwd4), readEntries(location)));
|
|
458
318
|
return 0;
|
|
459
319
|
} catch (ex) {
|
|
460
320
|
const error = ex;
|
|
@@ -467,13 +327,13 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
|
467
327
|
}, "generateIgnoreFiles");
|
|
468
328
|
|
|
469
329
|
// src/lib/loadConfig.ts
|
|
470
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
471
330
|
import chalk5 from "chalk";
|
|
472
331
|
import { cosmiconfig } from "cosmiconfig";
|
|
332
|
+
import deepmerge from "deepmerge";
|
|
473
333
|
var config;
|
|
474
334
|
var loadConfig = /* @__PURE__ */ __name(async (params) => {
|
|
475
335
|
if (config) {
|
|
476
|
-
return (
|
|
336
|
+
return deepmerge(config, params ?? {});
|
|
477
337
|
}
|
|
478
338
|
const cosmicConfigResult = await cosmiconfig("xy", {
|
|
479
339
|
cache: true
|
|
@@ -483,7 +343,7 @@ var loadConfig = /* @__PURE__ */ __name(async (params) => {
|
|
|
483
343
|
if (configFilePath) {
|
|
484
344
|
console.log(chalk5.gray(`Loading config from ${configFilePath}`));
|
|
485
345
|
}
|
|
486
|
-
return (
|
|
346
|
+
return deepmerge(config, params ?? {});
|
|
487
347
|
}, "loadConfig");
|
|
488
348
|
|
|
489
349
|
// src/lib/parsedPackageJSON.ts
|
|
@@ -833,7 +693,6 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
833
693
|
}, "copyAssets");
|
|
834
694
|
|
|
835
695
|
// src/actions/cycle.ts
|
|
836
|
-
import { cwd } from "node:process";
|
|
837
696
|
import { ESLint } from "eslint";
|
|
838
697
|
var cycle = /* @__PURE__ */ __name(async () => {
|
|
839
698
|
const eslint = new ESLint({
|
|
@@ -854,10 +713,7 @@ var cycle = /* @__PURE__ */ __name(async () => {
|
|
|
854
713
|
"packages/**/src/**/*.ts*"
|
|
855
714
|
]);
|
|
856
715
|
const formatter = await eslint.loadFormatter("stylish");
|
|
857
|
-
const resultText = formatter.format(results
|
|
858
|
-
cwd: cwd(),
|
|
859
|
-
rulesMeta: {}
|
|
860
|
-
});
|
|
716
|
+
const resultText = formatter.format(results);
|
|
861
717
|
console.log(resultText);
|
|
862
718
|
return results.length;
|
|
863
719
|
}, "cycle");
|
|
@@ -1462,20 +1318,20 @@ var packagePublint = /* @__PURE__ */ __name(async (params) => {
|
|
|
1462
1318
|
}, "packagePublint");
|
|
1463
1319
|
|
|
1464
1320
|
// src/actions/package/compile/packageCompileTsc.ts
|
|
1465
|
-
import { cwd
|
|
1321
|
+
import { cwd } from "node:process";
|
|
1466
1322
|
import chalk21 from "chalk";
|
|
1467
1323
|
import { createProgramFromConfig } from "tsc-prog";
|
|
1468
1324
|
import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getLineAndCharacterOfPosition, getPreEmitDiagnostics } from "typescript";
|
|
1469
1325
|
|
|
1470
1326
|
// src/actions/package/compile/getCompilerOptions.ts
|
|
1471
|
-
var import_deepmerge2 = __toESM(require_cjs(), 1);
|
|
1472
1327
|
import { createRequire } from "node:module";
|
|
1328
|
+
import deepmerge2 from "deepmerge";
|
|
1473
1329
|
import { findConfigFile, readConfigFile, sys } from "typescript";
|
|
1474
1330
|
var getNested = /* @__PURE__ */ __name((config2) => {
|
|
1475
1331
|
if (config2.extends) {
|
|
1476
1332
|
const require2 = createRequire(import.meta.url);
|
|
1477
1333
|
const opts = require2(config2.extends);
|
|
1478
|
-
return (
|
|
1334
|
+
return deepmerge2(getNested(opts), config2.compilerOptions ?? {});
|
|
1479
1335
|
}
|
|
1480
1336
|
return config2.compilerOptions;
|
|
1481
1337
|
}, "getNested");
|
|
@@ -1486,12 +1342,12 @@ var getCompilerOptionsJSONFollowExtends = /* @__PURE__ */ __name((filename3) =>
|
|
|
1486
1342
|
var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tsconfig.json") => {
|
|
1487
1343
|
const configFileName = findConfigFile("./", sys.fileExists, tsconfig);
|
|
1488
1344
|
const configFileCompilerOptions = (configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0) ?? {};
|
|
1489
|
-
return (
|
|
1345
|
+
return deepmerge2(configFileCompilerOptions, options);
|
|
1490
1346
|
}, "getCompilerOptions");
|
|
1491
1347
|
|
|
1492
1348
|
// src/actions/package/compile/packageCompileTsc.ts
|
|
1493
1349
|
var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerOptionsParam) => {
|
|
1494
|
-
const pkg = process.env.INIT_CWD ??
|
|
1350
|
+
const pkg = process.env.INIT_CWD ?? cwd();
|
|
1495
1351
|
const publint2 = config2?.publint ?? true;
|
|
1496
1352
|
const verbose = config2?.verbose ?? false;
|
|
1497
1353
|
const formatHost = {
|
|
@@ -1514,7 +1370,7 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
|
|
|
1514
1370
|
}
|
|
1515
1371
|
};
|
|
1516
1372
|
const program = createProgramFromConfig({
|
|
1517
|
-
basePath: pkg ??
|
|
1373
|
+
basePath: pkg ?? cwd(),
|
|
1518
1374
|
compilerOptions,
|
|
1519
1375
|
exclude: [
|
|
1520
1376
|
"dist",
|
|
@@ -1581,12 +1437,12 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode, verbose = false) =
|
|
|
1581
1437
|
}, "buildEntries");
|
|
1582
1438
|
|
|
1583
1439
|
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
1584
|
-
import { cwd as
|
|
1440
|
+
import { cwd as cwd2 } from "node:process";
|
|
1585
1441
|
import chalk22 from "chalk";
|
|
1586
1442
|
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1587
1443
|
import { DiagnosticCategory as DiagnosticCategory2 } from "typescript";
|
|
1588
1444
|
var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose } = {}, compilerOptionsParam) => {
|
|
1589
|
-
const pkg = process.env.INIT_CWD ??
|
|
1445
|
+
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1590
1446
|
if (verbose) {
|
|
1591
1447
|
console.log(`Compiling types with TSC [${pkg}]`);
|
|
1592
1448
|
}
|
|
@@ -1604,7 +1460,7 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose }
|
|
|
1604
1460
|
};
|
|
1605
1461
|
const files = buildEntries(folder, "all");
|
|
1606
1462
|
const result = createProgramFromConfig2({
|
|
1607
|
-
basePath: pkg ??
|
|
1463
|
+
basePath: pkg ?? cwd2(),
|
|
1608
1464
|
compilerOptions,
|
|
1609
1465
|
exclude: [
|
|
1610
1466
|
"dist",
|
|
@@ -1836,7 +1692,7 @@ var packageCopyAssets = /* @__PURE__ */ __name(async ({ target }) => {
|
|
|
1836
1692
|
|
|
1837
1693
|
// src/actions/package/deps.ts
|
|
1838
1694
|
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs";
|
|
1839
|
-
import { cwd as
|
|
1695
|
+
import { cwd as cwd3 } from "node:process";
|
|
1840
1696
|
import chalk25 from "chalk";
|
|
1841
1697
|
import depcheck from "depcheck";
|
|
1842
1698
|
var special = depcheck.special;
|
|
@@ -1851,7 +1707,6 @@ var defaultIgnoreDevDeps = [
|
|
|
1851
1707
|
"@xylabs/tsconfig",
|
|
1852
1708
|
"@xylabs/tsconfig-dom",
|
|
1853
1709
|
"@xylabs/tsconfig-react",
|
|
1854
|
-
"@xylabs/tsconfig-jest",
|
|
1855
1710
|
"typescript"
|
|
1856
1711
|
];
|
|
1857
1712
|
var defaultIgnoreDevPatterns = [
|
|
@@ -1933,7 +1788,7 @@ var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
|
|
|
1933
1788
|
};
|
|
1934
1789
|
}, "analyzeDeps");
|
|
1935
1790
|
var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
1936
|
-
const pkg = process.env.INIT_CWD ??
|
|
1791
|
+
const pkg = process.env.INIT_CWD ?? cwd3();
|
|
1937
1792
|
const pkgName = process.env.npm_package_name;
|
|
1938
1793
|
const packageContent = existsSync4(`${pkg}/package.json`) ? JSON.parse(readFileSync3(`${pkg}/package.json`, {
|
|
1939
1794
|
encoding: "utf8"
|
|
@@ -2379,7 +2234,7 @@ var test = /* @__PURE__ */ __name(() => {
|
|
|
2379
2234
|
[
|
|
2380
2235
|
"yarn",
|
|
2381
2236
|
[
|
|
2382
|
-
"
|
|
2237
|
+
"vitest",
|
|
2383
2238
|
"."
|
|
2384
2239
|
]
|
|
2385
2240
|
]
|