Skip to content

build(deps): declare typescript as explicit devDependency - #52

Merged
diangogav merged 1 commit into
mainfrom
build/declare-typescript-devdep
Jun 19, 2026
Merged

build(deps): declare typescript as explicit devDependency#52
diangogav merged 1 commit into
mainfrom
build/declare-typescript-devdep

Conversation

@diangogav

Copy link
Copy Markdown
Owner

Summary

  • Declare typescript as an explicit devDependency (exact 5.9.3).

Why

The build script runs tsc, but TypeScript was not declared in
package.json — it only arrived transitively via typescript-eslint
(peer >=4.8.4 <6.1.0). The build's own compiler hung on an accident of
the dependency tree: if the linter were upgraded, swapped, or removed,
the build would silently lose tsc.

Why exact pin (no caret)

TypeScript does not follow strict semver — a minor bump (e.g. 5.9 → 5.10)
can introduce stricter type checks that break the build with no API
change. Pinning the compiler exactly is the recommended practice and
keeps CI deterministic, even though the rest of the repo uses carets.

This intentionally stays on 5.9.3 (the version already installed). A
move to TypeScript 6 is a separate decision, best paired with the linter
strategy (Biome vs typescript-eslint).

Test plan

  • bun run build — tsc exits 0
  • bun test — 246 pass / 0 fail
  • bun pm ls confirms typescript@5.9.3 is now a direct dependency

The build script runs `tsc`, but TypeScript was only present
transitively (pulled in by typescript-eslint). Declaring it directly
makes the build's compiler an owned dependency instead of an accident
of the dependency tree that could vanish if the linter changes.

Pinned to exact 5.9.3 (no caret) on purpose: TypeScript does not follow
strict semver, so a minor bump can introduce stricter checks that break
the build without warning. Verified: tsc exits 0 and all 246 tests pass.
@diangogav diangogav self-assigned this Jun 19, 2026
@diangogav
diangogav merged commit ef8ef1b into main Jun 19, 2026
1 check passed
@diangogav
diangogav deleted the build/declare-typescript-devdep branch June 19, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant