@outfitter/tooling 0.3.3 → 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 (94) hide show
  1. package/.markdownlint-cli2.jsonc +55 -55
  2. package/README.md +33 -24
  3. package/dist/bun-version-compat.d.ts +2 -0
  4. package/dist/bun-version-compat.js +10 -0
  5. package/dist/cli/check-boundary-invocations.d.ts +34 -0
  6. package/dist/cli/check-boundary-invocations.js +14 -0
  7. package/dist/cli/check-bunup-registry.d.ts +36 -0
  8. package/dist/cli/check-bunup-registry.js +12 -0
  9. package/dist/cli/check-changeset.d.ts +82 -0
  10. package/dist/cli/check-changeset.js +24 -0
  11. package/dist/cli/check-clean-tree.d.ts +36 -0
  12. package/dist/cli/check-clean-tree.js +14 -0
  13. package/dist/cli/check-exports.d.ts +3 -0
  14. package/dist/cli/check-exports.js +17 -0
  15. package/dist/cli/check-home-paths.d.ts +31 -0
  16. package/dist/cli/check-home-paths.js +12 -0
  17. package/dist/cli/check-markdown-links.d.ts +42 -0
  18. package/dist/cli/check-markdown-links.js +13 -0
  19. package/dist/cli/check-readme-imports.d.ts +61 -0
  20. package/dist/{shared/chunk-7tdgbqb0.js → cli/check-readme-imports.js} +7 -6
  21. package/dist/cli/check-tsdoc.d.ts +5 -0
  22. package/dist/cli/check-tsdoc.js +42 -0
  23. package/dist/cli/check.d.ts +19 -0
  24. package/dist/cli/check.js +10 -0
  25. package/dist/cli/fix.d.ts +19 -0
  26. package/dist/cli/fix.js +10 -0
  27. package/dist/cli/index.js +61 -1218
  28. package/dist/cli/init.d.ts +31 -0
  29. package/dist/cli/init.js +12 -0
  30. package/dist/cli/internal/exports-analysis.d.ts +2 -0
  31. package/dist/cli/internal/exports-analysis.js +10 -0
  32. package/dist/cli/internal/exports-fs.d.ts +17 -0
  33. package/dist/cli/internal/exports-fs.js +9 -0
  34. package/dist/cli/internal/pre-push-checks.d.ts +2 -0
  35. package/dist/cli/internal/pre-push-checks.js +37 -0
  36. package/dist/cli/internal/tsdoc-analysis.d.ts +3 -0
  37. package/dist/cli/internal/tsdoc-analysis.js +26 -0
  38. package/dist/cli/internal/tsdoc-formatting.d.ts +3 -0
  39. package/dist/cli/internal/tsdoc-formatting.js +10 -0
  40. package/dist/cli/internal/tsdoc-types.d.ts +2 -0
  41. package/dist/cli/internal/tsdoc-types.js +16 -0
  42. package/dist/cli/pre-push.d.ts +7 -0
  43. package/dist/cli/pre-push.js +29 -0
  44. package/dist/cli/upgrade-bun.d.ts +8 -0
  45. package/dist/cli/upgrade-bun.js +9 -0
  46. package/dist/index.d.ts +9 -186
  47. package/dist/index.js +4 -42
  48. package/dist/registry/build.d.ts +4 -0
  49. package/dist/registry/build.js +279 -0
  50. package/dist/registry/index.d.ts +3 -0
  51. package/dist/registry/index.js +1 -0
  52. package/dist/registry/schema.d.ts +2 -0
  53. package/dist/registry/schema.js +28 -0
  54. package/dist/shared/@outfitter/tooling-0zjz8eg9.js +106 -0
  55. package/dist/shared/@outfitter/tooling-1hez6j9d.js +21 -0
  56. package/dist/shared/@outfitter/tooling-2vv5y3s4.js +145 -0
  57. package/dist/shared/{chunk-cmde0fwx.js → @outfitter/tooling-5xxctk9b.js} +12 -138
  58. package/dist/shared/@outfitter/tooling-5ynz680q.js +59 -0
  59. package/dist/shared/@outfitter/tooling-7437rmy6.js +39 -0
  60. package/dist/shared/@outfitter/tooling-8qcwr06t.d.ts +74 -0
  61. package/dist/shared/@outfitter/tooling-9ram55dd.js +69 -0
  62. package/dist/shared/@outfitter/tooling-9vs606gq.d.ts +3 -0
  63. package/dist/shared/@outfitter/tooling-a4bfx4be.js +21 -0
  64. package/dist/shared/@outfitter/tooling-a59br34g.js +32 -0
  65. package/dist/shared/@outfitter/tooling-a6q3zh7t.js +86 -0
  66. package/dist/shared/@outfitter/tooling-amrbp7cm.js +102 -0
  67. package/dist/shared/@outfitter/tooling-ayps7c4x.js +58 -0
  68. package/dist/shared/@outfitter/tooling-c8q6mj8z.js +228 -0
  69. package/dist/shared/@outfitter/tooling-cb0b8wsx.d.ts +57 -0
  70. package/dist/shared/@outfitter/tooling-ctmgnap5.js +19 -0
  71. package/dist/shared/@outfitter/tooling-f8q38e9z.d.ts +16 -0
  72. package/dist/shared/@outfitter/tooling-gcdvsqqp.js +73 -0
  73. package/dist/shared/@outfitter/tooling-h5dnevjw.js +139 -0
  74. package/dist/shared/@outfitter/tooling-j8d1h2zd.d.ts +10 -0
  75. package/dist/shared/@outfitter/tooling-ja1zg5yc.js +214 -0
  76. package/dist/shared/@outfitter/tooling-jnrs9rqd.js +4 -0
  77. package/dist/shared/@outfitter/tooling-mkynjra9.js +23 -0
  78. package/dist/shared/@outfitter/tooling-mq2xvz96.js +285 -0
  79. package/dist/shared/@outfitter/tooling-pq47jv6t.js +213 -0
  80. package/dist/shared/@outfitter/tooling-sjm8nebx.d.ts +109 -0
  81. package/dist/shared/@outfitter/tooling-stgnc2zx.d.ts +85 -0
  82. package/dist/shared/@outfitter/tooling-tj9p41vj.d.ts +55 -0
  83. package/dist/shared/@outfitter/tooling-vjmhvpjq.d.ts +29 -0
  84. package/dist/shared/@outfitter/tooling-wwm97f47.js +81 -0
  85. package/dist/shared/@outfitter/tooling-y43b117h.d.ts +13 -0
  86. package/dist/version.d.ts +2 -0
  87. package/dist/version.js +8 -0
  88. package/lefthook.yml +5 -1
  89. package/package.json +140 -131
  90. package/registry/registry.json +19 -12
  91. package/tsconfig.preset.bun.json +5 -5
  92. package/tsconfig.preset.json +33 -33
  93. package/biome.json +0 -81
  94. package/dist/shared/chunk-3s189drz.js +0 -4
@@ -1,66 +1,66 @@
1
1
  {
2
- // Outfitter markdownlint preset
3
- // https://github.com/DavidAnson/markdownlint
2
+ // Outfitter markdownlint preset
3
+ // https://github.com/DavidAnson/markdownlint
4
4
 
5
- "config": {
6
- // Headings
7
- "MD003": { "style": "atx" }, // ATX-style headings (# Heading)
8
- "MD022": { "lines_above": 1, "lines_below": 1 }, // Blank lines around headings
9
- "MD024": { "siblings_only": true }, // Allow duplicate headings in different sections
10
- "MD041": false, // First line doesn't need to be h1 (frontmatter, etc.)
5
+ "config": {
6
+ // Headings
7
+ "MD003": { "style": "atx" }, // ATX-style headings (# Heading)
8
+ "MD022": { "lines_above": 1, "lines_below": 1 }, // Blank lines around headings
9
+ "MD024": { "siblings_only": true }, // Allow duplicate headings in different sections
10
+ "MD041": false, // First line doesn't need to be h1 (frontmatter, etc.)
11
11
 
12
- // Line length - disabled for prose flexibility
13
- "MD013": false,
12
+ // Line length - disabled for prose flexibility
13
+ "MD013": false,
14
14
 
15
- // Lists
16
- "MD004": { "style": "dash" }, // Unordered list style: dash (-)
17
- "MD007": { "indent": 2 }, // List indentation: 2 spaces
18
- "MD032": true, // Blank lines around lists
15
+ // Lists
16
+ "MD004": { "style": "dash" }, // Unordered list style: dash (-)
17
+ "MD007": { "indent": 2 }, // List indentation: 2 spaces
18
+ "MD032": true, // Blank lines around lists
19
19
 
20
- // Code blocks
21
- "MD040": true, // Fenced code blocks should have a language
22
- "MD046": { "style": "fenced" }, // Code block style: fenced (```)
23
- "MD048": { "style": "backtick" }, // Code fence style: backticks
20
+ // Code blocks
21
+ "MD040": true, // Fenced code blocks should have a language
22
+ "MD046": { "style": "fenced" }, // Code block style: fenced (```)
23
+ "MD048": { "style": "backtick" }, // Code fence style: backticks
24
24
 
25
- // Links
26
- "MD034": true, // No bare URLs (use <url> or [text](url))
25
+ // Links
26
+ "MD034": true, // No bare URLs (use <url> or [text](url))
27
27
 
28
- // Whitespace
29
- "MD009": { "br_spaces": 2 }, // Allow 2 trailing spaces for <br>
30
- "MD010": { "spaces_per_tab": 2 }, // Tabs to spaces
31
- "MD012": { "maximum": 1 }, // Max 1 consecutive blank line
32
- "MD047": true, // Files should end with newline
28
+ // Whitespace
29
+ "MD009": { "br_spaces": 2 }, // Allow 2 trailing spaces for <br>
30
+ "MD010": { "spaces_per_tab": 2 }, // Tabs to spaces
31
+ "MD012": { "maximum": 1 }, // Max 1 consecutive blank line
32
+ "MD047": true, // Files should end with newline
33
33
 
34
- // HTML - allow for GitHub-specific elements
35
- "MD033": {
36
- "allowed_elements": [
37
- "details",
38
- "summary",
39
- "kbd",
40
- "br",
41
- "sup",
42
- "sub",
43
- "img",
44
- "picture",
45
- "source",
46
- "a"
47
- ]
48
- },
34
+ // HTML - allow for GitHub-specific elements
35
+ "MD033": {
36
+ "allowed_elements": [
37
+ "details",
38
+ "summary",
39
+ "kbd",
40
+ "br",
41
+ "sup",
42
+ "sub",
43
+ "img",
44
+ "picture",
45
+ "source",
46
+ "a",
47
+ ],
48
+ },
49
49
 
50
- // Emphasis
51
- "MD049": { "style": "asterisk" }, // Emphasis style: *italic*
52
- "MD050": { "style": "asterisk" } // Strong style: **bold**
53
- },
50
+ // Emphasis
51
+ "MD049": { "style": "asterisk" }, // Emphasis style: *italic*
52
+ "MD050": { "style": "asterisk" }, // Strong style: **bold**
53
+ },
54
54
 
55
- // Ignore patterns
56
- "ignores": [
57
- "node_modules/**",
58
- "**/node_modules/**",
59
- "dist/**",
60
- "**/dist/**",
61
- ".turbo/**",
62
- "**/.turbo/**",
63
- "CHANGELOG.md",
64
- "**/CHANGELOG.md"
65
- ]
55
+ // Ignore patterns
56
+ "ignores": [
57
+ "node_modules/**",
58
+ "**/node_modules/**",
59
+ "dist/**",
60
+ "**/dist/**",
61
+ ".turbo/**",
62
+ "**/.turbo/**",
63
+ "CHANGELOG.md",
64
+ "**/CHANGELOG.md",
65
+ ],
66
66
  }
package/README.md CHANGED
@@ -4,7 +4,7 @@ Dev tooling configuration presets and CLI for Outfitter projects.
4
4
 
5
5
  ## Features
6
6
 
7
- - **Configuration Presets**: Biome, TypeScript, Lefthook, and markdownlint configs
7
+ - **Configuration Presets**: oxlint, TypeScript, Lefthook, and markdownlint configs
8
8
  - **CLI Commands**: Initialize configs, upgrade Bun, TDD-aware pre-push hooks
9
9
  - **Registry System**: Composable config blocks for scaffolding
10
10
 
@@ -15,7 +15,8 @@ bun add -D @outfitter/tooling
15
15
  ```
16
16
 
17
17
  Peer dependencies (optional):
18
- - `ultracite` — Biome wrapper for formatting/linting
18
+
19
+ - `ultracite` — oxlint/oxfmt wrapper for formatting/linting
19
20
  - `lefthook` — Git hooks
20
21
  - `markdownlint-cli2` — Markdown linting
21
22
 
@@ -23,7 +24,7 @@ Peer dependencies (optional):
23
24
 
24
25
  ### `tooling init`
25
26
 
26
- Initialize tooling configuration in the current project. Copies preset configs for Biome, TypeScript, Lefthook, and markdownlint.
27
+ Initialize tooling configuration in the current project. Copies preset configs for oxlint, TypeScript, Lefthook, and markdownlint.
27
28
 
28
29
  ```bash
29
30
  bunx @outfitter/tooling init
@@ -50,6 +51,7 @@ bunx @outfitter/tooling fix src/
50
51
  ### `tooling upgrade-bun [version]`
51
52
 
52
53
  Upgrade Bun version across the project. Updates:
54
+
53
55
  - `.bun-version`
54
56
  - `engines.bun` in all package.json files
55
57
  - `@types/bun` dependency versions (leaves "latest" alone)
@@ -71,13 +73,16 @@ bunx @outfitter/tooling upgrade-bun 1.4.0 --no-install
71
73
  TDD-aware pre-push strict verification hook. Detects RED phase branches and skips verification by design.
72
74
 
73
75
  RED phase branches follow these patterns:
76
+
74
77
  - `*-tests` (e.g., `feature/auth-tests`)
75
78
  - `*/tests` (e.g., `feature/auth/tests`)
76
79
  - `*_tests` (e.g., `feature/auth_tests`)
77
80
 
78
81
  Verification order:
79
- 1. Run `verify:ci` if present.
80
- 2. Otherwise run strict fallback: `typecheck`, `check|lint`, `build`, `test`.
82
+
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`.
81
86
 
82
87
  ```bash
83
88
  # Normal usage (in lefthook.yml)
@@ -108,7 +113,15 @@ bunx @outfitter/tooling check-bunup-registry
108
113
 
109
114
  ### `tooling check-changeset`
110
115
 
111
- 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.*`.
112
125
 
113
126
  ```bash
114
127
  bunx @outfitter/tooling check-changeset
@@ -169,16 +182,6 @@ bunx @outfitter/tooling check-readme-imports --json
169
182
 
170
183
  ## Configuration Presets
171
184
 
172
- ### Biome
173
-
174
- Extends our Biome config in your `biome.json`:
175
-
176
- ```json
177
- {
178
- "extends": ["@outfitter/tooling/biome.json"]
179
- }
180
- ```
181
-
182
185
  ### TypeScript
183
186
 
184
187
  Extends our TypeScript config in your `tsconfig.json`:
@@ -207,6 +210,7 @@ extends:
207
210
  ```
208
211
 
209
212
  Default hooks:
213
+
210
214
  - **pre-commit**: Runs ultracite on staged files, typechecks
211
215
  - **pre-push**: Runs TDD-aware strict verification via `tooling pre-push`
212
216
 
@@ -224,8 +228,9 @@ cp node_modules/@outfitter/tooling/.markdownlint-cli2.jsonc .
224
228
  The tooling package includes a registry of composable config blocks for the `outfitter` CLI scaffolding system.
225
229
 
226
230
  Available blocks:
231
+
227
232
  - `claude` — Claude Code settings and hooks
228
- - `biome` — Biome/Ultracite configuration
233
+ - `linter` — oxlint/Ultracite configuration
229
234
  - `lefthook` — Git hooks configuration
230
235
  - `markdownlint` — Markdown linting configuration
231
236
  - `bootstrap` — Project bootstrap script
@@ -245,13 +250,17 @@ bun run apps/outfitter/src/cli.ts repo check boundary-invocations --cwd .
245
250
 
246
251
  ## Exports
247
252
 
248
- | Export | Description |
249
- |--------|-------------|
250
- | `./biome.json` | Biome configuration preset |
251
- | `./tsconfig.preset.json` | TypeScript preset (general) |
252
- | `./tsconfig.preset.bun.json` | TypeScript preset (Bun) |
253
- | `./lefthook.yml` | Lefthook hooks configuration |
254
- | `./.markdownlint-cli2.jsonc` | markdownlint configuration |
253
+ | Export | Description |
254
+ | ---------------------------- | -------------------------------------- |
255
+ | `./registry` | Tooling block registry API |
256
+ | `./tsconfig` | Alias for `./tsconfig.preset.json` |
257
+ | `./tsconfig-bun` | Alias for `./tsconfig.preset.bun.json` |
258
+ | `./tsconfig.preset.json` | TypeScript preset (general) |
259
+ | `./tsconfig.preset.bun.json` | TypeScript preset (Bun) |
260
+ | `./lefthook` | Alias for `./lefthook.yml` |
261
+ | `./lefthook.yml` | Lefthook hooks configuration |
262
+ | `./.markdownlint-cli2` | Alias for `./.markdownlint-cli2.jsonc` |
263
+ | `./.markdownlint-cli2.jsonc` | markdownlint configuration |
255
264
 
256
265
  ## Related
257
266
 
@@ -0,0 +1,2 @@
1
+ import { ParsedSemver, isTypesBunVersionCompatible, parseSemver } from "./shared/@outfitter/tooling-vjmhvpjq.js";
2
+ export { parseSemver, isTypesBunVersionCompatible, ParsedSemver };
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import {
3
+ isTypesBunVersionCompatible,
4
+ parseSemver
5
+ } from "./shared/@outfitter/tooling-mkynjra9.js";
6
+ import"./shared/@outfitter/tooling-jnrs9rqd.js";
7
+ export {
8
+ parseSemver,
9
+ isTypesBunVersionCompatible
10
+ };
@@ -0,0 +1,34 @@
1
+ interface ScriptLocation {
2
+ readonly file: string;
3
+ readonly scriptName: string;
4
+ readonly command: string;
5
+ }
6
+ interface BoundaryViolation extends ScriptLocation {
7
+ readonly rule: "root-runs-package-src" | "cd-package-then-runs-src";
8
+ }
9
+ interface ReadScriptEntriesOptions {
10
+ readonly appManifestRelativePaths?: readonly string[];
11
+ readonly readPackageJson?: (filePath: string) => Promise<{
12
+ scripts?: Record<string, string>;
13
+ }>;
14
+ }
15
+ /**
16
+ * Detect whether a single script command violates boundary invocation rules.
17
+ */
18
+ declare function detectBoundaryViolation(location: ScriptLocation): BoundaryViolation | null;
19
+ /**
20
+ * Find all boundary violations across package/app script maps.
21
+ */
22
+ declare function findBoundaryViolations(entries: readonly {
23
+ file: string;
24
+ scripts: Readonly<Record<string, string>>;
25
+ }[]): BoundaryViolation[];
26
+ declare function readScriptEntries(cwd: string, options?: ReadScriptEntriesOptions): Promise<{
27
+ file: string;
28
+ scripts: Record<string, string>;
29
+ }[]>;
30
+ /**
31
+ * Run boundary invocation checks against root/apps package scripts.
32
+ */
33
+ declare function runCheckBoundaryInvocations(): Promise<void>;
34
+ export { runCheckBoundaryInvocations, readScriptEntries, findBoundaryViolations, detectBoundaryViolation, ScriptLocation, BoundaryViolation };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ detectBoundaryViolation,
4
+ findBoundaryViolations,
5
+ readScriptEntries,
6
+ runCheckBoundaryInvocations
7
+ } from "../shared/@outfitter/tooling-amrbp7cm.js";
8
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
9
+ export {
10
+ runCheckBoundaryInvocations,
11
+ readScriptEntries,
12
+ findBoundaryViolations,
13
+ detectBoundaryViolation
14
+ };
@@ -0,0 +1,36 @@
1
+ /** Result of checking bunup workspace registration */
2
+ interface RegistryCheckResult {
3
+ readonly ok: boolean;
4
+ readonly missing: string[];
5
+ }
6
+ /**
7
+ * Extract the package name from a build script containing `bunup --filter`.
8
+ *
9
+ * @example
10
+ * extractBunupFilterName("bunup --filter @outfitter/logging")
11
+ * // => "@outfitter/logging"
12
+ *
13
+ * extractBunupFilterName("cd ../.. && bunup --filter @outfitter/types")
14
+ * // => "@outfitter/types"
15
+ *
16
+ * extractBunupFilterName("tsc --noEmit")
17
+ * // => null
18
+ */
19
+ declare function extractBunupFilterName(script: string): string | null;
20
+ /**
21
+ * Find packages that have `bunup --filter` build scripts but are not
22
+ * registered in the bunup workspace config.
23
+ *
24
+ * @param packagesWithFilter - Package names that have `bunup --filter` in their build script
25
+ * @param registeredNames - Package names registered in bunup.config.ts
26
+ * @returns Result with sorted list of missing packages
27
+ */
28
+ declare function findUnregisteredPackages(packagesWithFilter: string[], registeredNames: string[]): RegistryCheckResult;
29
+ /**
30
+ * Run bunup registry check across all workspace packages.
31
+ *
32
+ * Scans packages/&#42;/package.json for build scripts containing `bunup --filter`,
33
+ * then verifies each is registered in bunup.config.ts.
34
+ */
35
+ declare function runCheckBunupRegistry(): Promise<void>;
36
+ export { runCheckBunupRegistry, findUnregisteredPackages, extractBunupFilterName, RegistryCheckResult };
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ extractBunupFilterName,
4
+ findUnregisteredPackages,
5
+ runCheckBunupRegistry
6
+ } from "../shared/@outfitter/tooling-wwm97f47.js";
7
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
8
+ export {
9
+ runCheckBunupRegistry,
10
+ findUnregisteredPackages,
11
+ extractBunupFilterName
12
+ };
@@ -0,0 +1,82 @@
1
+ /** Result of checking whether changesets are required */
2
+ interface ChangesetCheckResult {
3
+ readonly ok: boolean;
4
+ readonly missingFor: string[];
5
+ }
6
+ interface ChangesetIgnoredReference {
7
+ readonly file: string;
8
+ readonly packages: string[];
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[];
17
+ /**
18
+ * Extract unique package names from changed file paths.
19
+ *
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.
23
+ *
24
+ * @param files - List of changed file paths relative to repo root
25
+ * @returns Sorted array of unique package names
26
+ */
27
+ declare function getChangedPackagePaths(files: string[]): string[];
28
+ /**
29
+ * Extract changeset filenames from changed file paths.
30
+ *
31
+ * Only considers files matching `.changeset/*.md`, excluding README.md.
32
+ * This checks the git diff rather than disk, ensuring only changesets added
33
+ * in the current PR are counted.
34
+ *
35
+ * @param files - List of changed file paths relative to repo root
36
+ * @returns Array of changeset filenames (e.g. `["happy-turtle.md"]`)
37
+ */
38
+ declare function getChangedChangesetFiles(files: string[]): string[];
39
+ /**
40
+ * Determine whether releasable packages are fully covered by the current PR changesets.
41
+ *
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.
46
+ *
47
+ * @param releasablePackages - Changed packages that are not ignored by changeset config
48
+ * @param changesetFiles - Changeset filenames found in `.changeset/`
49
+ * @param coveredPackages - Workspace package names referenced by the changed changesets
50
+ */
51
+ declare function checkChangesetRequired(releasablePackages: string[], changesetFiles: string[], coveredPackages?: string[]): ChangesetCheckResult;
52
+ declare function parseIgnoredPackagesFromChangesetConfig(jsonContent: string): string[];
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;
59
+ declare function findIgnoredPackageReferences(input: {
60
+ readonly changesetFiles: readonly string[];
61
+ readonly ignoredPackages: readonly string[];
62
+ readonly readChangesetFile: (filename: string) => string;
63
+ }): ChangesetIgnoredReference[];
64
+ interface CheckChangesetOptions {
65
+ readonly skip?: boolean;
66
+ }
67
+ /**
68
+ * Run check-changeset to verify release-relevant PR deltas include changeset files.
69
+ *
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.
73
+ *
74
+ * Skips silently when:
75
+ * - `NO_CHANGESET=1` env var is set
76
+ * - `--skip` flag is passed
77
+ * - `GITHUB_EVENT_NAME=push` (post-merge on main)
78
+ * - No packages have source changes
79
+ * - Git diff fails (local dev without origin)
80
+ */
81
+ declare function runCheckChangeset(options?: CheckChangesetOptions): Promise<void>;
82
+ export { runCheckChangeset, resolveGitDiffRange, parseIgnoredPackagesFromChangesetConfig, parseChangesetFrontmatterPackageNames, getReleasableChangedPackages, getChangedPackagePaths, getChangedChangesetFiles, findIgnoredPackageReferences, checkChangesetRequired, GitDiffRange, CheckChangesetOptions, ChangesetIgnoredReference, ChangesetCheckResult };
@@ -0,0 +1,24 @@
1
+ // @bun
2
+ import {
3
+ checkChangesetRequired,
4
+ findIgnoredPackageReferences,
5
+ getChangedChangesetFiles,
6
+ getChangedPackagePaths,
7
+ getReleasableChangedPackages,
8
+ parseChangesetFrontmatterPackageNames,
9
+ parseIgnoredPackagesFromChangesetConfig,
10
+ resolveGitDiffRange,
11
+ runCheckChangeset
12
+ } from "../shared/@outfitter/tooling-mq2xvz96.js";
13
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
14
+ export {
15
+ runCheckChangeset,
16
+ resolveGitDiffRange,
17
+ parseIgnoredPackagesFromChangesetConfig,
18
+ parseChangesetFrontmatterPackageNames,
19
+ getReleasableChangedPackages,
20
+ getChangedPackagePaths,
21
+ getChangedChangesetFiles,
22
+ findIgnoredPackageReferences,
23
+ checkChangesetRequired
24
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Check-clean-tree command — asserts the working tree has no modified or untracked files.
3
+ *
4
+ * Pure core functions for parsing git output and determining tree cleanliness.
5
+ * The CLI runner in {@link runCheckCleanTree} handles git invocation and output.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ /** Status of the working tree after verification steps */
10
+ interface TreeStatus {
11
+ readonly clean: boolean;
12
+ readonly modified: string[];
13
+ readonly untracked: string[];
14
+ }
15
+ /**
16
+ * Parse `git diff --name-only` output into a list of modified file paths.
17
+ */
18
+ declare function parseGitDiff(diffOutput: string): string[];
19
+ /**
20
+ * Parse `git ls-files --others --exclude-standard` output into a list of untracked file paths.
21
+ */
22
+ declare function parseUntrackedFiles(lsOutput: string): string[];
23
+ /**
24
+ * Determine if the tree status represents a clean working tree.
25
+ */
26
+ declare function isCleanTree(status: TreeStatus): boolean;
27
+ interface CheckCleanTreeOptions {
28
+ readonly paths?: string[];
29
+ }
30
+ /**
31
+ * Run clean-tree check against the current working directory.
32
+ *
33
+ * Exits 0 if clean, 1 if dirty files are found.
34
+ */
35
+ declare function runCheckCleanTree(options?: CheckCleanTreeOptions): Promise<void>;
36
+ export { runCheckCleanTree, parseUntrackedFiles, parseGitDiff, isCleanTree, TreeStatus, CheckCleanTreeOptions };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ isCleanTree,
4
+ parseGitDiff,
5
+ parseUntrackedFiles,
6
+ runCheckCleanTree
7
+ } from "../shared/@outfitter/tooling-gcdvsqqp.js";
8
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
9
+ export {
10
+ runCheckCleanTree,
11
+ parseUntrackedFiles,
12
+ parseGitDiff,
13
+ isCleanTree
14
+ };
@@ -0,0 +1,3 @@
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";
3
+ export { runCheckExports, resolveJsonMode, entryToSubpath, compareExports, PackageResult, ExportMap, ExportDrift, CompareInput, CheckResult, CheckExportsOptions };
@@ -0,0 +1,17 @@
1
+ // @bun
2
+ import {
3
+ resolveJsonMode,
4
+ runCheckExports
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";
11
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
12
+ export {
13
+ runCheckExports,
14
+ resolveJsonMode,
15
+ entryToSubpath,
16
+ compareExports
17
+ };
@@ -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
+ };
@@ -0,0 +1,42 @@
1
+ /** A relative link extracted from a markdown file. */
2
+ interface MarkdownLink {
3
+ /** The link target path (anchors stripped). */
4
+ readonly target: string;
5
+ /** 1-based line number where the link appears. */
6
+ readonly line: number;
7
+ }
8
+ /** A broken link with its source file context. */
9
+ interface BrokenLink {
10
+ /** Relative path of the source markdown file. */
11
+ readonly source: string;
12
+ /** The link target that could not be resolved. */
13
+ readonly target: string;
14
+ /** 1-based line number in the source file. */
15
+ readonly line: number;
16
+ }
17
+ /**
18
+ * Extract relative markdown links from content, skipping external URLs,
19
+ * bare anchors, code fences, and inline code.
20
+ *
21
+ * @param content - Raw markdown content
22
+ * @returns Array of extracted links with line numbers
23
+ */
24
+ declare function extractMarkdownLinks(content: string): MarkdownLink[];
25
+ /**
26
+ * Validate that relative links in the given markdown files resolve to
27
+ * existing files on disk.
28
+ *
29
+ * @param rootDir - Absolute path to the project root
30
+ * @param files - Relative file paths (from rootDir) to check
31
+ * @returns Array of broken links
32
+ */
33
+ declare function validateLinks(rootDir: string, files: readonly string[]): Promise<BrokenLink[]>;
34
+ /**
35
+ * Run check-markdown-links across the project.
36
+ *
37
+ * @param rootDir - Project root directory
38
+ * @param patterns - Glob patterns for file discovery (defaults to standard set)
39
+ * @returns Exit code (0 = all valid, 1 = broken links found)
40
+ */
41
+ declare function runCheckMarkdownLinks(rootDir: string, patterns?: readonly string[]): Promise<number>;
42
+ export { validateLinks, runCheckMarkdownLinks, extractMarkdownLinks, MarkdownLink, BrokenLink };
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ import {
4
+ extractMarkdownLinks,
5
+ runCheckMarkdownLinks,
6
+ validateLinks
7
+ } from "../shared/@outfitter/tooling-ja1zg5yc.js";
8
+ import"../shared/@outfitter/tooling-jnrs9rqd.js";
9
+ export {
10
+ validateLinks,
11
+ runCheckMarkdownLinks,
12
+ extractMarkdownLinks
13
+ };