@xylabs/ts-scripts-yarn3 4.0.0-rc.8 → 4.0.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.
Files changed (199) hide show
  1. package/dist/actions/build.mjs.map +1 -1
  2. package/dist/actions/clean-docs.mjs +14 -4
  3. package/dist/actions/clean-docs.mjs.map +1 -1
  4. package/dist/actions/clean-eslint.mjs +16 -4
  5. package/dist/actions/clean-eslint.mjs.map +1 -1
  6. package/dist/actions/clean-jest.mjs.map +1 -1
  7. package/dist/actions/clean.mjs.map +1 -1
  8. package/dist/actions/compile.mjs +3 -2
  9. package/dist/actions/compile.mjs.map +1 -1
  10. package/dist/actions/copy-assets.mjs.map +1 -1
  11. package/dist/actions/cycle.mjs +25 -110
  12. package/dist/actions/cycle.mjs.map +1 -1
  13. package/dist/actions/dead.mjs.map +1 -1
  14. package/dist/actions/deploy-major.mjs.map +1 -1
  15. package/dist/actions/deploy-minor.mjs.map +1 -1
  16. package/dist/actions/deploy-next.mjs.map +1 -1
  17. package/dist/actions/deploy.mjs.map +1 -1
  18. package/dist/actions/deps.mjs.map +1 -1
  19. package/dist/actions/dupdeps.mjs +3 -2
  20. package/dist/actions/dupdeps.mjs.map +1 -1
  21. package/dist/actions/fix.mjs.map +1 -1
  22. package/dist/actions/gen-docs.mjs.map +1 -1
  23. package/dist/actions/gitignore-gen.mjs.map +1 -1
  24. package/dist/actions/index.mjs +227 -56
  25. package/dist/actions/index.mjs.map +1 -1
  26. package/dist/actions/license.mjs.map +1 -1
  27. package/dist/actions/lint-clean.mjs.map +1 -1
  28. package/dist/actions/lint-profile.mjs.map +1 -1
  29. package/dist/actions/lint.mjs.map +1 -1
  30. package/dist/actions/npmignore-gen.mjs.map +1 -1
  31. package/dist/actions/package/clean-outputs.mjs +16 -2
  32. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  33. package/dist/actions/package/clean-typescript.mjs +16 -2
  34. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  35. package/dist/actions/package/clean.mjs +17 -4
  36. package/dist/actions/package/clean.mjs.map +1 -1
  37. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  38. package/dist/actions/package/compile/compile.mjs +151 -11
  39. package/dist/actions/package/compile/compile.mjs.map +1 -1
  40. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  41. package/dist/actions/package/compile/getCompilerOptions.mjs +145 -8
  42. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  43. package/dist/actions/package/compile/index.mjs +151 -11
  44. package/dist/actions/package/compile/index.mjs.map +1 -1
  45. package/dist/actions/package/compile/packageCompileTsc.mjs +148 -8
  46. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  47. package/dist/actions/package/compile/packageCompileTscTypes.mjs +145 -8
  48. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  49. package/dist/actions/package/compile/packageCompileTsup.mjs +3 -0
  50. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  51. package/dist/actions/package/copy-assets.mjs.map +1 -1
  52. package/dist/actions/package/deps.mjs.map +1 -1
  53. package/dist/actions/package/gen-docs.mjs.map +1 -1
  54. package/dist/actions/package/index.mjs +205 -52
  55. package/dist/actions/package/index.mjs.map +1 -1
  56. package/dist/actions/package/publint.mjs +3 -0
  57. package/dist/actions/package/publint.mjs.map +1 -1
  58. package/dist/actions/package/recompile.mjs +192 -39
  59. package/dist/actions/package/recompile.mjs.map +1 -1
  60. package/dist/actions/publint.mjs.map +1 -1
  61. package/dist/actions/rebuild.mjs.map +1 -1
  62. package/dist/actions/recompile.mjs +14 -1
  63. package/dist/actions/recompile.mjs.map +1 -1
  64. package/dist/actions/reinstall.mjs.map +1 -1
  65. package/dist/actions/relint.mjs.map +1 -1
  66. package/dist/actions/retest.mjs.map +1 -1
  67. package/dist/actions/sonar.mjs.map +1 -1
  68. package/dist/actions/statics.mjs +3 -2
  69. package/dist/actions/statics.mjs.map +1 -1
  70. package/dist/actions/test.mjs.map +1 -1
  71. package/dist/actions/up.mjs.map +1 -1
  72. package/dist/actions/updo.mjs.map +1 -1
  73. package/dist/actions/upplug.mjs.map +1 -1
  74. package/dist/actions/upyarn.mjs.map +1 -1
  75. package/dist/actions/yarn3only.mjs.map +1 -1
  76. package/dist/bin/package/clean-outputs.mjs +14 -2
  77. package/dist/bin/package/clean-outputs.mjs.map +1 -1
  78. package/dist/bin/package/clean-typescript.mjs +14 -2
  79. package/dist/bin/package/clean-typescript.mjs.map +1 -1
  80. package/dist/bin/package/clean.mjs +15 -4
  81. package/dist/bin/package/clean.mjs.map +1 -1
  82. package/dist/bin/package/compile-only.mjs +151 -11
  83. package/dist/bin/package/compile-only.mjs.map +1 -1
  84. package/dist/bin/package/compile-tsup.mjs +3 -0
  85. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  86. package/dist/bin/package/compile.mjs +151 -11
  87. package/dist/bin/package/compile.mjs.map +1 -1
  88. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  89. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  90. package/dist/bin/package/deps.mjs.map +1 -1
  91. package/dist/bin/package/gen-docs.mjs.map +1 -1
  92. package/dist/bin/package/publint.mjs +3 -0
  93. package/dist/bin/package/publint.mjs.map +1 -1
  94. package/dist/bin/package/recompile.mjs +170 -19
  95. package/dist/bin/package/recompile.mjs.map +1 -1
  96. package/dist/bin/xy-ts.mjs +66 -33
  97. package/dist/bin/xy-ts.mjs.map +1 -1
  98. package/dist/bin/xy.mjs +66 -33
  99. package/dist/bin/xy.mjs.map +1 -1
  100. package/dist/index.d.ts +11 -9
  101. package/dist/index.mjs +230 -58
  102. package/dist/index.mjs.map +1 -1
  103. package/dist/lib/createBuildConfig.mjs.map +1 -1
  104. package/dist/lib/defaultBuildConfig.mjs.map +1 -1
  105. package/dist/lib/deleteGlob.mjs +19 -0
  106. package/dist/lib/deleteGlob.mjs.map +1 -0
  107. package/dist/lib/dependencies/DuplicateDetector.mjs +3 -2
  108. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  109. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +3 -2
  110. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  111. package/dist/lib/dependencies/index.mjs +3 -2
  112. package/dist/lib/dependencies/index.mjs.map +1 -1
  113. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  114. package/dist/lib/file/fileLines.mjs.map +1 -1
  115. package/dist/lib/file/index.mjs.map +1 -1
  116. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  117. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  118. package/dist/lib/index.mjs +160 -5
  119. package/dist/lib/index.mjs.map +1 -1
  120. package/dist/lib/loadConfig.mjs +143 -3
  121. package/dist/lib/loadConfig.mjs.map +1 -1
  122. package/dist/lib/processEx.mjs.map +1 -1
  123. package/dist/lib/runSteps.mjs.map +1 -1
  124. package/dist/lib/runStepsAsync.mjs.map +1 -1
  125. package/dist/lib/runXy.mjs.map +1 -1
  126. package/dist/lib/safeExit.mjs.map +1 -1
  127. package/dist/lib/withErrnoException.mjs.map +1 -1
  128. package/dist/lib/yarn/index.mjs.map +1 -1
  129. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  130. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  131. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  132. package/dist/loadPackageConfig.mjs.map +1 -1
  133. package/dist/xy/index.mjs +66 -33
  134. package/dist/xy/index.mjs.map +1 -1
  135. package/dist/xy/param.mjs.map +1 -1
  136. package/dist/xy/xy.mjs +66 -33
  137. package/dist/xy/xy.mjs.map +1 -1
  138. package/dist/xy/xyBuildCommands.mjs +17 -3
  139. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  140. package/dist/xy/xyCommonCommands.mjs +14 -4
  141. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  142. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  143. package/dist/xy/xyInstallCommands.mjs +3 -2
  144. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  145. package/dist/xy/xyLintCommands.mjs +30 -22
  146. package/dist/xy/xyLintCommands.mjs.map +1 -1
  147. package/dist/xy/xyParseOptions.mjs.map +1 -1
  148. package/package.json +53 -55
  149. package/src/actions/build.ts +3 -1
  150. package/src/actions/clean-docs.ts +2 -3
  151. package/src/actions/clean-eslint.ts +3 -2
  152. package/src/actions/clean.ts +3 -1
  153. package/src/actions/compile.ts +13 -3
  154. package/src/actions/cycle.ts +15 -4
  155. package/src/actions/deps.ts +6 -5
  156. package/src/actions/gen-docs.ts +3 -4
  157. package/src/actions/package/clean-outputs.ts +3 -2
  158. package/src/actions/package/clean-typescript.ts +3 -2
  159. package/src/actions/package/compile/XyConfig.ts +5 -13
  160. package/src/actions/package/compile/buildEntries.ts +1 -1
  161. package/src/actions/package/compile/compile.ts +3 -1
  162. package/src/actions/package/compile/copyTypeFiles.ts +1 -1
  163. package/src/actions/package/compile/getCompilerOptions.ts +10 -8
  164. package/src/actions/package/compile/packageCompileTsc.ts +11 -6
  165. package/src/actions/package/compile/packageCompileTscTypes.ts +5 -3
  166. package/src/actions/package/compile/packageCompileTsup.ts +6 -3
  167. package/src/actions/package/copy-assets.ts +1 -3
  168. package/src/actions/package/deps.ts +6 -2
  169. package/src/actions/package/gen-docs.ts +3 -1
  170. package/src/actions/package/publint.ts +8 -5
  171. package/src/actions/publint.ts +3 -1
  172. package/src/actions/recompile.ts +47 -8
  173. package/src/actions/reinstall.ts +3 -1
  174. package/src/lib/defaultBuildConfig.ts +11 -1
  175. package/src/lib/deleteGlob.ts +13 -0
  176. package/src/lib/dependencies/DuplicateDetector.ts +4 -4
  177. package/src/lib/file/ReadFileSyncOptions.ts +4 -1
  178. package/src/lib/file/fileLines.ts +9 -3
  179. package/src/lib/file/tryReadFileSync.ts +4 -2
  180. package/src/lib/generateIgnoreFiles.ts +3 -1
  181. package/src/lib/index.ts +1 -0
  182. package/src/lib/loadConfig.ts +3 -4
  183. package/src/lib/runSteps.ts +2 -1
  184. package/src/lib/runStepsAsync.ts +1 -1
  185. package/src/lib/runXy.ts +4 -1
  186. package/src/lib/withErrnoException.ts +3 -1
  187. package/src/lib/yarn/workspace/yarnWorkspace.ts +1 -1
  188. package/src/lib/yarn/workspace/yarnWorkspaces.ts +1 -1
  189. package/src/loadPackageConfig.ts +1 -1
  190. package/src/types.d.ts +23 -0
  191. package/src/xy/param.ts +2 -4
  192. package/src/xy/xyBuildCommands.ts +10 -20
  193. package/src/xy/xyCommonCommands.ts +4 -2
  194. package/src/xy/xyDeployCommands.ts +4 -2
  195. package/src/xy/xyInstallCommands.ts +5 -5
  196. package/src/xy/xyLintCommands.ts +6 -4
  197. package/src/xy/xyParseOptions.ts +3 -2
  198. package/tsup.config.ts +2 -6
  199. package/xy.config.ts +1 -5
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ interface BuildParams {
12
12
  target?: 'esm' | 'cjs';
13
13
  verbose?: boolean;
14
14
  }
15
- declare const build: ({ incremental, jobs, target, verbose, pkg }: BuildParams) => Promise<number>;
15
+ declare const build: ({ incremental, jobs, target, verbose, pkg, }: BuildParams) => Promise<number>;
16
16
 
17
17
  interface CleanParams {
18
18
  pkg?: string;
@@ -42,9 +42,9 @@ interface CompilePackageParams {
42
42
  target?: 'esm' | 'cjs';
43
43
  verbose?: boolean;
44
44
  }
45
- declare const compile: ({ verbose, target, pkg, incremental, publint }: CompileParams) => number;
45
+ declare const compile: ({ verbose, target, pkg, incremental, publint, jobs, }: CompileParams) => number;
46
46
  declare const compilePackage: ({ target, pkg }: CompilePackageParams) => number;
47
- declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams) => number;
47
+ declare const compileAll: ({ jobs, verbose, target, incremental, }: CompileParams) => number;
48
48
 
49
49
  interface CopyAssetsParams {
50
50
  pkg?: string;
@@ -52,7 +52,7 @@ interface CopyAssetsParams {
52
52
  }
53
53
  declare const copyAssets: ({ target, pkg }: CopyAssetsParams) => Promise<0 | 1>;
54
54
 
55
- declare const cycle: () => number;
55
+ declare const cycle: () => Promise<number>;
56
56
 
57
57
  declare const dead: () => number;
58
58
 
@@ -75,7 +75,7 @@ interface DepsPackageParams {
75
75
  }
76
76
  declare const deps: ({ pkg, incremental }: DepsParams) => number;
77
77
  declare const depsPackage: ({ pkg }: DepsPackageParams) => number;
78
- declare const depsAll: ({ incremental, jobs, verbose }: DepsParams) => number;
78
+ declare const depsAll: ({ incremental, jobs, verbose, }: DepsParams) => number;
79
79
 
80
80
  declare const dupdeps: () => number;
81
81
 
@@ -219,9 +219,9 @@ interface RecompilePackageParams {
219
219
  target?: 'esm' | 'cjs';
220
220
  verbose?: boolean;
221
221
  }
222
- declare const recompile: ({ verbose, target, pkg, incremental }: RecompileParams) => Promise<number>;
223
- declare const recompilePackage: ({ verbose, target, pkg }: RecompilePackageParams) => Promise<number>;
224
- declare const recompileAll: ({ jobs, verbose, target, incremental }: RecompileParams) => Promise<number>;
222
+ declare const recompile: ({ verbose, target, pkg, incremental, }: RecompileParams) => Promise<number>;
223
+ declare const recompilePackage: ({ verbose, target, pkg, }: RecompilePackageParams) => Promise<number>;
224
+ declare const recompileAll: ({ jobs, verbose, target, incremental, }: RecompileParams) => Promise<number>;
225
225
 
226
226
  declare const reinstall: () => number;
227
227
 
@@ -258,6 +258,8 @@ declare const defaultBuildConfig: {
258
258
  include: string[];
259
259
  };
260
260
 
261
+ declare const deleteGlob: (globPath: string) => void;
262
+
261
263
  declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
262
264
 
263
265
  declare class DuplicateDetector {
@@ -356,4 +358,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
356
358
 
357
359
  declare const xyParseOptions: () => Argv;
358
360
 
359
- export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileMode, type CompileParams, type CopyAssetsParams, type DepsPackageParams, type DepsParams, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, type LintPackageParams, type LintParams, type LiveShareConfig, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackagePublintParams, type PathConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type RebuildParams, type RecompilePackageParams, type RecompileParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint, lintAll, lintClean, lintPackage, lintProfile, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTsup, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
361
+ export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileMode, type CompileParams, type CopyAssetsParams, type DepsPackageParams, type DepsParams, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, type LintPackageParams, type LintParams, type LiveShareConfig, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackagePublintParams, type PathConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type RebuildParams, type RecompilePackageParams, type RecompileParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint, lintAll, lintClean, lintPackage, lintProfile, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTsup, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
package/dist/index.mjs CHANGED
@@ -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) ? 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
+ });
3
143
 
4
144
  // src/actions/build.ts
5
145
  import chalk9 from "chalk";
@@ -81,6 +221,19 @@ var createBuildConfig = /* @__PURE__ */ __name((location, module, target, outDir
81
221
  };
82
222
  }, "createBuildConfig");
83
223
 
224
+ // src/lib/deleteGlob.ts
225
+ import fs from "node:fs";
226
+ import { glob } from "glob";
227
+ var deleteGlob = /* @__PURE__ */ __name((globPath) => {
228
+ const files = glob.sync(globPath);
229
+ for (const file of files) {
230
+ fs.rmSync(file, {
231
+ recursive: true,
232
+ force: true
233
+ });
234
+ }
235
+ }, "deleteGlob");
236
+
84
237
  // src/lib/dependencies/detectDuplicateDependencies.ts
85
238
  import { execSync } from "node:child_process";
86
239
 
@@ -144,7 +297,6 @@ var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
144
297
  // src/lib/dependencies/DuplicateDetector.ts
145
298
  import { EOL } from "node:os";
146
299
  import chalk3 from "chalk";
147
- import uniq from "lodash/uniq.js";
148
300
 
149
301
  // src/lib/jsonFormatters.ts
150
302
  var multiLineToJSONArray = /* @__PURE__ */ __name((output) => {
@@ -215,7 +367,9 @@ var DuplicateDetector = class {
215
367
  acc.duplicateVersions.push(acc.currentVersion);
216
368
  }
217
369
  acc.duplicateVersions.push(version);
218
- acc.duplicateVersions = uniq(acc.duplicateVersions);
370
+ acc.duplicateVersions = [
371
+ ...new Set(acc.duplicateVersions)
372
+ ];
219
373
  }
220
374
  return acc;
221
375
  }
@@ -362,7 +516,7 @@ var mergeEntries = /* @__PURE__ */ __name((a, b) => [
362
516
  ].sort(), "mergeEntries");
363
517
  var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
364
518
  console.log(chalk4.green(`Generate ${filename3} Files`));
365
- const cwd3 = INIT_CWD() ?? ".";
519
+ const cwd4 = INIT_CWD() ?? ".";
366
520
  const workspaces = pkg ? [
367
521
  yarnWorkspace(pkg)
368
522
  ] : yarnWorkspaces();
@@ -370,7 +524,7 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
370
524
  const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
371
525
  const results = workspaces.map(({ location, name }) => {
372
526
  try {
373
- writeEntries(location, mergeEntries(readEntries(cwd3), readEntries(location)));
527
+ writeEntries(location, mergeEntries(readEntries(cwd4), readEntries(location)));
374
528
  return 0;
375
529
  } catch (ex) {
376
530
  const error = ex;
@@ -383,13 +537,13 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
383
537
  }, "generateIgnoreFiles");
384
538
 
385
539
  // src/lib/loadConfig.ts
540
+ var import_deepmerge = __toESM(require_cjs(), 1);
386
541
  import chalk5 from "chalk";
387
542
  import { cosmiconfig } from "cosmiconfig";
388
- import merge from "lodash/merge.js";
389
543
  var config;
390
544
  var loadConfig = /* @__PURE__ */ __name(async (params) => {
391
545
  if (config) {
392
- return merge({}, config, params);
546
+ return (0, import_deepmerge.default)(config, params ?? {});
393
547
  }
394
548
  const cosmicConfigResult = await cosmiconfig("xy", {
395
549
  cache: true
@@ -399,7 +553,7 @@ var loadConfig = /* @__PURE__ */ __name(async (params) => {
399
553
  if (configFilePath) {
400
554
  console.log(chalk5.gray(`Loading config from ${configFilePath}`));
401
555
  }
402
- return merge({}, config, params);
556
+ return (0, import_deepmerge.default)(config, params ?? {});
403
557
  }, "loadConfig");
404
558
 
405
559
  // src/lib/parsedPackageJSON.ts
@@ -621,19 +775,16 @@ var cleanAll = /* @__PURE__ */ __name(({ verbose }) => {
621
775
  // src/actions/clean-docs.ts
622
776
  import path from "node:path";
623
777
  import chalk10 from "chalk";
624
- import { rimrafSync } from "rimraf";
625
778
  var cleanDocs = /* @__PURE__ */ __name(() => {
626
779
  const pkgName = process.env.npm_package_name;
627
780
  console.log(chalk10.green(`Cleaning Docs [${pkgName}]`));
628
- for (const { location } of yarnWorkspaces()) rimrafSync(path.join(location, "docs"), {
629
- glob: true
630
- });
781
+ for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
631
782
  return 0;
632
783
  }, "cleanDocs");
633
784
 
634
785
  // src/actions/compile.ts
635
786
  import chalk11 from "chalk";
636
- var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint: publint2 }) => {
787
+ var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint: publint2, jobs }) => {
637
788
  return pkg ? compilePackage({
638
789
  pkg,
639
790
  publint: publint2,
@@ -643,7 +794,8 @@ var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publi
643
794
  incremental,
644
795
  publint: publint2,
645
796
  target,
646
- verbose
797
+ verbose,
798
+ jobs
647
799
  });
648
800
  }, "compile");
649
801
  var compilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
@@ -771,25 +923,33 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
771
923
  }, "copyAssets");
772
924
 
773
925
  // src/actions/cycle.ts
774
- var cycle = /* @__PURE__ */ __name(() => {
775
- const rules = [
776
- `"'import/no-cycle': [1, { maxDepth: 6 }]"`,
777
- `"'import/no-internal-modules': ['off']"`
778
- ];
779
- return runSteps("Cycle", [
780
- [
781
- "yarn",
782
- [
783
- "eslint",
784
- ...rules.flatMap((rule) => [
785
- "--rule",
786
- rule
787
- ]),
788
- "--cache",
789
- "."
790
- ]
791
- ]
926
+ import { cwd } from "node:process";
927
+ import { ESLint } from "eslint";
928
+ var cycle = /* @__PURE__ */ __name(async () => {
929
+ const eslint = new ESLint({
930
+ fix: false,
931
+ overrideConfig: {
932
+ rules: {
933
+ "import-x/no-cycle": [
934
+ "error",
935
+ {
936
+ maxDepth: 10
937
+ }
938
+ ]
939
+ }
940
+ }
941
+ });
942
+ const results = await eslint.lintFiles([
943
+ "src/**/*.ts*",
944
+ "packages/**/src/**/*.ts*"
792
945
  ]);
946
+ const formatter = await eslint.loadFormatter("stylish");
947
+ const resultText = formatter.format(results, {
948
+ cwd: cwd(),
949
+ rulesMeta: {}
950
+ });
951
+ console.log(resultText);
952
+ return results.length;
793
953
  }, "cycle");
794
954
 
795
955
  // src/actions/dead.ts
@@ -1202,7 +1362,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
1202
1362
 
1203
1363
  // src/actions/lint.ts
1204
1364
  import chalk18 from "chalk";
1205
- import { ESLint } from "eslint";
1365
+ import { ESLint as ESLint2 } from "eslint";
1206
1366
  var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
1207
1367
  const colors = [
1208
1368
  "white",
@@ -1229,7 +1389,7 @@ var lintPackage = /* @__PURE__ */ __name(async ({ pkg }) => {
1229
1389
  console.error(chalk18.red(`Unable to locate package [${chalk18.magenta(pkg)}]`));
1230
1390
  process.exit(1);
1231
1391
  }
1232
- const engine = new ESLint({
1392
+ const engine = new ESLint2({
1233
1393
  cache: true
1234
1394
  });
1235
1395
  const lintResults = await engine.lintFiles(workspace.location);
@@ -1237,7 +1397,7 @@ var lintPackage = /* @__PURE__ */ __name(async ({ pkg }) => {
1237
1397
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
1238
1398
  }, "lintPackage");
1239
1399
  var lintAll = /* @__PURE__ */ __name(async () => {
1240
- const engine = new ESLint({
1400
+ const engine = new ESLint2({
1241
1401
  cache: true
1242
1402
  });
1243
1403
  const lintResults = await engine.lintFiles("./**/*.*");
@@ -1307,7 +1467,6 @@ var npmignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename2
1307
1467
  // src/actions/package/clean-outputs.ts
1308
1468
  import path3 from "node:path";
1309
1469
  import chalk19 from "chalk";
1310
- import { rimraf } from "rimraf";
1311
1470
  var packageCleanOutputs = /* @__PURE__ */ __name(async () => {
1312
1471
  const pkg = process.env.INIT_CWD ?? ".";
1313
1472
  const pkgName = process.env.npm_package_name;
@@ -1317,14 +1476,13 @@ var packageCleanOutputs = /* @__PURE__ */ __name(async () => {
1317
1476
  path3.join(pkg, "docs")
1318
1477
  ];
1319
1478
  console.log(chalk19.green(`Cleaning Outputs [${pkgName}]`));
1320
- await Promise.all(folders.map((folder) => rimraf(folder)));
1479
+ await Promise.all(folders.map((folder) => deleteGlob(folder)));
1321
1480
  return 0;
1322
1481
  }, "packageCleanOutputs");
1323
1482
 
1324
1483
  // src/actions/package/clean-typescript.ts
1325
1484
  import path4 from "node:path";
1326
1485
  import chalk20 from "chalk";
1327
- import { rimraf as rimraf2 } from "rimraf";
1328
1486
  var packageCleanTypescript = /* @__PURE__ */ __name(async () => {
1329
1487
  const pkg = process.env.INIT_CWD ?? ".";
1330
1488
  const pkgName = process.env.npm_package_name;
@@ -1334,7 +1492,7 @@ var packageCleanTypescript = /* @__PURE__ */ __name(async () => {
1334
1492
  path4.join(pkg, ".tsconfig.*"),
1335
1493
  path4.join(pkg, ".eslintcache")
1336
1494
  ];
1337
- await Promise.all(files.map((file) => rimraf2(file)));
1495
+ await Promise.all(files.map((file) => deleteGlob(file)));
1338
1496
  return 0;
1339
1497
  }, "packageCleanTypescript");
1340
1498
 
@@ -1350,11 +1508,14 @@ var packageClean = /* @__PURE__ */ __name(async () => {
1350
1508
  import chalk23 from "chalk";
1351
1509
 
1352
1510
  // src/actions/package/publint.ts
1353
- import { promises as fs } from "node:fs";
1511
+ import { promises as fs2 } from "node:fs";
1354
1512
  import chalk21 from "chalk";
1513
+ import sortPackageJson from "sort-package-json";
1355
1514
  var packagePublint = /* @__PURE__ */ __name(async (params) => {
1356
1515
  const pkgDir = process.env.INIT_CWD;
1357
- const pkg = JSON.parse(await fs.readFile(`${pkgDir}/package.json`, "utf8"));
1516
+ const sortedPkg = sortPackageJson(await fs2.readFile(`${pkgDir}/package.json`, "utf8"));
1517
+ await fs2.writeFile(`${pkgDir}/package.json`, sortedPkg);
1518
+ const pkg = JSON.parse(await fs2.readFile(`${pkgDir}/package.json`, "utf8"));
1358
1519
  console.log(chalk21.green(`Publint: ${pkg.name}`));
1359
1520
  console.log(chalk21.gray(pkgDir));
1360
1521
  const { publint: publint2 } = await import("publint");
@@ -1391,23 +1552,20 @@ var packagePublint = /* @__PURE__ */ __name(async (params) => {
1391
1552
  }, "packagePublint");
1392
1553
 
1393
1554
  // src/actions/package/compile/packageCompileTsc.ts
1394
- import { cwd } from "node:process";
1555
+ import { cwd as cwd2 } from "node:process";
1395
1556
  import chalk22 from "chalk";
1396
1557
  import { createProgramFromConfig } from "tsc-prog";
1397
1558
  import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getLineAndCharacterOfPosition, getPreEmitDiagnostics } from "typescript";
1398
1559
 
1399
1560
  // src/actions/package/compile/getCompilerOptions.ts
1561
+ var import_deepmerge2 = __toESM(require_cjs(), 1);
1400
1562
  import { createRequire } from "node:module";
1401
- import merge2 from "lodash/merge.js";
1402
1563
  import { findConfigFile, readConfigFile, sys } from "typescript";
1403
1564
  var getNested = /* @__PURE__ */ __name((config2) => {
1404
1565
  if (config2.extends) {
1405
1566
  const require2 = createRequire(import.meta.url);
1406
1567
  const opts = require2(config2.extends);
1407
- return {
1408
- ...getNested(opts),
1409
- ...config2.compilerOptions
1410
- };
1568
+ return (0, import_deepmerge2.default)(getNested(opts), config2.compilerOptions ?? {});
1411
1569
  }
1412
1570
  return config2.compilerOptions;
1413
1571
  }, "getNested");
@@ -1415,15 +1573,15 @@ var getCompilerOptionsJSONFollowExtends = /* @__PURE__ */ __name((filename3) =>
1415
1573
  const config2 = readConfigFile(filename3, sys.readFile).config;
1416
1574
  return getNested(config2);
1417
1575
  }, "getCompilerOptionsJSONFollowExtends");
1418
- var getCompilerOptions = /* @__PURE__ */ __name((options, tsconfig = "tsconfig.json") => {
1576
+ var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tsconfig.json") => {
1419
1577
  const configFileName = findConfigFile("./", sys.fileExists, tsconfig);
1420
- const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0;
1421
- return merge2({}, configFileCompilerOptions, options);
1578
+ const configFileCompilerOptions = (configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : void 0) ?? {};
1579
+ return (0, import_deepmerge2.default)(configFileCompilerOptions, options);
1422
1580
  }, "getCompilerOptions");
1423
1581
 
1424
1582
  // src/actions/package/compile/packageCompileTsc.ts
1425
1583
  var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerOptionsParam) => {
1426
- const pkg = process.env.INIT_CWD ?? cwd();
1584
+ const pkg = process.env.INIT_CWD ?? cwd2();
1427
1585
  const publint2 = config2?.publint ?? true;
1428
1586
  const verbose = config2?.verbose ?? false;
1429
1587
  const formatHost = {
@@ -1446,7 +1604,7 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
1446
1604
  }
1447
1605
  };
1448
1606
  const program = createProgramFromConfig({
1449
- basePath: pkg ?? cwd(),
1607
+ basePath: pkg ?? cwd2(),
1450
1608
  compilerOptions,
1451
1609
  exclude: [
1452
1610
  "dist",
@@ -1477,9 +1635,9 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
1477
1635
  import { build as build2, defineConfig } from "tsup";
1478
1636
 
1479
1637
  // src/actions/package/compile/inputs.ts
1480
- import { glob } from "glob";
1638
+ import { glob as glob2 } from "glob";
1481
1639
  var getAllInputs2 = /* @__PURE__ */ __name((folder) => {
1482
- return glob.sync(`${folder}/**/*.*`, {
1640
+ return glob2.sync(`${folder}/**/*.*`, {
1483
1641
  ignore: [
1484
1642
  "**/*.spec.*",
1485
1643
  "**/*.stories.*",
@@ -1699,7 +1857,7 @@ var packageCopyAssets = /* @__PURE__ */ __name(async ({ target }) => {
1699
1857
 
1700
1858
  // src/actions/package/deps.ts
1701
1859
  import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
1702
- import { cwd as cwd2 } from "node:process";
1860
+ import { cwd as cwd3 } from "node:process";
1703
1861
  import chalk25 from "chalk";
1704
1862
  import depcheck from "depcheck";
1705
1863
  var special = depcheck.special;
@@ -1796,7 +1954,7 @@ var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
1796
1954
  };
1797
1955
  }, "analyzeDeps");
1798
1956
  var packageDeps = /* @__PURE__ */ __name(async () => {
1799
- const pkg = process.env.INIT_CWD ?? cwd2();
1957
+ const pkg = process.env.INIT_CWD ?? cwd3();
1800
1958
  const pkgName = process.env.npm_package_name;
1801
1959
  const packageContent = existsSync5(`${pkg}/package.json`) ? JSON.parse(readFileSync5(`${pkg}/package.json`, {
1802
1960
  encoding: "utf8"
@@ -2102,7 +2260,20 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
2102
2260
  ...jobsOptions,
2103
2261
  ...verboseOptions,
2104
2262
  "run",
2105
- "package-recompile",
2263
+ "package-clean",
2264
+ ...targetOptions
2265
+ ]
2266
+ ],
2267
+ [
2268
+ "yarn",
2269
+ [
2270
+ "workspaces",
2271
+ "foreach",
2272
+ ...incrementalOptions,
2273
+ ...jobsOptions,
2274
+ ...verboseOptions,
2275
+ "run",
2276
+ "package-compile",
2106
2277
  ...targetOptions
2107
2278
  ]
2108
2279
  ]
@@ -2576,10 +2747,10 @@ import chalk29 from "chalk";
2576
2747
  var xyLintCommands = /* @__PURE__ */ __name((args) => {
2577
2748
  return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
2578
2749
  return packagePositionalParam(yargs2);
2579
- }, (argv) => {
2750
+ }, async (argv) => {
2580
2751
  const start = Date.now();
2581
2752
  if (argv.verbose) console.log("Cycle");
2582
- process.exitCode = cycle();
2753
+ process.exitCode = await cycle();
2583
2754
  console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2584
2755
  }).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
2585
2756
  return packagePositionalParam(yargs2);
@@ -2697,6 +2868,7 @@ export {
2697
2868
  dead,
2698
2869
  defaultBuildConfig,
2699
2870
  defaultReadFileSyncOptions,
2871
+ deleteGlob,
2700
2872
  deploy,
2701
2873
  deployMajor,
2702
2874
  deployMinor,