@xylabs/ts-scripts-yarn3 4.0.0-rc.17 → 4.0.0-rc.19
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/index.mjs +14 -19
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +14 -19
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +14 -19
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/index.mjs +14 -19
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +14 -19
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +14 -19
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +14 -19
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +14 -19
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/index.mjs +14 -19
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.mjs +143 -8
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/loadConfig.mjs +143 -8
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/package.json +4 -4
- package/src/lib/loadConfig.ts +3 -2
package/dist/actions/index.mjs
CHANGED
|
@@ -52,7 +52,7 @@ var require_cjs = __commonJS({
|
|
|
52
52
|
}
|
|
53
53
|
__name(emptyTarget, "emptyTarget");
|
|
54
54
|
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
55
|
-
return options.clone !== false && options.isMergeableObject(value) ?
|
|
55
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge3(emptyTarget(value), value, options) : value;
|
|
56
56
|
}
|
|
57
57
|
__name(cloneUnlessOtherwiseSpecified, "cloneUnlessOtherwiseSpecified");
|
|
58
58
|
function defaultArrayMerge(target, source, options) {
|
|
@@ -63,10 +63,10 @@ var require_cjs = __commonJS({
|
|
|
63
63
|
__name(defaultArrayMerge, "defaultArrayMerge");
|
|
64
64
|
function getMergeFunction(key, options) {
|
|
65
65
|
if (!options.customMerge) {
|
|
66
|
-
return
|
|
66
|
+
return deepmerge3;
|
|
67
67
|
}
|
|
68
68
|
var customMerge = options.customMerge(key);
|
|
69
|
-
return typeof customMerge === "function" ? customMerge :
|
|
69
|
+
return typeof customMerge === "function" ? customMerge : deepmerge3;
|
|
70
70
|
}
|
|
71
71
|
__name(getMergeFunction, "getMergeFunction");
|
|
72
72
|
function getEnumerableOwnPropertySymbols(target) {
|
|
@@ -111,7 +111,7 @@ var require_cjs = __commonJS({
|
|
|
111
111
|
return destination;
|
|
112
112
|
}
|
|
113
113
|
__name(mergeObject, "mergeObject");
|
|
114
|
-
function
|
|
114
|
+
function deepmerge3(target, source, options) {
|
|
115
115
|
options = options || {};
|
|
116
116
|
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
117
117
|
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
@@ -127,16 +127,16 @@ var require_cjs = __commonJS({
|
|
|
127
127
|
return mergeObject(target, source, options);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
__name(
|
|
131
|
-
|
|
130
|
+
__name(deepmerge3, "deepmerge");
|
|
131
|
+
deepmerge3.all = /* @__PURE__ */ __name(function deepmergeAll(array, options) {
|
|
132
132
|
if (!Array.isArray(array)) {
|
|
133
133
|
throw new Error("first argument should be an array");
|
|
134
134
|
}
|
|
135
135
|
return array.reduce(function(prev, next) {
|
|
136
|
-
return
|
|
136
|
+
return deepmerge3(prev, next, options);
|
|
137
137
|
}, {});
|
|
138
138
|
}, "deepmergeAll");
|
|
139
|
-
var deepmerge_1 =
|
|
139
|
+
var deepmerge_1 = deepmerge3;
|
|
140
140
|
module.exports = deepmerge_1;
|
|
141
141
|
}
|
|
142
142
|
});
|
|
@@ -467,15 +467,13 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
|
467
467
|
}, "generateIgnoreFiles");
|
|
468
468
|
|
|
469
469
|
// src/lib/loadConfig.ts
|
|
470
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
470
471
|
import chalk5 from "chalk";
|
|
471
472
|
import { cosmiconfig } from "cosmiconfig";
|
|
472
473
|
var config;
|
|
473
474
|
var loadConfig = /* @__PURE__ */ __name(async (params) => {
|
|
474
475
|
if (config) {
|
|
475
|
-
return {
|
|
476
|
-
...config,
|
|
477
|
-
...params
|
|
478
|
-
};
|
|
476
|
+
return (0, import_deepmerge.default)(config, params ?? {});
|
|
479
477
|
}
|
|
480
478
|
const cosmicConfigResult = await cosmiconfig("xy", {
|
|
481
479
|
cache: true
|
|
@@ -485,10 +483,7 @@ var loadConfig = /* @__PURE__ */ __name(async (params) => {
|
|
|
485
483
|
if (configFilePath) {
|
|
486
484
|
console.log(chalk5.gray(`Loading config from ${configFilePath}`));
|
|
487
485
|
}
|
|
488
|
-
return {
|
|
489
|
-
...config,
|
|
490
|
-
...params
|
|
491
|
-
};
|
|
486
|
+
return (0, import_deepmerge.default)(config, params ?? {});
|
|
492
487
|
}, "loadConfig");
|
|
493
488
|
|
|
494
489
|
// src/lib/parsedPackageJSON.ts
|
|
@@ -1466,14 +1461,14 @@ import { createProgramFromConfig } from "tsc-prog";
|
|
|
1466
1461
|
import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getLineAndCharacterOfPosition, getPreEmitDiagnostics } from "typescript";
|
|
1467
1462
|
|
|
1468
1463
|
// src/actions/package/compile/getCompilerOptions.ts
|
|
1469
|
-
var
|
|
1464
|
+
var import_deepmerge2 = __toESM(require_cjs(), 1);
|
|
1470
1465
|
import { createRequire } from "node:module";
|
|
1471
1466
|
import { findConfigFile, readConfigFile, sys } from "typescript";
|
|
1472
1467
|
var getNested = /* @__PURE__ */ __name((config2) => {
|
|
1473
1468
|
if (config2.extends) {
|
|
1474
1469
|
const require2 = createRequire(import.meta.url);
|
|
1475
1470
|
const opts = require2(config2.extends);
|
|
1476
|
-
return (0,
|
|
1471
|
+
return (0, import_deepmerge2.default)(getNested(opts), config2.compilerOptions ?? {});
|
|
1477
1472
|
}
|
|
1478
1473
|
return config2.compilerOptions;
|
|
1479
1474
|
}, "getNested");
|
|
@@ -1484,7 +1479,7 @@ var getCompilerOptionsJSONFollowExtends = /* @__PURE__ */ __name((filename3) =>
|
|
|
1484
1479
|
var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tsconfig.json") => {
|
|
1485
1480
|
const configFileName = findConfigFile("./", sys.fileExists, tsconfig);
|
|
1486
1481
|
const configFileCompilerOptions = (configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0) ?? {};
|
|
1487
|
-
return (0,
|
|
1482
|
+
return (0, import_deepmerge2.default)(configFileCompilerOptions, options);
|
|
1488
1483
|
}, "getCompilerOptions");
|
|
1489
1484
|
|
|
1490
1485
|
// src/actions/package/compile/packageCompileTsc.ts
|