@joshuafolkken/kit 1.929.0 → 1.953.0

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 (83) hide show
  1. package/.claude/skills/workflow-commands/background-commands.md +6 -0
  2. package/.claude/skills/workflow-commands/backlogrun-child.md +1 -1
  3. package/.claude/skills/workflow-commands/backlogrun-lanes.md +4 -3
  4. package/.claude/skills/workflow-commands/observation-filing.md +3 -3
  5. package/.claude/skills/workflow-commands/prerequisite.md +1 -1
  6. package/.github/workflows/ci.yml +26 -8
  7. package/.github/workflows/pr-classification.yml +76 -0
  8. package/README.md +44 -22
  9. package/dist/hooks/batch-guard.js +4 -4
  10. package/dist/hooks/{chunk-GQ3EVWHY.js → chunk-452OKRQX.js} +421 -195
  11. package/dist/hooks/{chunk-2PGRQ62K.js → chunk-EYFJ74MJ.js} +11 -6
  12. package/dist/hooks/{chunk-LCJZE42I.js → chunk-IA7WC4NS.js} +1 -1
  13. package/dist/hooks/{chunk-BNFG2IFK.js → chunk-IBFC25IX.js} +4 -4
  14. package/dist/hooks/{chunk-I3JP3D4A.js → chunk-M4U4YNRE.js} +3 -3
  15. package/dist/hooks/{chunk-NJZSO7BK.js → chunk-NKVLBB65.js} +3 -3
  16. package/dist/hooks/{chunk-SXPTRFPG.js → chunk-O3PEDF3M.js} +1 -1
  17. package/dist/hooks/{chunk-7XQ6TK3R.js → chunk-OM5VDM6F.js} +2 -2
  18. package/dist/hooks/{chunk-ROULPSQC.js → chunk-V7RH56HU.js} +2 -2
  19. package/dist/hooks/{chunk-YO43HEPY.js → chunk-Z5TVZ4AP.js} +237 -235
  20. package/dist/hooks/codex-hook-adapter.js +10 -10
  21. package/dist/hooks/duplicate-read-guard.js +5 -5
  22. package/dist/hooks/format-edited.js +2 -2
  23. package/dist/hooks/investigation-guard.js +5 -5
  24. package/dist/hooks/pretool-guard.js +9 -9
  25. package/dist/hooks/stop-guard.js +9 -3
  26. package/dist/josh.js +11 -6
  27. package/dist/version/index.js +7 -4
  28. package/package.json +13 -1
  29. package/prompts/collaboration-workflow/issue-template.md +1 -1
  30. package/scripts/ci/pr-classification.ts +27 -6
  31. package/scripts/document/document-byte-budget.ts +1 -1
  32. package/scripts/gate/hook-gate-reuse.ts +1 -1
  33. package/scripts/gate/project-checks.ts +45 -15
  34. package/scripts/gate/type-check-command.ts +43 -0
  35. package/scripts/git/constants.ts +4 -0
  36. package/scripts/git/git-command.ts +11 -5
  37. package/scripts/git/git-gh-pr-rollup.ts +56 -16
  38. package/scripts/git/git-staging.ts +6 -4
  39. package/scripts/git/git-stash.ts +73 -1
  40. package/scripts/git/git-worktree.ts +35 -4
  41. package/scripts/git/repository-lock.ts +138 -0
  42. package/scripts/git/stash-orphans.ts +24 -2
  43. package/scripts/git/stash-sweep-lock.ts +30 -0
  44. package/scripts/hooks/stop-guard.ts +2 -0
  45. package/scripts/init/init-actions.ts +3 -2
  46. package/scripts/init/init-logic-migrate.ts +10 -1
  47. package/scripts/init/init-logic-templates.ts +27 -7
  48. package/scripts/init/init-logic-workspace.ts +52 -1
  49. package/scripts/init/init-logic.ts +6 -1
  50. package/scripts/init/init.ts +60 -19
  51. package/scripts/issue/issue-merged.ts +75 -0
  52. package/scripts/issue/measure-rerun-cli.ts +2 -2
  53. package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +10 -0
  54. package/scripts/josh/josh-command-map.ts +1 -0
  55. package/scripts/josh/josh-command-types.ts +0 -3
  56. package/scripts/josh/josh-commands-ai.ts +6 -0
  57. package/scripts/josh/josh-commands-development.ts +5 -5
  58. package/scripts/lint/lint-parallel.ts +19 -18
  59. package/scripts/observations/observation-ledger-home.ts +22 -2
  60. package/scripts/observations/observation-ledger-line.ts +11 -0
  61. package/scripts/observations/observation-ledger-migrate.ts +146 -0
  62. package/scripts/observations/observation-ledger.ts +51 -3
  63. package/scripts/observations/observations-flush.ts +38 -7
  64. package/scripts/review/review-finding-ledger.ts +1 -1
  65. package/scripts/review/review-record-cli.ts +1 -7
  66. package/scripts/rules/delivered-rules.ts +10 -0
  67. package/scripts/rules/lane-background.ts +111 -0
  68. package/scripts/rules/stop-rules.ts +15 -2
  69. package/scripts/run/run-carry-flush.ts +2 -7
  70. package/scripts/run/run-hold-cli.ts +10 -2
  71. package/scripts/run/run-tidy-cli.ts +50 -0
  72. package/scripts/run/run-tidy-lanes.ts +110 -0
  73. package/scripts/run/run-tidy-stashes.ts +160 -0
  74. package/scripts/run/run-tidy.ts +101 -0
  75. package/scripts/safe-chain/ci-installer-pin.ts +90 -0
  76. package/scripts/safe-chain/preinstall-command.ts +39 -0
  77. package/scripts/safe-chain/project-config.ts +55 -10
  78. package/scripts/sync/sync.ts +8 -3
  79. package/scripts/test/pilot-files.ts +0 -1
  80. package/scripts/version/preinstall-version-update.ts +2 -0
  81. package/scripts/version/release-age.ts +11 -6
  82. package/templates/workflows/ci.yml +21 -7
  83. package/tsconfig/base.json +4 -1
@@ -19,12 +19,18 @@ const NPMRC_PATH = '.npmrc'
19
19
  const release_times_schema = z.record(z.string(), z.string())
20
20
  const MS_PER_MINUTE = 60_000
21
21
 
22
+ // The window `.npmrc` content declares, or nothing when it does not declare one — an explicit
23
+ // `minimum-release-age=0` stays 0 rather than collapsing into "not declared".
24
+ function parse_declared_minimum_release_age(npmrc_content: string): number | undefined {
25
+ const raw = MINIMUM_RELEASE_AGE_RE.exec(npmrc_content)?.[1]
26
+
27
+ return raw === undefined ? undefined : Number(raw)
28
+ }
29
+
22
30
  // The quarantine window in minutes from `.npmrc`; a missing or malformed entry means no
23
31
  // quarantine, matching pnpm's own default for the setting.
24
32
  function parse_minimum_release_age(npmrc_content: string): number {
25
- const raw = MINIMUM_RELEASE_AGE_RE.exec(npmrc_content)?.[1]
26
-
27
- return raw === undefined ? NO_QUARANTINE_MINUTES : Number(raw)
33
+ return parse_declared_minimum_release_age(npmrc_content) ?? NO_QUARANTINE_MINUTES
28
34
  }
29
35
 
30
36
  // Stable releases only, on the requested major, published at or before the cutoff. The
@@ -82,9 +88,7 @@ function select_aged_version(
82
88
  // `minimum-release-age=0` opt-out stop the walk instead of falling through to an ancestor's policy.
83
89
  function read_declared_minimum_release_age(npmrc_path: string): number | undefined {
84
90
  try {
85
- const raw = MINIMUM_RELEASE_AGE_RE.exec(readFileSync(npmrc_path, 'utf8'))?.[1]
86
-
87
- return raw === undefined ? undefined : Number(raw)
91
+ return parse_declared_minimum_release_age(readFileSync(npmrc_path, 'utf8'))
88
92
  } catch {
89
93
  return undefined
90
94
  }
@@ -138,6 +142,7 @@ function read_nearest_minimum_release_age(start: string, boundary?: string): num
138
142
  const release_age = {
139
143
  release_times_schema,
140
144
  parse_minimum_release_age,
145
+ parse_declared_minimum_release_age,
141
146
  read_minimum_release_age,
142
147
  read_nearest_minimum_release_age,
143
148
  select_aged_version,
@@ -4,9 +4,13 @@ on:
4
4
  push:
5
5
  branches: [main]
6
6
 
7
+ # No `labeled` / `unlabeled`: a label added right after the pull request opens started a second
8
+ # run on the same commit, the concurrency block below cancelled one of the two, and a cancelled
9
+ # run left in the newer check suite blocked the merge (joshuafolkken/kit#2712). The one check that
10
+ # reads labels runs in `pr-classification.yml` instead.
7
11
  pull_request:
8
12
  branches: [main]
9
- types: [opened, synchronize, reopened, labeled, unlabeled]
13
+ types: [opened, synchronize, reopened]
10
14
 
11
15
  # A push run is grouped by the commit it carries, so a later push to the default branch never
12
16
  # cancels an earlier one. Without the sha every such push shares one group — `github.ref` is
@@ -25,6 +29,12 @@ concurrency:
25
29
  # list (e.g. `chromium firefox webkit`) instead of editing this file, which josh sync overwrites.
26
30
  env:
27
31
  JOSH_PLAYWRIGHT_BROWSERS: ${{ vars.JOSH_PLAYWRIGHT_BROWSERS || 'chromium' }}
32
+ # The safe-chain release every "Setup safe-chain" step installs, and the SHA-256 of that release's
33
+ # install-safe-chain.sh. The installer puts the safe-chain binary under ~/.safe-chain/bin and
34
+ # adds it to PATH beside the shims; `pnpm dlx … setup-ci` left only the shims, which then let
35
+ # every install through without a scan (joshuafolkken/kit#2711). `josh latest` moves both together.
36
+ SAFE_CHAIN_INSTALLER_VERSION: 1.5.20
37
+ SAFE_CHAIN_INSTALLER_SHA256: 0ad25efe15d1fa56105157a454d647223e78eb0c53d1f85e3d10afcd722e7bfd
28
38
 
29
39
  jobs:
30
40
  playwright-image:
@@ -179,7 +189,11 @@ jobs:
179
189
  ${{ runner.os }}-cspell-cache-
180
190
 
181
191
  - name: Setup safe-chain
182
- run: pnpm dlx @aikidosec/safe-chain@1.5.20 setup-ci
192
+ run: |
193
+ installer="$RUNNER_TEMP/install-safe-chain.sh"
194
+ curl --proto '=https' -fsSL "https://github.com/AikidoSec/safe-chain/releases/download/$SAFE_CHAIN_INSTALLER_VERSION/install-safe-chain.sh" -o "$installer"
195
+ echo "$SAFE_CHAIN_INSTALLER_SHA256 $installer" | sha256sum -c -
196
+ sh "$installer" --ci
183
197
 
184
198
  - name: Install dependencies
185
199
  env:
@@ -221,10 +235,6 @@ jobs:
221
235
  - name: Run unit tests
222
236
  run: pnpm josh test:unit
223
237
 
224
- - name: Check release classification
225
- if: github.event_name == 'pull_request'
226
- run: pnpm josh pr:classification
227
-
228
238
  - name: Check bundle size
229
239
  run: pnpm size-limit
230
240
 
@@ -405,7 +415,11 @@ jobs:
405
415
  ${{ runner.os }}-build-cache-e2e-
406
416
 
407
417
  - name: Setup safe-chain
408
- run: pnpm dlx @aikidosec/safe-chain@1.5.20 setup-ci
418
+ run: |
419
+ installer="$RUNNER_TEMP/install-safe-chain.sh"
420
+ curl --proto '=https' -fsSL "https://github.com/AikidoSec/safe-chain/releases/download/$SAFE_CHAIN_INSTALLER_VERSION/install-safe-chain.sh" -o "$installer"
421
+ echo "$SAFE_CHAIN_INSTALLER_SHA256 $installer" | sha256sum -c -
422
+ sh "$installer" --ci
409
423
 
410
424
  - name: Install dependencies
411
425
  env:
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "strict": true,
4
- // tsx uses bundler-like resolution; "bundler" is the correct pairing for module:ESNext
4
+ // tsx uses bundler-like resolution; "bundler" is the correct pairing for module:ESNext.
5
+ // `module` is stated rather than inherited: TypeScript 5.x defaults it to a value "bundler"
6
+ // rejects (TS5095), so a consumer pinned below 6 failed its first check (#2725)
7
+ "module": "ESNext",
5
8
  "moduleResolution": "bundler",
6
9
  "esModuleInterop": true,
7
10
  "forceConsistentCasingInFileNames": true,