@xylabs/ts-scripts-yarn3 6.0.9 → 6.1.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 (161) hide show
  1. package/dist/actions/build.mjs +2 -2
  2. package/dist/actions/build.mjs.map +1 -1
  3. package/dist/actions/index.mjs +17 -2
  4. package/dist/actions/index.mjs.map +1 -1
  5. package/dist/actions/knip.mjs +113 -0
  6. package/dist/actions/knip.mjs.map +1 -0
  7. package/dist/actions/relint.mjs.map +1 -1
  8. package/dist/bin/xy.mjs +23 -2
  9. package/dist/bin/xy.mjs.map +1 -1
  10. package/dist/index.d.ts +3 -1
  11. package/dist/index.mjs +24 -2
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/types/actions/index.d.ts +1 -0
  14. package/dist/types/actions/index.d.ts.map +1 -1
  15. package/dist/types/actions/knip.d.ts +2 -0
  16. package/dist/types/actions/knip.d.ts.map +1 -0
  17. package/dist/types/actions/relint.d.ts.map +1 -1
  18. package/dist/types/xy/xyLintCommands.d.ts.map +1 -1
  19. package/dist/xy/index.mjs +23 -2
  20. package/dist/xy/index.mjs.map +1 -1
  21. package/dist/xy/xy.mjs +23 -2
  22. package/dist/xy/xy.mjs.map +1 -1
  23. package/dist/xy/xyBuildCommands.mjs +2 -2
  24. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  25. package/dist/xy/xyLintCommands.mjs +21 -0
  26. package/dist/xy/xyLintCommands.mjs.map +1 -1
  27. package/package.json +10 -4
  28. package/spec/yarn/workspace/tsconfig.json +0 -3
  29. package/src/actions/build.ts +0 -34
  30. package/src/actions/clean-docs.ts +0 -12
  31. package/src/actions/clean-eslint.ts +0 -15
  32. package/src/actions/clean-jest.ts +0 -7
  33. package/src/actions/clean.ts +0 -26
  34. package/src/actions/compile-types.ts +0 -67
  35. package/src/actions/compile.ts +0 -67
  36. package/src/actions/copy-assets.ts +0 -70
  37. package/src/actions/cycle.ts +0 -15
  38. package/src/actions/dead.ts +0 -5
  39. package/src/actions/deploy-major.ts +0 -11
  40. package/src/actions/deploy-minor.ts +0 -11
  41. package/src/actions/deploy-next.ts +0 -11
  42. package/src/actions/deploy.ts +0 -11
  43. package/src/actions/deps.ts +0 -43
  44. package/src/actions/dupdeps.ts +0 -12
  45. package/src/actions/fix.ts +0 -6
  46. package/src/actions/gen-docs.ts +0 -26
  47. package/src/actions/gitignore-gen.ts +0 -5
  48. package/src/actions/gitlint-fix.ts +0 -27
  49. package/src/actions/gitlint.ts +0 -46
  50. package/src/actions/index.ts +0 -37
  51. package/src/actions/license.ts +0 -81
  52. package/src/actions/lint.ts +0 -61
  53. package/src/actions/npmignore-gen.ts +0 -5
  54. package/src/actions/package/clean-outputs.ts +0 -18
  55. package/src/actions/package/clean-typescript.ts +0 -18
  56. package/src/actions/package/clean.ts +0 -6
  57. package/src/actions/package/compile/XyConfig.ts +0 -60
  58. package/src/actions/package/compile/buildEntries.ts +0 -22
  59. package/src/actions/package/compile/compile.ts +0 -21
  60. package/src/actions/package/compile/compileTypes.ts +0 -13
  61. package/src/actions/package/compile/copyTypeFiles.ts +0 -38
  62. package/src/actions/package/compile/deepMerge.ts +0 -33
  63. package/src/actions/package/compile/getCompilerOptions.ts +0 -30
  64. package/src/actions/package/compile/index.ts +0 -6
  65. package/src/actions/package/compile/inputs.ts +0 -6
  66. package/src/actions/package/compile/packageCompileTsc.ts +0 -67
  67. package/src/actions/package/compile/packageCompileTscTypes.ts +0 -68
  68. package/src/actions/package/compile/packageCompileTsup.ts +0 -154
  69. package/src/actions/package/copy-assets.ts +0 -46
  70. package/src/actions/package/deps.ts +0 -144
  71. package/src/actions/package/gen-docs.ts +0 -126
  72. package/src/actions/package/index.ts +0 -10
  73. package/src/actions/package/lint.ts +0 -86
  74. package/src/actions/package/publint.ts +0 -75
  75. package/src/actions/package/recompile.ts +0 -6
  76. package/src/actions/publint.ts +0 -26
  77. package/src/actions/rebuild.ts +0 -13
  78. package/src/actions/recompile.ts +0 -81
  79. package/src/actions/reinstall.ts +0 -29
  80. package/src/actions/relint.ts +0 -76
  81. package/src/actions/retest.ts +0 -8
  82. package/src/actions/sonar.ts +0 -5
  83. package/src/actions/statics.ts +0 -13
  84. package/src/actions/test.ts +0 -5
  85. package/src/actions/up.ts +0 -5
  86. package/src/actions/updo.ts +0 -9
  87. package/src/actions/upplug.ts +0 -10
  88. package/src/actions/upyarn.ts +0 -5
  89. package/src/actions/yarn3only.ts +0 -9
  90. package/src/bin/package/build-only.ts +0 -16
  91. package/src/bin/package/build.ts +0 -16
  92. package/src/bin/package/clean-outputs.ts +0 -5
  93. package/src/bin/package/clean-typescript.ts +0 -5
  94. package/src/bin/package/clean.ts +0 -12
  95. package/src/bin/package/compile-only.ts +0 -12
  96. package/src/bin/package/compile-tsup.ts +0 -12
  97. package/src/bin/package/compile-types.ts +0 -16
  98. package/src/bin/package/compile.ts +0 -16
  99. package/src/bin/package/copy-assets-cjs.ts +0 -12
  100. package/src/bin/package/copy-assets-esm.ts +0 -12
  101. package/src/bin/package/deps.ts +0 -12
  102. package/src/bin/package/fix.ts +0 -16
  103. package/src/bin/package/gen-docs.ts +0 -12
  104. package/src/bin/package/lint.ts +0 -16
  105. package/src/bin/package/publint.ts +0 -13
  106. package/src/bin/package/recompile.ts +0 -12
  107. package/src/bin/package/relint.ts +0 -16
  108. package/src/bin/xy.ts +0 -12
  109. package/src/index.ts +0 -4
  110. package/src/lib/checkResult.ts +0 -12
  111. package/src/lib/createBuildConfig.ts +0 -37
  112. package/src/lib/defaultBuildConfig.ts +0 -18
  113. package/src/lib/deleteGlob.ts +0 -13
  114. package/src/lib/dependencies/DuplicateDetector.ts +0 -97
  115. package/src/lib/dependencies/detectDuplicateDependencies.ts +0 -41
  116. package/src/lib/dependencies/index.ts +0 -2
  117. package/src/lib/file/ReadFileSyncOptions.ts +0 -6
  118. package/src/lib/file/constants.ts +0 -2
  119. package/src/lib/file/fileLines.ts +0 -25
  120. package/src/lib/file/index.ts +0 -4
  121. package/src/lib/file/tryReadFileSync.ts +0 -9
  122. package/src/lib/generateIgnoreFiles.ts +0 -31
  123. package/src/lib/index.ts +0 -20
  124. package/src/lib/jsonFormatters.ts +0 -6
  125. package/src/lib/loadConfig.ts +0 -19
  126. package/src/lib/parsedPackageJSON.ts +0 -7
  127. package/src/lib/processEx.ts +0 -27
  128. package/src/lib/runSteps.ts +0 -40
  129. package/src/lib/runStepsAsync.ts +0 -53
  130. package/src/lib/runXy.ts +0 -8
  131. package/src/lib/runXyWithWarning.ts +0 -9
  132. package/src/lib/safeExit.ts +0 -29
  133. package/src/lib/string/empty.ts +0 -2
  134. package/src/lib/string/index.ts +0 -2
  135. package/src/lib/string/union.ts +0 -1
  136. package/src/lib/withErrnoException.ts +0 -7
  137. package/src/lib/withError.ts +0 -8
  138. package/src/lib/yarn/index.ts +0 -3
  139. package/src/lib/yarn/isYarnVersionOrGreater.ts +0 -16
  140. package/src/lib/yarn/workspace/Workspace.ts +0 -4
  141. package/src/lib/yarn/workspace/index.ts +0 -3
  142. package/src/lib/yarn/workspace/yarnWorkspace.ts +0 -8
  143. package/src/lib/yarn/workspace/yarnWorkspaces.ts +0 -21
  144. package/src/lib/yarn/yarnInitCwd.ts +0 -4
  145. package/src/loadPackageConfig.ts +0 -13
  146. package/src/types.d.ts +0 -26
  147. package/src/xy/index.ts +0 -7
  148. package/src/xy/param.ts +0 -5
  149. package/src/xy/xy.ts +0 -20
  150. package/src/xy/xyBuildCommands.ts +0 -127
  151. package/src/xy/xyCommonCommands.ts +0 -167
  152. package/src/xy/xyDeployCommands.ts +0 -53
  153. package/src/xy/xyInstallCommands.ts +0 -80
  154. package/src/xy/xyLintCommands.ts +0 -92
  155. package/src/xy/xyParseOptions.ts +0 -58
  156. package/tsconfig.build.json +0 -29
  157. package/tsconfig.json +0 -4
  158. package/tsconfig.test.json +0 -4
  159. package/tsup.config.ts +0 -16
  160. package/types/node-cmd.d.ts +0 -1
  161. package/xy.config.ts +0 -3
package/dist/index.d.ts CHANGED
@@ -127,6 +127,8 @@ declare const gitlint: () => 1 | 0;
127
127
 
128
128
  declare const gitlintFix: () => number;
129
129
 
130
+ declare const knip: () => number;
131
+
130
132
  declare const license: (pkg?: string) => Promise<number>;
131
133
 
132
134
  declare const npmignoreGen: (pkg?: string) => 1 | 0;
@@ -386,4 +388,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
386
388
 
387
389
  declare const xyParseOptions: () => Argv;
388
390
 
389
- export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CompileTypesParams, 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 RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileTypes, compileTypesAll, compileTypesPackage, 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, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCompileTypes, packageCopyAssets, packageDeps, 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 };
391
+ export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CompileTypesParams, 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 RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileTypes, compileTypesAll, compileTypesPackage, 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, knip, license, lint, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCompileTypes, packageCopyAssets, packageDeps, 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 };
package/dist/index.mjs CHANGED
@@ -580,7 +580,7 @@ var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose,
580
580
  "yarn",
581
581
  [
582
582
  "xy",
583
- "deps",
583
+ "publint",
584
584
  ...pkgOptions,
585
585
  ...verboseOptions,
586
586
  ...jobsOptions,
@@ -591,7 +591,7 @@ var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose,
591
591
  "yarn",
592
592
  [
593
593
  "xy",
594
- "publint",
594
+ "knip",
595
595
  ...pkgOptions,
596
596
  ...verboseOptions,
597
597
  ...jobsOptions,
@@ -1285,6 +1285,20 @@ Gitlint Fix Start [${process.cwd()}]
1285
1285
  return 1;
1286
1286
  }, "gitlintFix");
1287
1287
 
1288
+ // src/actions/knip.ts
1289
+ var knip = /* @__PURE__ */ __name(() => {
1290
+ return runSteps("Knip", [
1291
+ [
1292
+ "yarn",
1293
+ [
1294
+ "knip",
1295
+ "--dependencies",
1296
+ "--no-exit-code"
1297
+ ]
1298
+ ]
1299
+ ]);
1300
+ }, "knip");
1301
+
1288
1302
  // src/actions/license.ts
1289
1303
  import chalk19 from "chalk";
1290
1304
  import { init } from "license-checker";
@@ -2915,6 +2929,13 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
2915
2929
  verbose: !!argv.verbose
2916
2930
  });
2917
2931
  console.log(chalk33.blue(`Finished in ${Date.now() - start}ms`));
2932
+ }).command("knip", "Knip - Run Knip", (yargs2) => {
2933
+ return packagePositionalParam(yargs2);
2934
+ }, (argv) => {
2935
+ if (argv.verbose) console.log("Knip");
2936
+ const start = Date.now();
2937
+ process.exitCode = knip();
2938
+ console.log(chalk33.blue(`Knip finished in ${Date.now() - start}ms`));
2918
2939
  }).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
2919
2940
  return packagePositionalParam(yargs2);
2920
2941
  }, (argv) => {
@@ -3030,6 +3051,7 @@ export {
3030
3051
  gitlint,
3031
3052
  gitlintFix,
3032
3053
  isYarnVersionOrGreater,
3054
+ knip,
3033
3055
  license,
3034
3056
  lint,
3035
3057
  lintAllPackages,