@xylabs/ts-scripts-yarn3 7.0.0-rc.9 → 7.0.1

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 (273) hide show
  1. package/dist/actions/build.mjs +87 -39
  2. package/dist/actions/build.mjs.map +1 -1
  3. package/dist/actions/clean-docs.mjs +22 -8
  4. package/dist/actions/clean-docs.mjs.map +1 -1
  5. package/dist/actions/clean-eslint.mjs +11 -5
  6. package/dist/actions/clean-eslint.mjs.map +1 -1
  7. package/dist/actions/clean-jest.mjs +29 -16
  8. package/dist/actions/clean-jest.mjs.map +1 -1
  9. package/dist/actions/clean.mjs +63 -32
  10. package/dist/actions/clean.mjs.map +1 -1
  11. package/dist/actions/compile.mjs +76 -50
  12. package/dist/actions/compile.mjs.map +1 -1
  13. package/dist/actions/copy-assets.mjs +38 -23
  14. package/dist/actions/copy-assets.mjs.map +1 -1
  15. package/dist/actions/cycle.mjs +57 -28
  16. package/dist/actions/cycle.mjs.map +1 -1
  17. package/dist/actions/dead.mjs +31 -16
  18. package/dist/actions/dead.mjs.map +1 -1
  19. package/dist/actions/deplint/checkPackage/checkPackage.mjs +84 -50
  20. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
  21. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +7 -7
  22. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -1
  23. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +6 -10
  24. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -1
  25. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +5 -5
  26. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
  27. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +4 -0
  28. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
  29. package/dist/actions/deplint/checkPackage/index.mjs +84 -50
  30. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
  31. package/dist/actions/deplint/deplint.mjs +120 -81
  32. package/dist/actions/deplint/deplint.mjs.map +1 -1
  33. package/dist/actions/deplint/findFiles.mjs +20 -4
  34. package/dist/actions/deplint/findFiles.mjs.map +1 -1
  35. package/dist/actions/deplint/findFilesByGlob.mjs +8 -1
  36. package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -1
  37. package/dist/actions/deplint/getBasePackageName.mjs +4 -0
  38. package/dist/actions/deplint/getBasePackageName.mjs.map +1 -1
  39. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +4 -0
  40. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -1
  41. package/dist/actions/deplint/getExternalImportsFromFiles.mjs +24 -12
  42. package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -1
  43. package/dist/actions/deplint/getImportsFromFile.mjs +16 -9
  44. package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -1
  45. package/dist/actions/deplint/index.mjs +120 -81
  46. package/dist/actions/deplint/index.mjs.map +1 -1
  47. package/dist/actions/deploy-major.mjs +57 -26
  48. package/dist/actions/deploy-major.mjs.map +1 -1
  49. package/dist/actions/deploy-minor.mjs +57 -26
  50. package/dist/actions/deploy-minor.mjs.map +1 -1
  51. package/dist/actions/deploy-next.mjs +57 -26
  52. package/dist/actions/deploy-next.mjs.map +1 -1
  53. package/dist/actions/deploy.mjs +57 -26
  54. package/dist/actions/deploy.mjs.map +1 -1
  55. package/dist/actions/dupdeps.mjs +37 -26
  56. package/dist/actions/dupdeps.mjs.map +1 -1
  57. package/dist/actions/fix.mjs +54 -36
  58. package/dist/actions/fix.mjs.map +1 -1
  59. package/dist/actions/gen-docs.mjs +65 -25
  60. package/dist/actions/gen-docs.mjs.map +1 -1
  61. package/dist/actions/gitignore-gen.mjs +44 -28
  62. package/dist/actions/gitignore-gen.mjs.map +1 -1
  63. package/dist/actions/gitlint-fix.mjs +14 -5
  64. package/dist/actions/gitlint-fix.mjs.map +1 -1
  65. package/dist/actions/gitlint.mjs +7 -4
  66. package/dist/actions/gitlint.mjs.map +1 -1
  67. package/dist/actions/index.mjs +1555 -966
  68. package/dist/actions/index.mjs.map +1 -1
  69. package/dist/actions/knip.mjs +31 -16
  70. package/dist/actions/knip.mjs.map +1 -1
  71. package/dist/actions/license.mjs +51 -37
  72. package/dist/actions/license.mjs.map +1 -1
  73. package/dist/actions/lint.mjs +48 -33
  74. package/dist/actions/lint.mjs.map +1 -1
  75. package/dist/actions/npmignore-gen.mjs +44 -28
  76. package/dist/actions/npmignore-gen.mjs.map +1 -1
  77. package/dist/actions/package/clean-outputs.mjs +16 -6
  78. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  79. package/dist/actions/package/clean-typescript.mjs +16 -6
  80. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  81. package/dist/actions/package/clean.mjs +29 -12
  82. package/dist/actions/package/clean.mjs.map +1 -1
  83. package/dist/actions/package/compile/buildEntries.mjs +36 -8
  84. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  85. package/dist/actions/package/compile/compile.mjs +341 -185
  86. package/dist/actions/package/compile/compile.mjs.map +1 -1
  87. package/dist/actions/package/compile/copyTypeFiles.mjs +23 -20
  88. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  89. package/dist/actions/package/compile/deepMerge.mjs +5 -0
  90. package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
  91. package/dist/actions/package/compile/getCompilerOptions.mjs +9 -23
  92. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  93. package/dist/actions/package/compile/index.mjs +341 -267
  94. package/dist/actions/package/compile/index.mjs.map +1 -1
  95. package/dist/actions/package/compile/inputs.mjs +26 -3
  96. package/dist/actions/package/compile/inputs.mjs.map +1 -1
  97. package/dist/actions/package/compile/packageCompileTsc.mjs +57 -96
  98. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  99. package/dist/actions/package/compile/packageCompileTscTypes.mjs +94 -25
  100. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  101. package/dist/actions/package/compile/packageCompileTsup.mjs +321 -123
  102. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  103. package/dist/actions/package/copy-assets.mjs +21 -12
  104. package/dist/actions/package/copy-assets.mjs.map +1 -1
  105. package/dist/actions/package/cycle.mjs +16 -9
  106. package/dist/actions/package/cycle.mjs.map +1 -1
  107. package/dist/actions/package/gen-docs.mjs +13 -12
  108. package/dist/actions/package/gen-docs.mjs.map +1 -1
  109. package/dist/actions/package/index.mjs +507 -347
  110. package/dist/actions/package/index.mjs.map +1 -1
  111. package/dist/actions/package/lint.mjs +39 -16
  112. package/dist/actions/package/lint.mjs.map +1 -1
  113. package/dist/actions/package/publint.mjs +9 -6
  114. package/dist/actions/package/publint.mjs.map +1 -1
  115. package/dist/actions/package/recompile.mjs +371 -201
  116. package/dist/actions/package/recompile.mjs.map +1 -1
  117. package/dist/actions/publint.mjs +71 -37
  118. package/dist/actions/publint.mjs.map +1 -1
  119. package/dist/actions/rebuild.mjs +29 -17
  120. package/dist/actions/rebuild.mjs.map +1 -1
  121. package/dist/actions/recompile.mjs +67 -50
  122. package/dist/actions/recompile.mjs.map +1 -1
  123. package/dist/actions/reinstall.mjs +43 -25
  124. package/dist/actions/reinstall.mjs.map +1 -1
  125. package/dist/actions/relint.mjs +63 -40
  126. package/dist/actions/relint.mjs.map +1 -1
  127. package/dist/actions/retest.mjs +35 -17
  128. package/dist/actions/retest.mjs.map +1 -1
  129. package/dist/actions/sonar.mjs +32 -16
  130. package/dist/actions/sonar.mjs.map +1 -1
  131. package/dist/actions/statics.mjs +46 -27
  132. package/dist/actions/statics.mjs.map +1 -1
  133. package/dist/actions/test.mjs +30 -16
  134. package/dist/actions/test.mjs.map +1 -1
  135. package/dist/actions/up.mjs +27 -16
  136. package/dist/actions/up.mjs.map +1 -1
  137. package/dist/actions/updo.mjs +33 -18
  138. package/dist/actions/updo.mjs.map +1 -1
  139. package/dist/actions/upplug.mjs +53 -19
  140. package/dist/actions/upplug.mjs.map +1 -1
  141. package/dist/actions/upyarn.mjs +31 -16
  142. package/dist/actions/upyarn.mjs.map +1 -1
  143. package/dist/actions/yarn3only.mjs +23 -12
  144. package/dist/actions/yarn3only.mjs.map +1 -1
  145. package/dist/bin/package/build-only.mjs +346 -191
  146. package/dist/bin/package/build-only.mjs.map +1 -1
  147. package/dist/bin/package/build.mjs +348 -191
  148. package/dist/bin/package/build.mjs.map +1 -1
  149. package/dist/bin/package/clean-outputs.mjs +15 -6
  150. package/dist/bin/package/clean-outputs.mjs.map +1 -1
  151. package/dist/bin/package/clean-typescript.mjs +15 -6
  152. package/dist/bin/package/clean-typescript.mjs.map +1 -1
  153. package/dist/bin/package/clean.mjs +28 -12
  154. package/dist/bin/package/clean.mjs.map +1 -1
  155. package/dist/bin/package/compile-only.mjs +345 -190
  156. package/dist/bin/package/compile-only.mjs.map +1 -1
  157. package/dist/bin/package/compile-tsup.mjs +323 -126
  158. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  159. package/dist/bin/package/compile.mjs +346 -191
  160. package/dist/bin/package/compile.mjs.map +1 -1
  161. package/dist/bin/package/copy-assets-cjs.mjs +23 -13
  162. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  163. package/dist/bin/package/copy-assets-esm.mjs +23 -13
  164. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  165. package/dist/bin/package/cycle.mjs +17 -11
  166. package/dist/bin/package/cycle.mjs.map +1 -1
  167. package/dist/bin/package/fix.mjs +38 -16
  168. package/dist/bin/package/fix.mjs.map +1 -1
  169. package/dist/bin/package/gen-docs.mjs +12 -12
  170. package/dist/bin/package/gen-docs.mjs.map +1 -1
  171. package/dist/bin/package/lint.mjs +38 -16
  172. package/dist/bin/package/lint.mjs.map +1 -1
  173. package/dist/bin/package/publint.mjs +8 -6
  174. package/dist/bin/package/publint.mjs.map +1 -1
  175. package/dist/bin/package/recompile.mjs +372 -203
  176. package/dist/bin/package/recompile.mjs.map +1 -1
  177. package/dist/bin/package/relint.mjs +38 -16
  178. package/dist/bin/package/relint.mjs.map +1 -1
  179. package/dist/bin/xy.mjs +1351 -1075
  180. package/dist/bin/xy.mjs.map +1 -1
  181. package/dist/index.d.ts +133 -121
  182. package/dist/index.mjs +1908 -1460
  183. package/dist/index.mjs.map +1 -1
  184. package/dist/lib/checkResult.mjs +5 -2
  185. package/dist/lib/checkResult.mjs.map +1 -1
  186. package/dist/lib/createBuildConfig.mjs +24 -9
  187. package/dist/lib/createBuildConfig.mjs.map +1 -1
  188. package/dist/lib/defaultBuildConfig.mjs +6 -2
  189. package/dist/lib/defaultBuildConfig.mjs.map +1 -1
  190. package/dist/lib/deleteGlob.mjs +9 -3
  191. package/dist/lib/deleteGlob.mjs.map +1 -1
  192. package/dist/lib/dependencies/DuplicateDetector.mjs +23 -12
  193. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  194. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +33 -22
  195. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  196. package/dist/lib/dependencies/index.mjs +33 -22
  197. package/dist/lib/dependencies/index.mjs.map +1 -1
  198. package/dist/lib/file/ReadFileSyncOptions.mjs +3 -1
  199. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  200. package/dist/lib/file/constants.mjs.map +1 -1
  201. package/dist/lib/file/fileLines.mjs +13 -12
  202. package/dist/lib/file/fileLines.mjs.map +1 -1
  203. package/dist/lib/file/index.mjs +15 -14
  204. package/dist/lib/file/index.mjs.map +1 -1
  205. package/dist/lib/file/tryReadFileSync.mjs +8 -3
  206. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  207. package/dist/lib/generateIgnoreFiles.mjs +43 -27
  208. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  209. package/dist/lib/index.mjs +166 -106
  210. package/dist/lib/index.mjs.map +1 -1
  211. package/dist/lib/jsonFormatters.mjs +5 -2
  212. package/dist/lib/jsonFormatters.mjs.map +1 -1
  213. package/dist/lib/loadConfig.mjs +20 -10
  214. package/dist/lib/loadConfig.mjs.map +1 -1
  215. package/dist/lib/parsedPackageJSON.mjs +5 -2
  216. package/dist/lib/parsedPackageJSON.mjs.map +1 -1
  217. package/dist/lib/processEx.mjs +9 -6
  218. package/dist/lib/processEx.mjs.map +1 -1
  219. package/dist/lib/runSteps.mjs +19 -13
  220. package/dist/lib/runSteps.mjs.map +1 -1
  221. package/dist/lib/runStepsAsync.mjs +22 -22
  222. package/dist/lib/runStepsAsync.mjs.map +1 -1
  223. package/dist/lib/runXy.mjs +31 -19
  224. package/dist/lib/runXy.mjs.map +1 -1
  225. package/dist/lib/runXyWithWarning.mjs +5 -2
  226. package/dist/lib/runXyWithWarning.mjs.map +1 -1
  227. package/dist/lib/safeExit.mjs +13 -10
  228. package/dist/lib/safeExit.mjs.map +1 -1
  229. package/dist/lib/string/empty.mjs +5 -2
  230. package/dist/lib/string/empty.mjs.map +1 -1
  231. package/dist/lib/string/index.mjs +9 -3
  232. package/dist/lib/string/index.mjs.map +1 -1
  233. package/dist/lib/string/union.mjs +7 -1
  234. package/dist/lib/string/union.mjs.map +1 -1
  235. package/dist/lib/withErrnoException.mjs +7 -4
  236. package/dist/lib/withErrnoException.mjs.map +1 -1
  237. package/dist/lib/withError.mjs +5 -2
  238. package/dist/lib/withError.mjs.map +1 -1
  239. package/dist/lib/yarn/index.mjs +30 -11
  240. package/dist/lib/yarn/index.mjs.map +1 -1
  241. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +15 -4
  242. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
  243. package/dist/lib/yarn/workspace/index.mjs +16 -5
  244. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  245. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +16 -5
  246. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  247. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +14 -3
  248. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  249. package/dist/lib/yarn/yarnInitCwd.mjs +5 -2
  250. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
  251. package/dist/loadPackageConfig.mjs +8 -3
  252. package/dist/loadPackageConfig.mjs.map +1 -1
  253. package/dist/xy/index.mjs +1351 -1074
  254. package/dist/xy/index.mjs.map +1 -1
  255. package/dist/xy/param.mjs +9 -3
  256. package/dist/xy/param.mjs.map +1 -1
  257. package/dist/xy/xy.mjs +1351 -1074
  258. package/dist/xy/xy.mjs.map +1 -1
  259. package/dist/xy/xyBuildCommands.mjs +324 -305
  260. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  261. package/dist/xy/xyCommonCommands.mjs +336 -251
  262. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  263. package/dist/xy/xyDeployCommands.mjs +161 -99
  264. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  265. package/dist/xy/xyInstallCommands.mjs +193 -145
  266. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  267. package/dist/xy/xyLintCommands.mjs +437 -321
  268. package/dist/xy/xyLintCommands.mjs.map +1 -1
  269. package/dist/xy/xyParseOptions.mjs +5 -2
  270. package/dist/xy/xyParseOptions.mjs.map +1 -1
  271. package/package.json +13 -12
  272. package/dist/actions/compile-types.mjs +0 -153
  273. package/dist/actions/compile-types.mjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Options } from 'tsup';
2
2
  import { CompilerOptions } from 'typescript';
3
+ import { Options as Options$1 } from 'rollup-plugin-dts';
3
4
  import { PathLike, WriteFileOptions } from 'node:fs';
4
5
  import { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process';
5
6
  import { PackageJson } from 'types-package-json';
@@ -46,21 +47,6 @@ declare const compile: ({ verbose, target, pkg, incremental, publint, jobs, }: C
46
47
  declare const compilePackage: ({ target, pkg }: CompilePackageParams) => number;
47
48
  declare const compileAll: ({ jobs, verbose, target, incremental, }: CompileParams) => number;
48
49
 
49
- interface CompileTypesParams {
50
- incremental?: boolean;
51
- jobs?: number;
52
- pkg?: string;
53
- verbose?: boolean;
54
- }
55
- interface CompileTypesPackageParams {
56
- pkg: string;
57
- publint?: boolean;
58
- verbose?: boolean;
59
- }
60
- declare const compileTypes: ({ verbose, pkg, incremental, jobs, }: CompileTypesParams) => number;
61
- declare const compileTypesPackage: ({ verbose, pkg }: CompileTypesPackageParams) => number;
62
- declare const compileTypesAll: ({ jobs, verbose, incremental, }: CompileTypesParams) => number;
63
-
64
50
  interface CopyAssetsParams {
65
51
  pkg?: string;
66
52
  target?: 'esm' | 'cjs';
@@ -85,12 +71,104 @@ declare const cycleAll: ({ verbose }: {
85
71
 
86
72
  declare const dead: () => number;
87
73
 
88
- declare const deplint: ({ pkg, deps, devDeps, peerDeps, }: {
89
- deps: boolean;
90
- devDeps: boolean;
91
- peerDeps: boolean;
92
- pkg: string;
93
- }) => number;
74
+ declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
75
+
76
+ declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
77
+
78
+ declare const defaultBuildConfig: {
79
+ compilerOptions: {
80
+ rootDir: string;
81
+ rootDirs: string[];
82
+ };
83
+ exclude: string[];
84
+ include: string[];
85
+ };
86
+
87
+ declare const deleteGlob: (globPath: string) => void;
88
+
89
+ declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
90
+
91
+ declare class DuplicateDetector {
92
+ private dependency;
93
+ private dependencyEntries;
94
+ constructor(output: string, dependency: string);
95
+ detect(): 1 | 0;
96
+ private detectReducer;
97
+ private resultsFactory;
98
+ }
99
+
100
+ declare const WINDOWS_NEWLINE_REGEX: RegExp;
101
+ declare const CROSS_PLATFORM_NEWLINE = "\n";
102
+
103
+ type ReadFileSyncOptions = BufferEncoding | {
104
+ encoding: BufferEncoding;
105
+ flags?: string;
106
+ };
107
+ declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
108
+
109
+ declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
110
+ declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
111
+ declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
112
+
113
+ declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
114
+
115
+ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
116
+
117
+ declare const multiLineToJSONArray: (output: string) => any;
118
+
119
+ declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
120
+
121
+ declare const parsedPackageJSON: (path?: string) => any;
122
+
123
+ declare const processEx: (ex: unknown) => never;
124
+
125
+ type ScriptStep = [/* command */ /* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ /* arg */ string | string[]] | [/* command */ string, /* arg */ /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding];
126
+ declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
127
+
128
+ declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
129
+ declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
130
+
131
+ declare const runXy: (command: string) => number;
132
+
133
+ declare const runXyWithWarning: (command: string) => number;
134
+
135
+ /** Catch child process a crash and returns the code */
136
+ declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
137
+ declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
138
+
139
+ declare const empty: (value?: string | undefined) => boolean;
140
+ declare const notEmpty: (value?: string | undefined) => boolean;
141
+
142
+ declare const union: (a: string[], b: string[]) => Set<string>;
143
+
144
+ declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
145
+
146
+ declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
147
+
148
+ declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
149
+
150
+ interface Workspace {
151
+ location: string;
152
+ name: string;
153
+ }
154
+
155
+ declare const yarnWorkspace: (pkg: string) => Workspace;
156
+
157
+ declare const yarnWorkspaces: () => Workspace[];
158
+
159
+ declare const INIT_CWD: () => string | undefined;
160
+
161
+ interface CheckPackageOptions {
162
+ deps?: boolean;
163
+ devDeps?: boolean;
164
+ peerDeps?: boolean;
165
+ verbose?: boolean;
166
+ }
167
+
168
+ interface DepLintOptions extends CheckPackageOptions {
169
+ pkg?: string;
170
+ }
171
+ declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, }: DepLintOptions) => number;
94
172
 
95
173
  declare const deploy: () => number;
96
174
 
@@ -173,11 +251,11 @@ interface DynamicShareConfig extends PathConfig {
173
251
  interface LiveShareConfig extends PathConfig {
174
252
  }
175
253
  interface CompileConfig {
176
- depth?: number;
177
- /** @param entryMode all, single, platform, or auto */
254
+ bundleTypes?: boolean;
255
+ /** @param entryMode all, single, custom, platform, or auto */
178
256
  entryMode?: EntryMode;
179
- /** @param files Manually specify the files to be compiled */
180
- files?: string[];
257
+ /** @param when building types with tsc, should it use the outDir to write to? */
258
+ outDirAsBuildDir?: boolean;
181
259
  }
182
260
  type PackageCompileTsupConfig = CompileConfig & {
183
261
  browser?: Record<string, Options | boolean>;
@@ -186,6 +264,7 @@ type PackageCompileTsupConfig = CompileConfig & {
186
264
  tsup?: {
187
265
  options?: Options;
188
266
  };
267
+ verbose?: boolean;
189
268
  };
190
269
  type PackageCompileTscConfig = CompileConfig & {
191
270
  mode: 'tsc';
@@ -194,6 +273,7 @@ interface XyConfigBase {
194
273
  compile?: CompileConfig;
195
274
  dynamicShare?: DynamicShareConfig;
196
275
  liveShare?: LiveShareConfig;
276
+ /** @deprecated */
197
277
  publint?: boolean;
198
278
  verbose?: boolean;
199
279
  }
@@ -203,14 +283,34 @@ interface XyTsupConfig extends XyConfigBase {
203
283
  interface XyTscConfig extends XyConfigBase {
204
284
  compile?: PackageCompileTscConfig;
205
285
  }
206
- type XyConfig = XyTsupConfig | XyTscConfig;
286
+ type XyConfigLegacy = XyTsupConfig | XyTscConfig;
287
+ type XyConfig = XyConfigLegacy & {
288
+ dev?: {
289
+ build?: {
290
+ clean?: boolean;
291
+ compile?: boolean;
292
+ deplint?: boolean;
293
+ gendocs?: boolean;
294
+ gitlint?: boolean;
295
+ knip?: boolean;
296
+ license?: boolean;
297
+ lint?: boolean;
298
+ publint?: boolean;
299
+ statics?: boolean;
300
+ verbose?: boolean;
301
+ };
302
+ compile?: PackageCompileTsupConfig;
303
+ verbose?: boolean;
304
+ };
305
+ verbose?: boolean;
306
+ };
207
307
 
208
308
  declare const packageCompile: (inConfig?: XyConfig) => Promise<number>;
209
309
 
210
- declare const packageCompileTsc: (folder?: string, config?: XyConfig, compilerOptionsParam?: CompilerOptions) => number;
310
+ declare const packageCompileTsc: (platform: "browser" | "neutral" | "node", entries: string[], srcDir?: string, outDir?: string, compilerOptionsParam?: CompilerOptions, verbose?: boolean) => number;
211
311
 
212
- declare function bundleDts(inputPath: string, outputPath: string, platform: 'node' | 'browser' | 'neutral'): Promise<void>;
213
- declare const packageCompileTscTypes: (entries: string[], outDir: string, platform: "node" | "browser" | "neutral", folder?: string) => Promise<number>;
312
+ declare function bundleDts(inputPath: string, outputPath: string, platform: 'node' | 'browser' | 'neutral', options?: Options$1, verbose?: boolean): Promise<void>;
313
+ declare const packageCompileTscTypes: (entries: string[], outDir: string, platform: "node" | "browser" | "neutral", srcDir?: string, verbose?: boolean) => Promise<number>;
214
314
 
215
315
  declare const tsupOptions: (options?: Options[]) => Options;
216
316
  declare const packageCompileTsup: (config?: XyTsupConfig) => Promise<number>;
@@ -220,18 +320,17 @@ interface PackageCopyAssetsParams {
220
320
  }
221
321
  declare const packageCopyAssets: ({ target }: PackageCopyAssetsParams) => Promise<1 | 0>;
222
322
 
223
- declare const packageCycle: ({ verbose }: {
224
- verbose: boolean;
225
- }) => Promise<number>;
323
+ declare const packageCycle: () => Promise<number>;
226
324
 
227
325
  declare const packageGenDocs: () => Promise<number | undefined>;
228
326
 
229
327
  declare const packageLint: (fix?: boolean, verbose?: boolean, cache?: boolean) => Promise<number>;
230
328
 
231
329
  interface PackagePublintParams {
330
+ strict?: boolean;
232
331
  verbose?: boolean;
233
332
  }
234
- declare const packagePublint: (params?: PackagePublintParams) => Promise<number>;
333
+ declare const packagePublint: ({ strict, verbose }?: PackagePublintParams) => Promise<number>;
235
334
 
236
335
  declare const packageRecompile: () => Promise<number>;
237
336
 
@@ -302,93 +401,6 @@ declare const updateYarnVersion: () => number;
302
401
 
303
402
  declare const yarn3Only: () => number;
304
403
 
305
- declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
306
-
307
- declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
308
-
309
- declare const defaultBuildConfig: {
310
- compilerOptions: {
311
- rootDir: string;
312
- rootDirs: string[];
313
- };
314
- exclude: string[];
315
- include: string[];
316
- };
317
-
318
- declare const deleteGlob: (globPath: string) => void;
319
-
320
- declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
321
-
322
- declare class DuplicateDetector {
323
- private dependency;
324
- private dependencyEntries;
325
- constructor(output: string, dependency: string);
326
- detect(): 1 | 0;
327
- private detectReducer;
328
- private resultsFactory;
329
- }
330
-
331
- declare const WINDOWS_NEWLINE_REGEX: RegExp;
332
- declare const CROSS_PLATFORM_NEWLINE = "\n";
333
-
334
- type ReadFileSyncOptions = BufferEncoding | {
335
- encoding: BufferEncoding;
336
- flags?: string;
337
- };
338
- declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
339
-
340
- declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
341
- declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
342
- declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
343
-
344
- declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
345
-
346
- declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
347
-
348
- declare const multiLineToJSONArray: (output: string) => any;
349
-
350
- declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
351
-
352
- declare const parsedPackageJSON: (path?: string) => any;
353
-
354
- declare const processEx: (ex: unknown) => never;
355
-
356
- type ScriptStep = [/* command */ /* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ /* arg */ string | string[]] | [/* command */ string, /* arg */ /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding];
357
- declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
358
-
359
- declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
360
- declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
361
-
362
- declare const runXy: (command: string) => number;
363
-
364
- declare const runXyWithWarning: (command: string) => number;
365
-
366
- /** Catch child process a crash and returns the code */
367
- declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
368
- declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
369
-
370
- declare const empty: (value?: string | undefined) => boolean;
371
- declare const notEmpty: (value?: string | undefined) => boolean;
372
-
373
- declare const union: (a: string[], b: string[]) => Set<string>;
374
-
375
- declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
376
-
377
- declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
378
-
379
- declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
380
-
381
- interface Workspace {
382
- location: string;
383
- name: string;
384
- }
385
-
386
- declare const yarnWorkspace: (pkg: string) => Workspace;
387
-
388
- declare const yarnWorkspaces: () => Workspace[];
389
-
390
- declare const INIT_CWD: () => string | undefined;
391
-
392
404
  type PackageJsonEx = PackageJson & {
393
405
  type: 'module' | 'commonjs';
394
406
  };
@@ -416,4 +428,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
416
428
 
417
429
  declare const xyParseOptions: () => Argv;
418
430
 
419
- export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CompileTypesParams, type CopyAssetsParams, type CycleParams, 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 RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileTypes, compileTypesAll, compileTypesPackage, copyAssets, createBuildConfig, cycle, cycleAll, cyclePackage, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deplint, deploy, deployMajor, deployMinor, deployNext, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, knip, license, lint, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCopyAssets, packageCycle, packageGenDocs, packageLint, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, relintAllPackages, relintPackage, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsupOptions, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
431
+ export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CopyAssetsParams, type CycleParams, type DepLintOptions, 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 RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, cycleAll, cyclePackage, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deplint, deploy, deployMajor, deployMinor, deployNext, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, knip, license, lint, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCopyAssets, packageCycle, packageGenDocs, packageLint, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, relintAllPackages, relintPackage, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsupOptions, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };