@xylabs/ts-scripts-yarn3 7.4.9 → 7.4.11

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 (55) hide show
  1. package/dist/actions/claude-commands.mjs +99 -0
  2. package/dist/actions/claude-commands.mjs.map +1 -0
  3. package/dist/actions/claude-rules.mjs.map +1 -1
  4. package/dist/actions/deplint/checkPackage/checkPackage.mjs +115 -16
  5. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
  6. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +2 -1
  7. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
  8. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs +114 -20
  9. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs.map +1 -1
  10. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +2 -1
  11. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
  12. package/dist/actions/deplint/checkPackage/index.mjs +115 -16
  13. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
  14. package/dist/actions/deplint/deplint.mjs +166 -38
  15. package/dist/actions/deplint/deplint.mjs.map +1 -1
  16. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs +140 -0
  17. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs.map +1 -0
  18. package/dist/actions/deplint/getScriptReferencedPackages.mjs +3 -1
  19. package/dist/actions/deplint/getScriptReferencedPackages.mjs.map +1 -1
  20. package/dist/actions/deplint/index.mjs +166 -38
  21. package/dist/actions/deplint/index.mjs.map +1 -1
  22. package/dist/actions/index.mjs +368 -180
  23. package/dist/actions/index.mjs.map +1 -1
  24. package/dist/bin/xy.mjs +356 -134
  25. package/dist/bin/xy.mjs.map +1 -1
  26. package/dist/index.d.ts +27 -2
  27. package/dist/index.mjs +398 -194
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/lib/claudeMdTemplate.mjs +12 -0
  30. package/dist/lib/claudeMdTemplate.mjs.map +1 -1
  31. package/dist/lib/index.mjs +12 -0
  32. package/dist/lib/index.mjs.map +1 -1
  33. package/dist/xy/index.mjs +356 -134
  34. package/dist/xy/index.mjs.map +1 -1
  35. package/dist/xy/xy.mjs +356 -134
  36. package/dist/xy/xy.mjs.map +1 -1
  37. package/dist/xy/xyCommonCommands.mjs +122 -34
  38. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  39. package/dist/xy/xyLintCommands.mjs +205 -71
  40. package/dist/xy/xyLintCommands.mjs.map +1 -1
  41. package/package.json +2 -2
  42. package/templates/commands/xylabs-build.md +5 -0
  43. package/templates/commands/xylabs-clean.md +5 -0
  44. package/templates/commands/xylabs-compile.md +5 -0
  45. package/templates/commands/xylabs-cycle.md +5 -0
  46. package/templates/commands/xylabs-deplint.md +5 -0
  47. package/templates/commands/xylabs-deploy-major.md +7 -0
  48. package/templates/commands/xylabs-deploy-minor.md +7 -0
  49. package/templates/commands/xylabs-deploy.md +7 -0
  50. package/templates/commands/xylabs-fix.md +5 -0
  51. package/templates/commands/xylabs-knip.md +5 -0
  52. package/templates/commands/xylabs-lint.md +5 -0
  53. package/templates/commands/xylabs-publint.md +5 -0
  54. package/templates/commands/xylabs-rebuild.md +5 -0
  55. package/templates/commands/xylabs-test.md +5 -0
package/dist/index.d.ts CHANGED
@@ -15,6 +15,8 @@ interface BuildParams {
15
15
  }
16
16
  declare const build: ({ incremental, jobs, target, verbose, pkg, }: BuildParams) => Promise<number>;
17
17
 
18
+ declare const claudeCommands: () => number;
19
+
18
20
  declare const claudeRules: ({ force }?: {
19
21
  force?: boolean;
20
22
  }) => number;
@@ -78,7 +80,9 @@ declare const dead: () => number;
78
80
  declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
79
81
 
80
82
  declare const XYLABS_RULES_PREFIX = "xylabs-";
83
+ declare const XYLABS_COMMANDS_PREFIX = "xylabs-";
81
84
  declare const claudeMdRuleTemplates: () => Record<string, string>;
85
+ declare const claudeCommandTemplates: () => Record<string, string>;
82
86
  declare const claudeMdProjectTemplate: () => string;
83
87
 
84
88
  declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
@@ -169,14 +173,21 @@ declare const INIT_CWD: () => string | undefined;
169
173
  interface CheckPackageOptions {
170
174
  deps?: boolean;
171
175
  devDeps?: boolean;
176
+ /**
177
+ * Set of package names to exclude from unused-dependency checks.
178
+ * Loaded from xy.config's deplint.exclude field.
179
+ */
180
+ exclude?: Set<string>;
172
181
  peerDeps?: boolean;
173
182
  verbose?: boolean;
174
183
  }
175
184
 
176
185
  interface DepLintOptions extends CheckPackageOptions {
186
+ /** Package names to exclude, passed via --exclude on the command line */
187
+ cliExclude?: string[];
177
188
  pkg?: string;
178
189
  }
179
- declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, }: DepLintOptions) => number;
190
+ declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, cliExclude, }: DepLintOptions) => Promise<number>;
180
191
 
181
192
  declare const deploy: () => number;
182
193
 
@@ -277,8 +288,22 @@ type PackageCompileTsupConfig = CompileConfig & {
277
288
  type PackageCompileTscConfig = CompileConfig & {
278
289
  mode: 'tsc';
279
290
  };
291
+ /**
292
+ * Configuration for deplint (dependency linting).
293
+ */
294
+ interface DeplintConfig {
295
+ /**
296
+ * Package names to exclude from unused-dependency checks.
297
+ * Packages listed here will never be reported as "unused" by deplint,
298
+ * even if no import for them is detected in source or dist files.
299
+ * Useful for packages that are used implicitly (e.g. runtime plugins,
300
+ * CSS-in-JS themes, or polyfills that have side effects on import).
301
+ */
302
+ exclude?: string[];
303
+ }
280
304
  interface XyConfigBase {
281
305
  compile?: CompileConfig;
306
+ deplint?: DeplintConfig;
282
307
  dynamicShare?: DynamicShareConfig;
283
308
  liveShare?: LiveShareConfig;
284
309
  /** @deprecated */
@@ -440,4 +465,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
440
465
 
441
466
  declare const xyParseOptions: () => Argv;
442
467
 
443
- 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_RULES_PREFIX, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, 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 };
468
+ 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 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 };