[E00-S01-T09] TypeScript 6.0.3 exact dependency #376

Merged
kpcto merged 1 commits from feature/162 into main 2026-08-28 21:41:39 +00:00
Member

What changed

Makes both acceptance criteria for [E00-S01-T09] TypeScript 6.0.3 exact dependency (#162) enforceable rather than incidental. The root manifest already pins typescript: "6.0.3" exactly (introduced with the build/typecheck scripts in E00-S01-T05); this change locks that state in with a regression suite:

  • tests/typescript-pin.test.mjs (new) — a node:test suite (zero dependencies, pnpm-lock.yaml untouched) that fails if the pin or the resolution ever drifts:
    • asserts the root package.json declares devDependencies.typescript as exactly 6.0.3 — a bare MAJOR.MINOR.PATCH with no ^/~/>= range;
    • asserts pnpm-lock.yaml resolves the root importer with specifier: 6.0.3 / version: 6.0.3 and that the packages section contains exactly one resolved TypeScript entry (typescript@6.0.3);
    • asserts every workspace package (apps/server, packages/core, extensions/example) resolves the exact version end-to-end: pnpm exec tsc --version run inside each package directory (the same resolution the package build/typecheck scripts use) reports Version 6.0.3.

Explicitly out of scope per the brief (not touched): Node engine restriction (E00-S01-T08), strict base tsconfig (E00-S01-T10), apps/packages/extensions separation (E00-S01-T11). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05–T08); the existing CI job (frozen install + pnpm -r list on Node 24) stays green.

Criterion → test table

Acceptance criterion Test (fails without the committed config)
TypeScript 6.0.3 is pinned as an exact dependency tests/typescript-pin.test.mjs: "root package.json pins typescript as an exact dependency (6.0.3)" — asserts devDependencies.typescript is exactly "6.0.3" and matches a bare MAJOR.MINOR.PATCH (no semver range). Mutation-probed: ^6.0.3 fails this test
TypeScript 6.0.3 is pinned as an exact dependency (lockfile agrees) tests/typescript-pin.test.mjs: "pnpm-lock.yaml resolves the root typescript pin to exactly 6.0.3" — asserts the root importer resolves specifier: 6.0.3 / version: 6.0.3 and the packages section contains exactly one typescript@6.0.3 entry. Mutation-probed: lockfile version: 6.0.2 fails this test
workspace packages resolve the exact TypeScript version tests/typescript-pin.test.mjs: "every workspace package resolves the exact TypeScript version (6.0.3)" — runs pnpm exec tsc --version in apps/server, packages/core, extensions/example and asserts each reports Version 6.0.3. Mutation-probed: a fake tsc printing Version 6.0.2 in apps/server/node_modules/.bin fails this test (and any manifest/lockfile drift additionally trips pnpm's own ERR_PNPM_OUTDATED_LOCKFILE guard in this environment)

Test plan executed

  • Clean-state install from the branch (no node_modules), Node 24: pnpm install --frozen-lockfile → success, using pnpm v11.23.0, lockfile unchanged ✓
  • pnpm -r list --depth -1 (second CI step), Node 24 → lists all four workspace projects, exit 0 ✓
  • pnpm typecheck → all three packages pass tsc -p tsconfig.json --noEmit under the pinned 6.0.3 ✓
  • node --test tests/typescript-pin.test.mjs → 3/3 pass ✓
  • Full suite node --test "tests/**/*.test.mjs" on Node 24 (v24.20.0) → 24/24 pass (10 architecture-import + 6 workspace-config + 5 node-engine + 3 typescript-pin), exit 0 ✓
  • Mutation probes (all reverted):
    • package.json "typescript": "^6.0.3" → exactness test fails; resolution test also fails via ERR_PNPM_OUTDATED_LOCKFILE ✓
    • pnpm-lock.yaml importer version: 6.0.2 → lockfile test fails; resolution test also fails via ERR_PNPM_OUTDATED_LOCKFILE ✓
    • fake tsc reporting Version 6.0.2 shadowing a package .bin → resolution test fails ✓

Risks / notes

  • The suite asserts the exact string 6.0.3 (manifest, lockfile specifier/version, resolved entry) and the exact Version 6.0.3 output of tsc; a deliberate TypeScript bump must update the pin, the regenerated lockfile and this suite in the same change.
  • pnpm exec verifies the lockfile against the manifest before running (frozen in CI-like environments), so any pin drift fails the resolution test even before tsc runs — an extra guard, not a flake.
  • Pure config/regression change; rollback is a revert of this single commit.

Refs #162

## What changed Makes both acceptance criteria for [E00-S01-T09] TypeScript 6.0.3 exact dependency (#162) **enforceable** rather than incidental. The root manifest already pins `typescript: "6.0.3"` exactly (introduced with the build/typecheck scripts in E00-S01-T05); this change locks that state in with a regression suite: - **`tests/typescript-pin.test.mjs`** (new) — a `node:test` suite (zero dependencies, `pnpm-lock.yaml` untouched) that fails if the pin or the resolution ever drifts: - asserts the root `package.json` declares `devDependencies.typescript` as exactly `6.0.3` — a bare `MAJOR.MINOR.PATCH` with no `^`/`~`/`>=` range; - asserts `pnpm-lock.yaml` resolves the root importer with `specifier: 6.0.3` / `version: 6.0.3` and that the packages section contains exactly one resolved TypeScript entry (`typescript@6.0.3`); - asserts every workspace package (`apps/server`, `packages/core`, `extensions/example`) resolves the exact version end-to-end: `pnpm exec tsc --version` run inside each package directory (the same resolution the package `build`/`typecheck` scripts use) reports `Version 6.0.3`. Explicitly out of scope per the brief (not touched): Node engine restriction (E00-S01-T08), strict base tsconfig (E00-S01-T10), apps/packages/extensions separation (E00-S01-T11). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05–T08); the existing CI job (frozen install + `pnpm -r list` on Node 24) stays green. ## Criterion → test table | Acceptance criterion | Test (fails without the committed config) | | --- | --- | | TypeScript 6.0.3 is pinned as an exact dependency | `tests/typescript-pin.test.mjs`: "root package.json pins typescript as an exact dependency (6.0.3)" — asserts `devDependencies.typescript` is exactly `"6.0.3"` **and** matches a bare `MAJOR.MINOR.PATCH` (no semver range). Mutation-probed: `^6.0.3` fails this test | | TypeScript 6.0.3 is pinned as an exact dependency (lockfile agrees) | `tests/typescript-pin.test.mjs`: "pnpm-lock.yaml resolves the root typescript pin to exactly 6.0.3" — asserts the root importer resolves `specifier: 6.0.3` / `version: 6.0.3` and the packages section contains exactly one `typescript@6.0.3` entry. Mutation-probed: lockfile `version: 6.0.2` fails this test | | workspace packages resolve the exact TypeScript version | `tests/typescript-pin.test.mjs`: "every workspace package resolves the exact TypeScript version (6.0.3)" — runs `pnpm exec tsc --version` in `apps/server`, `packages/core`, `extensions/example` and asserts each reports `Version 6.0.3`. Mutation-probed: a fake `tsc` printing `Version 6.0.2` in `apps/server/node_modules/.bin` fails this test (and any manifest/lockfile drift additionally trips pnpm's own `ERR_PNPM_OUTDATED_LOCKFILE` guard in this environment) | ## Test plan executed - Clean-state install from the branch (no `node_modules`), Node 24: `pnpm install --frozen-lockfile` → success, `using pnpm v11.23.0`, lockfile **unchanged** ✓ - `pnpm -r list --depth -1` (second CI step), Node 24 → lists all four workspace projects, exit 0 ✓ - `pnpm typecheck` → all three packages pass `tsc -p tsconfig.json --noEmit` under the pinned 6.0.3 ✓ - `node --test tests/typescript-pin.test.mjs` → **3/3 pass** ✓ - Full suite `node --test "tests/**/*.test.mjs"` on Node 24 (v24.20.0) → **24/24 pass** (10 architecture-import + 6 workspace-config + 5 node-engine + 3 typescript-pin), exit 0 ✓ - Mutation probes (all reverted): - `package.json` `"typescript": "^6.0.3"` → exactness test fails; resolution test also fails via `ERR_PNPM_OUTDATED_LOCKFILE` ✓ - `pnpm-lock.yaml` importer `version: 6.0.2` → lockfile test fails; resolution test also fails via `ERR_PNPM_OUTDATED_LOCKFILE` ✓ - fake `tsc` reporting `Version 6.0.2` shadowing a package `.bin` → resolution test fails ✓ ## Risks / notes - The suite asserts the exact string `6.0.3` (manifest, lockfile specifier/version, resolved entry) and the exact `Version 6.0.3` output of `tsc`; a deliberate TypeScript bump must update the pin, the regenerated lockfile and this suite in the same change. - `pnpm exec` verifies the lockfile against the manifest before running (frozen in CI-like environments), so any pin drift fails the resolution test even before `tsc` runs — an extra guard, not a flake. - Pure config/regression change; rollback is a revert of this single commit. Refs #162
bot-implementer added 1 commit 2026-08-28 21:34:07 +00:00
test: lock in TypeScript 6.0.3 exact dependency (E00-S01-T09)
CI / Frozen lockfile install (pull_request) Successful in 44s
628885ae0f
kpcto merged commit 9c76a64bee into main 2026-08-28 21:41:39 +00:00
kpcto deleted branch feature/162 2026-08-28 21:41:39 +00:00
Sign in to join this conversation.