@xylabs/ts-scripts-yarn3 4.0.0-rc.15 → 4.0.0-rc.16

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.
@@ -1,5 +1,145 @@
1
+ var __create = Object.create;
1
2
  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;
2
7
  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) ? deepmerge2(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 deepmerge2;
67
+ }
68
+ var customMerge = options.customMerge(key);
69
+ return typeof customMerge === "function" ? customMerge : deepmerge2;
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 deepmerge2(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(deepmerge2, "deepmerge");
131
+ deepmerge2.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 deepmerge2(prev, next, options);
137
+ }, {});
138
+ }, "deepmergeAll");
139
+ var deepmerge_1 = deepmerge2;
140
+ module.exports = deepmerge_1;
141
+ }
142
+ });
3
143
 
4
144
  // src/actions/build.ts
5
145
  import chalk8 from "chalk";
@@ -1326,6 +1466,7 @@ import { createProgramFromConfig } from "tsc-prog";
1326
1466
  import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getLineAndCharacterOfPosition, getPreEmitDiagnostics } from "typescript";
1327
1467
 
1328
1468
  // src/actions/package/compile/getCompilerOptions.ts
1469
+ var import_deepmerge = __toESM(require_cjs(), 1);
1329
1470
  import { createRequire } from "node:module";
1330
1471
  import { findConfigFile, readConfigFile, sys } from "typescript";
1331
1472
  var getNested = /* @__PURE__ */ __name((config2) => {
@@ -1343,13 +1484,10 @@ var getCompilerOptionsJSONFollowExtends = /* @__PURE__ */ __name((filename3) =>
1343
1484
  const config2 = readConfigFile(filename3, sys.readFile).config;
1344
1485
  return getNested(config2);
1345
1486
  }, "getCompilerOptionsJSONFollowExtends");
1346
- var getCompilerOptions = /* @__PURE__ */ __name((options, tsconfig = "tsconfig.json") => {
1487
+ var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tsconfig.json") => {
1347
1488
  const configFileName = findConfigFile("./", sys.fileExists, tsconfig);
1348
- const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0;
1349
- return {
1350
- ...configFileCompilerOptions,
1351
- ...options
1352
- };
1489
+ const configFileCompilerOptions = (configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0) ?? {};
1490
+ return (0, import_deepmerge.default)(configFileCompilerOptions, options);
1353
1491
  }, "getCompilerOptions");
1354
1492
 
1355
1493
  // src/actions/package/compile/packageCompileTsc.ts