@xylabs/ts-scripts-yarn3 7.4.10 → 7.4.12

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 (40) hide show
  1. package/dist/actions/deplint/checkPackage/checkPackage.mjs +115 -16
  2. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
  3. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +2 -1
  4. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
  5. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs +114 -20
  6. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs.map +1 -1
  7. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +2 -1
  8. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
  9. package/dist/actions/deplint/checkPackage/index.mjs +115 -16
  10. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
  11. package/dist/actions/deplint/deplint.mjs +166 -38
  12. package/dist/actions/deplint/deplint.mjs.map +1 -1
  13. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs +140 -0
  14. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs.map +1 -0
  15. package/dist/actions/deplint/getScriptReferencedPackages.mjs +3 -1
  16. package/dist/actions/deplint/getScriptReferencedPackages.mjs.map +1 -1
  17. package/dist/actions/deplint/index.mjs +166 -38
  18. package/dist/actions/deplint/index.mjs.map +1 -1
  19. package/dist/actions/index.mjs +441 -188
  20. package/dist/actions/index.mjs.map +1 -1
  21. package/dist/actions/readme-gen.mjs +173 -0
  22. package/dist/actions/readme-gen.mjs.map +1 -0
  23. package/dist/bin/xy.mjs +432 -130
  24. package/dist/bin/xy.mjs.map +1 -1
  25. package/dist/index.d.ts +39 -2
  26. package/dist/index.mjs +490 -207
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/lib/generateReadmeFiles.mjs +160 -0
  29. package/dist/lib/generateReadmeFiles.mjs.map +1 -0
  30. package/dist/lib/index.mjs +145 -14
  31. package/dist/lib/index.mjs.map +1 -1
  32. package/dist/xy/index.mjs +432 -130
  33. package/dist/xy/index.mjs.map +1 -1
  34. package/dist/xy/xy.mjs +432 -130
  35. package/dist/xy/xy.mjs.map +1 -1
  36. package/dist/xy/xyCommonCommands.mjs +210 -42
  37. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  38. package/dist/xy/xyLintCommands.mjs +205 -71
  39. package/dist/xy/xyLintCommands.mjs.map +1 -1
  40. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -126,6 +126,14 @@ declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) =>
126
126
 
127
127
  declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
128
128
 
129
+ interface GenerateReadmeFilesParams {
130
+ pkg?: string;
131
+ templatePath?: string;
132
+ typedoc?: boolean;
133
+ verbose?: boolean;
134
+ }
135
+ declare function generateReadmeFiles({ pkg, templatePath, typedoc, verbose, }: GenerateReadmeFilesParams): Promise<number>;
136
+
129
137
  declare const multiLineToJSONArray: (output: string) => any;
130
138
 
131
139
  declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
@@ -173,14 +181,21 @@ declare const INIT_CWD: () => string | undefined;
173
181
  interface CheckPackageOptions {
174
182
  deps?: boolean;
175
183
  devDeps?: boolean;
184
+ /**
185
+ * Set of package names to exclude from unused-dependency checks.
186
+ * Loaded from xy.config's deplint.exclude field.
187
+ */
188
+ exclude?: Set<string>;
176
189
  peerDeps?: boolean;
177
190
  verbose?: boolean;
178
191
  }
179
192
 
180
193
  interface DepLintOptions extends CheckPackageOptions {
194
+ /** Package names to exclude, passed via --exclude on the command line */
195
+ cliExclude?: string[];
181
196
  pkg?: string;
182
197
  }
183
- declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, }: DepLintOptions) => number;
198
+ declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, cliExclude, }: DepLintOptions) => Promise<number>;
184
199
 
185
200
  declare const deploy: () => number;
186
201
 
@@ -281,8 +296,22 @@ type PackageCompileTsupConfig = CompileConfig & {
281
296
  type PackageCompileTscConfig = CompileConfig & {
282
297
  mode: 'tsc';
283
298
  };
299
+ /**
300
+ * Configuration for deplint (dependency linting).
301
+ */
302
+ interface DeplintConfig {
303
+ /**
304
+ * Package names to exclude from unused-dependency checks.
305
+ * Packages listed here will never be reported as "unused" by deplint,
306
+ * even if no import for them is detected in source or dist files.
307
+ * Useful for packages that are used implicitly (e.g. runtime plugins,
308
+ * CSS-in-JS themes, or polyfills that have side effects on import).
309
+ */
310
+ exclude?: string[];
311
+ }
284
312
  interface XyConfigBase {
285
313
  compile?: CompileConfig;
314
+ deplint?: DeplintConfig;
286
315
  dynamicShare?: DynamicShareConfig;
287
316
  liveShare?: LiveShareConfig;
288
317
  /** @deprecated */
@@ -360,6 +389,14 @@ declare const publintAll: ({ verbose }: PublintParams) => number;
360
389
 
361
390
  declare const publish: () => number;
362
391
 
392
+ interface ReadmeGenParams {
393
+ pkg?: string;
394
+ templatePath?: string;
395
+ typedoc?: boolean;
396
+ verbose?: boolean;
397
+ }
398
+ declare function readmeGen({ pkg, templatePath, typedoc, verbose, }: ReadmeGenParams): Promise<number>;
399
+
363
400
  interface RebuildParams {
364
401
  pkg?: string;
365
402
  target?: 'esm' | 'cjs';
@@ -444,4 +481,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
444
481
 
445
482
  declare const xyParseOptions: () => Argv;
446
483
 
447
- 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, XYLABS_COMMANDS_PREFIX, XYLABS_RULES_PREFIX, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, claudeCommandTemplates, claudeCommands, claudeMdProjectTemplate, claudeMdRuleTemplates, claudeRules, 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, publish, 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 };
484
+ export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CopyAssetsParams, type CycleParams, type DepLintOptions, type DeplintConfig, 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 ReadmeGenParams, type RebuildParams, type RecompilePackageParams, type RecompileParams, type RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, XYLABS_COMMANDS_PREFIX, XYLABS_RULES_PREFIX, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, claudeCommandTemplates, claudeCommands, claudeMdProjectTemplate, claudeMdRuleTemplates, claudeRules, 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, generateReadmeFiles, 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, publish, readLines, readNonEmptyLines, readmeGen, 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 };