@outfitter/tooling 0.3.4 → 0.3.5

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 (50) hide show
  1. package/README.md +12 -3
  2. package/dist/cli/check-changeset.d.ts +28 -12
  3. package/dist/cli/check-changeset.js +5 -1
  4. package/dist/cli/check-exports.d.ts +2 -1
  5. package/dist/cli/check-exports.js +6 -3
  6. package/dist/cli/check-home-paths.d.ts +31 -0
  7. package/dist/cli/check-home-paths.js +12 -0
  8. package/dist/cli/check-readme-imports.d.ts +2 -1
  9. package/dist/cli/check-tsdoc.d.ts +4 -1
  10. package/dist/cli/check-tsdoc.js +16 -10
  11. package/dist/cli/index.js +16 -4
  12. package/dist/cli/internal/exports-analysis.d.ts +2 -0
  13. package/dist/cli/internal/exports-analysis.js +10 -0
  14. package/dist/cli/internal/exports-fs.d.ts +17 -0
  15. package/dist/cli/internal/exports-fs.js +9 -0
  16. package/dist/cli/internal/pre-push-checks.d.ts +2 -0
  17. package/dist/cli/internal/pre-push-checks.js +37 -0
  18. package/dist/cli/internal/tsdoc-analysis.d.ts +3 -0
  19. package/dist/cli/internal/tsdoc-analysis.js +26 -0
  20. package/dist/cli/internal/tsdoc-formatting.d.ts +3 -0
  21. package/dist/cli/internal/tsdoc-formatting.js +10 -0
  22. package/dist/cli/internal/tsdoc-types.d.ts +2 -0
  23. package/dist/cli/internal/tsdoc-types.js +16 -0
  24. package/dist/cli/pre-push.d.ts +2 -55
  25. package/dist/cli/pre-push.js +6 -4
  26. package/dist/index.d.ts +4 -1
  27. package/dist/shared/@outfitter/tooling-0zjz8eg9.js +106 -0
  28. package/dist/shared/@outfitter/tooling-2vv5y3s4.js +145 -0
  29. package/dist/shared/@outfitter/{tooling-875svjnz.js → tooling-5xxctk9b.js} +2 -113
  30. package/dist/shared/@outfitter/tooling-5ynz680q.js +59 -0
  31. package/dist/shared/@outfitter/tooling-7437rmy6.js +39 -0
  32. package/dist/shared/@outfitter/tooling-8qcwr06t.d.ts +74 -0
  33. package/dist/shared/@outfitter/tooling-a59br34g.js +32 -0
  34. package/dist/shared/@outfitter/tooling-a6q3zh7t.js +86 -0
  35. package/dist/shared/@outfitter/tooling-ayps7c4x.js +58 -0
  36. package/dist/shared/@outfitter/{tooling-d363b88r.js → tooling-c8q6mj8z.js} +27 -148
  37. package/dist/shared/@outfitter/{tooling-wesswf21.d.ts → tooling-cb0b8wsx.d.ts} +9 -11
  38. package/dist/shared/@outfitter/tooling-f8q38e9z.d.ts +16 -0
  39. package/dist/shared/@outfitter/tooling-h5dnevjw.js +139 -0
  40. package/dist/shared/@outfitter/tooling-j8d1h2zd.d.ts +10 -0
  41. package/dist/shared/@outfitter/tooling-mq2xvz96.js +285 -0
  42. package/dist/shared/@outfitter/tooling-stgnc2zx.d.ts +85 -0
  43. package/dist/shared/@outfitter/tooling-tj9p41vj.d.ts +55 -0
  44. package/dist/shared/@outfitter/tooling-y43b117h.d.ts +13 -0
  45. package/lefthook.yml +5 -1
  46. package/package.json +10 -4
  47. package/registry/registry.json +5 -5
  48. package/dist/shared/@outfitter/tooling-6cxfdx0q.js +0 -187
  49. package/dist/shared/@outfitter/tooling-h04te11c.js +0 -231
  50. package/dist/shared/@outfitter/tooling-njw4z34x.d.ts +0 -140
package/README.md CHANGED
@@ -80,8 +80,9 @@ RED phase branches follow these patterns:
80
80
 
81
81
  Verification order:
82
82
 
83
- 1. Run `verify:ci` if present.
84
- 2. Otherwise run strict fallback: `typecheck`, `check|lint`, `build`, `test`.
83
+ 1. Run `verify:push` if present.
84
+ 2. Otherwise run `verify:ci` if present.
85
+ 3. Otherwise run strict fallback: `typecheck`, `check|lint`, `build`, `test`.
85
86
 
86
87
  ```bash
87
88
  # Normal usage (in lefthook.yml)
@@ -112,7 +113,15 @@ bunx @outfitter/tooling check-bunup-registry
112
113
 
113
114
  ### `tooling check-changeset`
114
115
 
115
- Validate that PRs touching package source include a changeset.
116
+ Validate that release-relevant package changes in the current PR diff include a
117
+ changeset.
118
+
119
+ - In GitHub `pull_request` CI, the command diffs against the PR's current
120
+ `base.sha...head.sha` from the event payload. This keeps stacked PRs valid
121
+ after lower branches merge and Graphite retargets descendants.
122
+ - Outside `pull_request` CI, it falls back to `origin/main...HEAD`.
123
+ - Test-only package files are ignored: `src/__tests__/`, `src/__snapshots__/`,
124
+ `*.test.*`, and `*.spec.*`.
116
125
 
117
126
  ```bash
118
127
  bunx @outfitter/tooling check-changeset
@@ -7,11 +7,19 @@ interface ChangesetIgnoredReference {
7
7
  readonly file: string;
8
8
  readonly packages: string[];
9
9
  }
10
+ interface GitDiffRange {
11
+ readonly base: string;
12
+ readonly head: string;
13
+ readonly label: string;
14
+ readonly source: "pull_request" | "default";
15
+ }
16
+ declare function getReleasableChangedPackages(changedPackages: readonly string[], ignoredPackages: readonly string[]): string[];
10
17
  /**
11
18
  * Extract unique package names from changed file paths.
12
19
  *
13
- * Only considers files matching the pattern "packages/NAME/src/..." and
14
- * ignores apps/, root files, and package-level config.
20
+ * Only considers release-relevant files matching the pattern
21
+ * "packages/NAME/src/...". Test-only sources are ignored so stacked follow-up
22
+ * PRs do not need changesets for coverage-only edits.
15
23
  *
16
24
  * @param files - List of changed file paths relative to repo root
17
25
  * @returns Sorted array of unique package names
@@ -29,18 +37,25 @@ declare function getChangedPackagePaths(files: string[]): string[];
29
37
  */
30
38
  declare function getChangedChangesetFiles(files: string[]): string[];
31
39
  /**
32
- * Determine whether a changeset is required and present.
40
+ * Determine whether releasable packages are fully covered by the current PR changesets.
33
41
  *
34
- * Returns `ok: true` when either no packages were changed or at least one
35
- * changeset file exists. Returns `ok: false` with the list of changed
36
- * packages when changesets are missing.
42
+ * Returns `ok: true` when either no releasable packages changed or every
43
+ * releasable package is mentioned in at least one changed changeset file.
44
+ * Returns `ok: false` with the list of uncovered releasable packages when
45
+ * changeset coverage is incomplete.
37
46
  *
38
- * @param changedPackages - Package names with source changes
47
+ * @param releasablePackages - Changed packages that are not ignored by changeset config
39
48
  * @param changesetFiles - Changeset filenames found in `.changeset/`
49
+ * @param coveredPackages - Workspace package names referenced by the changed changesets
40
50
  */
41
- declare function checkChangesetRequired(changedPackages: string[], changesetFiles: string[]): ChangesetCheckResult;
51
+ declare function checkChangesetRequired(releasablePackages: string[], changesetFiles: string[], coveredPackages?: string[]): ChangesetCheckResult;
42
52
  declare function parseIgnoredPackagesFromChangesetConfig(jsonContent: string): string[];
43
53
  declare function parseChangesetFrontmatterPackageNames(markdownContent: string): string[];
54
+ declare function resolveGitDiffRange(input: {
55
+ readonly eventName?: string | undefined;
56
+ readonly eventPath?: string | undefined;
57
+ readonly readEventFile?: ((path: string) => string) | undefined;
58
+ }): GitDiffRange;
44
59
  declare function findIgnoredPackageReferences(input: {
45
60
  readonly changesetFiles: readonly string[];
46
61
  readonly ignoredPackages: readonly string[];
@@ -50,10 +65,11 @@ interface CheckChangesetOptions {
50
65
  readonly skip?: boolean;
51
66
  }
52
67
  /**
53
- * Run check-changeset to verify PRs include changeset files.
68
+ * Run check-changeset to verify release-relevant PR deltas include changeset files.
54
69
  *
55
- * Uses `git diff --name-only origin/main...HEAD` to detect changed files,
56
- * then checks for changeset presence when package source files are modified.
70
+ * Resolves the current diff range from pull request metadata in CI and falls
71
+ * back to `origin/main...HEAD` elsewhere. Release-relevant package changes in
72
+ * that diff must be covered by a current changeset.
57
73
  *
58
74
  * Skips silently when:
59
75
  * - `NO_CHANGESET=1` env var is set
@@ -63,4 +79,4 @@ interface CheckChangesetOptions {
63
79
  * - Git diff fails (local dev without origin)
64
80
  */
65
81
  declare function runCheckChangeset(options?: CheckChangesetOptions): Promise<void>;
66
- export { runCheckChangeset, parseIgnoredPackagesFromChangesetConfig, parseChangesetFrontmatterPackageNames, getChangedPackagePaths, getChangedChangesetFiles, findIgnoredPackageReferences, checkChangesetRequired, CheckChangesetOptions, ChangesetIgnoredReference, ChangesetCheckResult };
82
+ export { runCheckChangeset, resolveGitDiffRange, parseIgnoredPackagesFromChangesetConfig, parseChangesetFrontmatterPackageNames, getReleasableChangedPackages, getChangedPackagePaths, getChangedChangesetFiles, findIgnoredPackageReferences, checkChangesetRequired, GitDiffRange, CheckChangesetOptions, ChangesetIgnoredReference, ChangesetCheckResult };
@@ -4,15 +4,19 @@ import {
4
4
  findIgnoredPackageReferences,
5
5
  getChangedChangesetFiles,
6
6
  getChangedPackagePaths,
7
+ getReleasableChangedPackages,
7
8
  parseChangesetFrontmatterPackageNames,
8
9
  parseIgnoredPackagesFromChangesetConfig,
10
+ resolveGitDiffRange,
9
11
  runCheckChangeset
10
- } from "../shared/@outfitter/tooling-6cxfdx0q.js";
12
+ } from "../shared/@outfitter/tooling-mq2xvz96.js";
11
13
  import"../shared/@outfitter/tooling-jnrs9rqd.js";
12
14
  export {
13
15
  runCheckChangeset,
16
+ resolveGitDiffRange,
14
17
  parseIgnoredPackagesFromChangesetConfig,
15
18
  parseChangesetFrontmatterPackageNames,
19
+ getReleasableChangedPackages,
16
20
  getChangedPackagePaths,
17
21
  getChangedChangesetFiles,
18
22
  findIgnoredPackageReferences,
@@ -1,2 +1,3 @@
1
- import { CheckExportsOptions, CheckResult, CompareInput, ExportDrift, ExportMap, PackageResult, compareExports, entryToSubpath, resolveJsonMode, runCheckExports } from "../shared/@outfitter/tooling-wesswf21.js";
1
+ import { CheckExportsOptions, resolveJsonMode, runCheckExports } from "../shared/@outfitter/tooling-y43b117h.js";
2
+ import { CheckResult, CompareInput, ExportDrift, ExportMap, PackageResult, compareExports, entryToSubpath } from "../shared/@outfitter/tooling-cb0b8wsx.js";
2
3
  export { runCheckExports, resolveJsonMode, entryToSubpath, compareExports, PackageResult, ExportMap, ExportDrift, CompareInput, CheckResult, CheckExportsOptions };
@@ -1,10 +1,13 @@
1
1
  // @bun
2
2
  import {
3
- compareExports,
4
- entryToSubpath,
5
3
  resolveJsonMode,
6
4
  runCheckExports
7
- } from "../shared/@outfitter/tooling-h04te11c.js";
5
+ } from "../shared/@outfitter/tooling-0zjz8eg9.js";
6
+ import"../shared/@outfitter/tooling-a6q3zh7t.js";
7
+ import {
8
+ compareExports,
9
+ entryToSubpath
10
+ } from "../shared/@outfitter/tooling-ayps7c4x.js";
8
11
  import"../shared/@outfitter/tooling-jnrs9rqd.js";
9
12
  export {
10
13
  runCheckExports,
@@ -0,0 +1,31 @@
1
+ interface HomePathLeak {
2
+ readonly line: number;
3
+ readonly column: number;
4
+ readonly matchedText: string;
5
+ readonly lineText: string;
6
+ }
7
+ interface FileHomePathLeak extends HomePathLeak {
8
+ readonly filePath: string;
9
+ }
10
+ interface HomePathScanReadFailure {
11
+ readonly filePath: string;
12
+ readonly reason: string;
13
+ }
14
+ declare function findHomePathLeaks(content: string, homePathOrPattern: string | RegExp): HomePathLeak[];
15
+ interface ScanHomePathOptions {
16
+ readonly cwd?: string;
17
+ readonly homeDir?: string;
18
+ readonly readFile?: (path: string, encoding: "utf-8") => string;
19
+ }
20
+ interface RunCheckHomePathsOptions {
21
+ readonly setExitCode?: (code: number) => void;
22
+ readonly stderr?: Pick<typeof process.stderr, "write">;
23
+ readonly scanOptions?: ScanHomePathOptions;
24
+ }
25
+ interface HomePathScanResult {
26
+ readonly leaks: readonly FileHomePathLeak[];
27
+ readonly failures: readonly HomePathScanReadFailure[];
28
+ }
29
+ declare function scanFilesForHardcodedHomePaths(filePaths: readonly string[], options?: ScanHomePathOptions): HomePathScanResult;
30
+ declare function runCheckHomePaths(paths: readonly string[], options?: RunCheckHomePathsOptions): void;
31
+ export { scanFilesForHardcodedHomePaths, runCheckHomePaths, findHomePathLeaks, ScanHomePathOptions, RunCheckHomePathsOptions, HomePathScanResult, HomePathScanReadFailure, HomePathLeak, FileHomePathLeak };
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ findHomePathLeaks,
4
+ runCheckHomePaths,
5
+ scanFilesForHardcodedHomePaths
6
+ } from "../shared/@outfitter/tooling-h5dnevjw.js";
7
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
8
+ export {
9
+ scanFilesForHardcodedHomePaths,
10
+ runCheckHomePaths,
11
+ findHomePathLeaks
12
+ };
@@ -1,4 +1,5 @@
1
- import { ExportMap } from "../shared/@outfitter/tooling-wesswf21.js";
1
+ import "../shared/@outfitter/tooling-y43b117h.js";
2
+ import { ExportMap } from "../shared/@outfitter/tooling-cb0b8wsx.js";
2
3
  /** An import example extracted from a markdown code block */
3
4
  interface ImportExample {
4
5
  /** Package name, e.g. "@outfitter/cli" */
@@ -1,2 +1,5 @@
1
- import { CheckTsDocOptions, CoverageLevel, CoverageSummary, DeclarationCoverage, PackageCoverage, TsDocCheckResult, analyzeCheckTsdoc, analyzeSourceFile, calculateCoverage, classifyDeclaration, coverageLevelSchema, coverageSummarySchema, declarationCoverageSchema, getDeclarationKind, getDeclarationName, isExportedDeclaration, packageCoverageSchema, printCheckTsdocHuman, resolveJsonMode, runCheckTsdoc, tsDocCheckResultSchema } from "../shared/@outfitter/tooling-njw4z34x.js";
1
+ import { runCheckTsdoc } from "../shared/@outfitter/tooling-j8d1h2zd.js";
2
+ import { printCheckTsdocHuman, resolveJsonMode } from "../shared/@outfitter/tooling-f8q38e9z.js";
3
+ import { analyzeCheckTsdoc, analyzeSourceFile, calculateCoverage, classifyDeclaration, getDeclarationKind, getDeclarationName, isExportedDeclaration } from "../shared/@outfitter/tooling-stgnc2zx.js";
4
+ import { CheckTsDocOptions, CoverageLevel, CoverageSummary, DeclarationCoverage, PackageCoverage, TsDocCheckResult, coverageLevelSchema, coverageSummarySchema, declarationCoverageSchema, packageCoverageSchema, tsDocCheckResultSchema } from "../shared/@outfitter/tooling-tj9p41vj.js";
2
5
  export { tsDocCheckResultSchema, runCheckTsdoc, resolveJsonMode, printCheckTsdocHuman, packageCoverageSchema, isExportedDeclaration, getDeclarationName, getDeclarationKind, declarationCoverageSchema, coverageSummarySchema, coverageLevelSchema, classifyDeclaration, calculateCoverage, analyzeSourceFile, analyzeCheckTsdoc, TsDocCheckResult, PackageCoverage, DeclarationCoverage, CoverageSummary, CoverageLevel, CheckTsDocOptions };
@@ -1,21 +1,27 @@
1
1
  // @bun
2
+ import {
3
+ runCheckTsdoc
4
+ } from "../shared/@outfitter/tooling-a59br34g.js";
5
+ import {
6
+ coverageLevelSchema,
7
+ coverageSummarySchema,
8
+ declarationCoverageSchema,
9
+ packageCoverageSchema,
10
+ tsDocCheckResultSchema
11
+ } from "../shared/@outfitter/tooling-7437rmy6.js";
12
+ import {
13
+ printCheckTsdocHuman,
14
+ resolveJsonMode
15
+ } from "../shared/@outfitter/tooling-5ynz680q.js";
2
16
  import {
3
17
  analyzeCheckTsdoc,
4
18
  analyzeSourceFile,
5
19
  calculateCoverage,
6
20
  classifyDeclaration,
7
- coverageLevelSchema,
8
- coverageSummarySchema,
9
- declarationCoverageSchema,
10
21
  getDeclarationKind,
11
22
  getDeclarationName,
12
- isExportedDeclaration,
13
- packageCoverageSchema,
14
- printCheckTsdocHuman,
15
- resolveJsonMode,
16
- runCheckTsdoc,
17
- tsDocCheckResultSchema
18
- } from "../shared/@outfitter/tooling-875svjnz.js";
23
+ isExportedDeclaration
24
+ } from "../shared/@outfitter/tooling-5xxctk9b.js";
19
25
  import"../shared/@outfitter/tooling-jnrs9rqd.js";
20
26
  export {
21
27
  tsDocCheckResultSchema,
package/dist/cli/index.js CHANGED
@@ -3,12 +3,16 @@
3
3
  import {
4
4
  runCheckCleanTree
5
5
  } from "../shared/@outfitter/tooling-gcdvsqqp.js";
6
+ import {
7
+ runCheckHomePaths
8
+ } from "../shared/@outfitter/tooling-h5dnevjw.js";
6
9
  import {
7
10
  runInit
8
11
  } from "../shared/@outfitter/tooling-9ram55dd.js";
9
12
  import {
10
13
  runPrePush
11
- } from "../shared/@outfitter/tooling-d363b88r.js";
14
+ } from "../shared/@outfitter/tooling-2vv5y3s4.js";
15
+ import"../shared/@outfitter/tooling-c8q6mj8z.js";
12
16
  import {
13
17
  runFix
14
18
  } from "../shared/@outfitter/tooling-1hez6j9d.js";
@@ -17,10 +21,15 @@ import {
17
21
  } from "../shared/@outfitter/tooling-amrbp7cm.js";
18
22
  import {
19
23
  runCheckTsdoc
20
- } from "../shared/@outfitter/tooling-875svjnz.js";
24
+ } from "../shared/@outfitter/tooling-a59br34g.js";
25
+ import"../shared/@outfitter/tooling-7437rmy6.js";
26
+ import"../shared/@outfitter/tooling-5ynz680q.js";
27
+ import"../shared/@outfitter/tooling-5xxctk9b.js";
21
28
  import {
22
29
  runCheckExports
23
- } from "../shared/@outfitter/tooling-h04te11c.js";
30
+ } from "../shared/@outfitter/tooling-0zjz8eg9.js";
31
+ import"../shared/@outfitter/tooling-a6q3zh7t.js";
32
+ import"../shared/@outfitter/tooling-ayps7c4x.js";
24
33
  import {
25
34
  runCheck
26
35
  } from "../shared/@outfitter/tooling-a4bfx4be.js";
@@ -36,7 +45,7 @@ import {
36
45
  } from "../shared/@outfitter/tooling-ctmgnap5.js";
37
46
  import {
38
47
  runCheckChangeset
39
- } from "../shared/@outfitter/tooling-6cxfdx0q.js";
48
+ } from "../shared/@outfitter/tooling-mq2xvz96.js";
40
49
  import {
41
50
  runCheckMarkdownLinks
42
51
  } from "../shared/@outfitter/tooling-ja1zg5yc.js";
@@ -95,6 +104,9 @@ register(new Command("check-tsdoc").description("Check TSDoc coverage on exporte
95
104
  register(new Command("check-clean-tree").description("Assert working tree is clean (no modified or untracked files)").option("--paths <paths...>", "Limit check to specific paths").action(async (options) => {
96
105
  await runCheckCleanTree(options);
97
106
  }));
107
+ register(new Command("check-home-paths").description("Check staged files for hardcoded home directory paths").argument("[paths...]", "Specific files to scan").action((paths) => {
108
+ runCheckHomePaths(paths);
109
+ }));
98
110
  register(new Command("check-readme-imports").description("Validate README import examples match package exports").option("--json", "Output results as JSON").action(async (options) => {
99
111
  const { runCheckReadmeImports } = await import("./check-readme-imports.js");
100
112
  await runCheckReadmeImports(options);
@@ -0,0 +1,2 @@
1
+ import { CheckResult, CompareInput, ExportDrift, ExportMap, PackageResult, compareExports, entryToSubpath } from "../../shared/@outfitter/tooling-cb0b8wsx.js";
2
+ export { entryToSubpath, compareExports, PackageResult, ExportMap, ExportDrift, CompareInput, CheckResult };
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import {
3
+ compareExports,
4
+ entryToSubpath
5
+ } from "../../shared/@outfitter/tooling-ayps7c4x.js";
6
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
7
+ export {
8
+ entryToSubpath,
9
+ compareExports
10
+ };
@@ -0,0 +1,17 @@
1
+ import { ExportMap } from "../../shared/@outfitter/tooling-cb0b8wsx.js";
2
+ /** Bunup workspace entry from bunup.config.ts */
3
+ interface WorkspaceEntry {
4
+ readonly name: string;
5
+ readonly root: string;
6
+ readonly config?: {
7
+ readonly exports?: boolean | {
8
+ readonly exclude?: readonly string[];
9
+ readonly customExports?: Readonly<Record<string, string>>;
10
+ };
11
+ };
12
+ }
13
+ /** Compute expected exports for a workspace package */
14
+ declare function computeExpectedExports(packageRoot: string, workspace: WorkspaceEntry, pkg: {
15
+ files?: string[];
16
+ }): ExportMap;
17
+ export { computeExpectedExports, WorkspaceEntry };
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import {
3
+ computeExpectedExports
4
+ } from "../../shared/@outfitter/tooling-a6q3zh7t.js";
5
+ import"../../shared/@outfitter/tooling-ayps7c4x.js";
6
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
7
+ export {
8
+ computeExpectedExports
9
+ };
@@ -0,0 +1,2 @@
1
+ import { BunVersionCheckResult, PushChangedFiles, VerificationPlan, areFilesTestOnly, canBypassRedPhaseByChangedFiles, checkBunVersion, createVerificationPlan, getChangedFilesForPush, getCurrentBranch, hasPackageSourceChanges, hasRedPhaseBranchInContext, isRedPhaseBranch, isReleaseBranch, isScaffoldBranch, isTestOnlyPath, printTsdocSummary, readPackageScripts, runGit } from "../../shared/@outfitter/tooling-8qcwr06t.js";
2
+ export { runGit, readPackageScripts, printTsdocSummary, isTestOnlyPath, isScaffoldBranch, isReleaseBranch, isRedPhaseBranch, hasRedPhaseBranchInContext, hasPackageSourceChanges, getCurrentBranch, getChangedFilesForPush, createVerificationPlan, checkBunVersion, canBypassRedPhaseByChangedFiles, areFilesTestOnly, VerificationPlan, PushChangedFiles, BunVersionCheckResult };
@@ -0,0 +1,37 @@
1
+ // @bun
2
+ import {
3
+ areFilesTestOnly,
4
+ canBypassRedPhaseByChangedFiles,
5
+ checkBunVersion,
6
+ createVerificationPlan,
7
+ getChangedFilesForPush,
8
+ getCurrentBranch,
9
+ hasPackageSourceChanges,
10
+ hasRedPhaseBranchInContext,
11
+ isRedPhaseBranch,
12
+ isReleaseBranch,
13
+ isScaffoldBranch,
14
+ isTestOnlyPath,
15
+ printTsdocSummary,
16
+ readPackageScripts,
17
+ runGit
18
+ } from "../../shared/@outfitter/tooling-c8q6mj8z.js";
19
+ import"../../shared/@outfitter/tooling-5xxctk9b.js";
20
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
21
+ export {
22
+ runGit,
23
+ readPackageScripts,
24
+ printTsdocSummary,
25
+ isTestOnlyPath,
26
+ isScaffoldBranch,
27
+ isReleaseBranch,
28
+ isRedPhaseBranch,
29
+ hasRedPhaseBranchInContext,
30
+ hasPackageSourceChanges,
31
+ getCurrentBranch,
32
+ getChangedFilesForPush,
33
+ createVerificationPlan,
34
+ checkBunVersion,
35
+ canBypassRedPhaseByChangedFiles,
36
+ areFilesTestOnly
37
+ };
@@ -0,0 +1,3 @@
1
+ import { analyzeCheckTsdoc, analyzePackage, analyzeSourceFile, calculateCoverage, classifyDeclaration, collectReExportedSourceFiles, discoverPackages, getDeclarationKind, getDeclarationName, isExportedDeclaration } from "../../shared/@outfitter/tooling-stgnc2zx.js";
2
+ import "../../shared/@outfitter/tooling-tj9p41vj.js";
3
+ export { isExportedDeclaration, getDeclarationName, getDeclarationKind, discoverPackages, collectReExportedSourceFiles, classifyDeclaration, calculateCoverage, analyzeSourceFile, analyzePackage, analyzeCheckTsdoc };
@@ -0,0 +1,26 @@
1
+ // @bun
2
+ import {
3
+ analyzeCheckTsdoc,
4
+ analyzePackage,
5
+ analyzeSourceFile,
6
+ calculateCoverage,
7
+ classifyDeclaration,
8
+ collectReExportedSourceFiles,
9
+ discoverPackages,
10
+ getDeclarationKind,
11
+ getDeclarationName,
12
+ isExportedDeclaration
13
+ } from "../../shared/@outfitter/tooling-5xxctk9b.js";
14
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
15
+ export {
16
+ isExportedDeclaration,
17
+ getDeclarationName,
18
+ getDeclarationKind,
19
+ discoverPackages,
20
+ collectReExportedSourceFiles,
21
+ classifyDeclaration,
22
+ calculateCoverage,
23
+ analyzeSourceFile,
24
+ analyzePackage,
25
+ analyzeCheckTsdoc
26
+ };
@@ -0,0 +1,3 @@
1
+ import { printCheckTsdocHuman, resolveJsonMode } from "../../shared/@outfitter/tooling-f8q38e9z.js";
2
+ import "../../shared/@outfitter/tooling-tj9p41vj.js";
3
+ export { resolveJsonMode, printCheckTsdocHuman };
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import {
3
+ printCheckTsdocHuman,
4
+ resolveJsonMode
5
+ } from "../../shared/@outfitter/tooling-5ynz680q.js";
6
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
7
+ export {
8
+ resolveJsonMode,
9
+ printCheckTsdocHuman
10
+ };
@@ -0,0 +1,2 @@
1
+ import { CheckTsDocOptions, CoverageLevel, CoverageSummary, DeclarationCoverage, PackageCoverage, TsDocCheckResult, coverageLevelSchema, coverageSummarySchema, declarationCoverageSchema, packageCoverageSchema, tsDocCheckResultSchema } from "../../shared/@outfitter/tooling-tj9p41vj.js";
2
+ export { tsDocCheckResultSchema, packageCoverageSchema, declarationCoverageSchema, coverageSummarySchema, coverageLevelSchema, TsDocCheckResult, PackageCoverage, DeclarationCoverage, CoverageSummary, CoverageLevel, CheckTsDocOptions };
@@ -0,0 +1,16 @@
1
+ // @bun
2
+ import {
3
+ coverageLevelSchema,
4
+ coverageSummarySchema,
5
+ declarationCoverageSchema,
6
+ packageCoverageSchema,
7
+ tsDocCheckResultSchema
8
+ } from "../../shared/@outfitter/tooling-7437rmy6.js";
9
+ import"../../shared/@outfitter/tooling-jnrs9rqd.js";
10
+ export {
11
+ tsDocCheckResultSchema,
12
+ packageCoverageSchema,
13
+ declarationCoverageSchema,
14
+ coverageSummarySchema,
15
+ coverageLevelSchema
16
+ };
@@ -1,60 +1,7 @@
1
- /**
2
- * Check if branch is a TDD RED phase branch
3
- */
4
- declare function isRedPhaseBranch(branch: string): boolean;
5
- /**
6
- * Check if branch is a scaffold branch
7
- */
8
- declare function isScaffoldBranch(branch: string): boolean;
9
- declare function isReleaseBranch(branch: string): boolean;
10
- declare function isTestOnlyPath(path: string): boolean;
11
- declare function areFilesTestOnly(paths: readonly string[]): boolean;
12
- interface PushChangedFiles {
13
- readonly files: readonly string[];
14
- readonly deterministic: boolean;
15
- readonly source: "upstream" | "baseRef" | "undetermined";
16
- }
17
- declare function canBypassRedPhaseByChangedFiles(changedFiles: PushChangedFiles): boolean;
18
- /**
19
- * Check whether any changed files are package source files.
20
- *
21
- * Matches files under "packages/PKGNAME/src/" (any depth).
22
- */
23
- declare function hasPackageSourceChanges(changedFiles: PushChangedFiles): boolean;
24
- type ScriptMap = Readonly<Record<string, string | undefined>>;
25
- type VerificationPlan = {
26
- readonly ok: true;
27
- readonly scripts: readonly string[];
28
- readonly source: "verify:ci" | "fallback";
29
- } | {
30
- readonly ok: false;
31
- readonly error: string;
32
- };
33
- /**
34
- * Derive strict pre-push verification from package scripts.
35
- *
36
- * Priority:
37
- * 1) `verify:ci`
38
- * 2) fallback sequence: `typecheck`, `check|lint`, `build`, `test`
39
- */
40
- declare function createVerificationPlan(scripts: ScriptMap): VerificationPlan;
41
- interface BunVersionCheckResult {
42
- readonly matches: boolean;
43
- readonly expected?: string;
44
- readonly actual?: string;
45
- }
46
- /**
47
- * Check that the local Bun version matches the pinned version in ".bun-version".
48
- *
49
- * @param projectRoot - Directory containing ".bun-version" (defaults to cwd)
50
- * @returns Result indicating whether versions match
51
- */
52
- declare function checkBunVersion(projectRoot?: string): BunVersionCheckResult;
1
+ import { BunVersionCheckResult, PushChangedFiles, VerificationPlan, areFilesTestOnly, canBypassRedPhaseByChangedFiles, checkBunVersion, createVerificationPlan, hasPackageSourceChanges, isRedPhaseBranch, isReleaseBranch, isScaffoldBranch, isTestOnlyPath } from "../shared/@outfitter/tooling-8qcwr06t.js";
53
2
  interface PrePushOptions {
54
3
  force?: boolean;
55
4
  }
56
- /**
57
- * Main pre-push command
58
- */
5
+ /** Main pre-push command */
59
6
  declare function runPrePush(options?: PrePushOptions): Promise<void>;
60
7
  export { runPrePush, isTestOnlyPath, isScaffoldBranch, isReleaseBranch, isRedPhaseBranch, hasPackageSourceChanges, createVerificationPlan, checkBunVersion, canBypassRedPhaseByChangedFiles, areFilesTestOnly, VerificationPlan, PushChangedFiles, PrePushOptions, BunVersionCheckResult };
@@ -1,4 +1,7 @@
1
1
  // @bun
2
+ import {
3
+ runPrePush
4
+ } from "../shared/@outfitter/tooling-2vv5y3s4.js";
2
5
  import {
3
6
  areFilesTestOnly,
4
7
  canBypassRedPhaseByChangedFiles,
@@ -8,10 +11,9 @@ import {
8
11
  isRedPhaseBranch,
9
12
  isReleaseBranch,
10
13
  isScaffoldBranch,
11
- isTestOnlyPath,
12
- runPrePush
13
- } from "../shared/@outfitter/tooling-d363b88r.js";
14
- import"../shared/@outfitter/tooling-875svjnz.js";
14
+ isTestOnlyPath
15
+ } from "../shared/@outfitter/tooling-c8q6mj8z.js";
16
+ import"../shared/@outfitter/tooling-5xxctk9b.js";
15
17
  import"../shared/@outfitter/tooling-jnrs9rqd.js";
16
18
  export {
17
19
  runPrePush,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- import { CheckTsDocOptions, CoverageLevel, DeclarationCoverage, PackageCoverage, TsDocCheckResult, analyzeCheckTsdoc, coverageLevelSchema, declarationCoverageSchema, packageCoverageSchema, printCheckTsdocHuman, tsDocCheckResultSchema } from "./shared/@outfitter/tooling-njw4z34x.js";
1
+ import "./shared/@outfitter/tooling-j8d1h2zd.js";
2
+ import { printCheckTsdocHuman } from "./shared/@outfitter/tooling-f8q38e9z.js";
3
+ import { analyzeCheckTsdoc } from "./shared/@outfitter/tooling-stgnc2zx.js";
4
+ import { CheckTsDocOptions, CoverageLevel, DeclarationCoverage, PackageCoverage, TsDocCheckResult, coverageLevelSchema, declarationCoverageSchema, packageCoverageSchema, tsDocCheckResultSchema } from "./shared/@outfitter/tooling-tj9p41vj.js";
2
5
  import { ParsedSemver, isTypesBunVersionCompatible, parseSemver } from "./shared/@outfitter/tooling-vjmhvpjq.js";
3
6
  import { VERSION } from "./shared/@outfitter/tooling-9vs606gq.js";
4
7
  import "./shared/@outfitter/tooling-xqwn46sx.js";