Skip to content

fix(ci): bump TypeScript to 5.x and jest toolchain to 29 to unbreak the build - #32

Merged
mariusz-peplinski merged 1 commit into
mainfrom
fix/ci-build-typescript-5
Aug 25, 2026
Merged

fix(ci): bump TypeScript to 5.x and jest toolchain to 29 to unbreak the build#32
mariusz-peplinski merged 1 commit into
mainfrom
fix/ci-build-typescript-5

Conversation

@mariusz-peplinski

Copy link
Copy Markdown
Contributor

What

Bump typescript ^4.3.5^5.9.3, and jest/ts-jest/@types/jest 27 → 29.

How it manifested

The Build check fails on every PR and would fail on main too — 50 errors, all inside node_modules:

ERROR in node_modules/@types/node/ffi.d.ts
[tsl] ERROR in node_modules/@types/node/ffi.d.ts(277,28)
      TS1005: ',' expected.
...
webpack 5.109.2 compiled with 50 errors

Not caused by any PR's code. Reproduced on a clean checkout of origin/main (4461bf3) — identical failure.

Why now

package-lock.json is gitignored and CI runs npm install, so every run re-resolves transitive deps from scratch. @types/node has floated to 26.3.0, whose .d.ts files use syntax TypeScript 4.9.5 cannot parse. The last green main build was 2026-04-03, before that bump landed.

Why the jest bump comes along

ts-jest@27.1.4 peer-caps typescript@">=3.8 <5.0", so bumping TypeScript alone makes npm install fail with ERESOLVE. jest 29 + ts-jest 29 lifts the cap.

Also refreshed the stale @ts-jest/dist/types JSDoc type import in jest.config.js (moved to ts-jest in v29).

Verification

On this branch, from a clean node_modules:

  • npm install — resolves cleanly, no ERESOLVE
  • npm run build — compiles, emits dist/index.js + dist/index.d.ts
  • npm test53/53 passing, no deprecation warnings

Follow-up worth considering (not in this PR)

The root cause is unpinned CI installs. Committing package-lock.json and switching the workflows to npm ci would make builds reproducible and stop this recurring.

…uild compiles again

The Build workflow runs `npm install` (package-lock.json is gitignored), so every
run re-resolves transitive dependencies from scratch. `@types/node` has since
floated to 26.x, whose .d.ts files use syntax TypeScript 4.9 cannot parse, and
ts-loader fails with 50 TS1005/TS1109/TS1128 errors in @types/node/ffi.d.ts.

Bumping typescript to ^5.9.3 fixes it, which in turn requires jest/ts-jest/@types/jest
29 because ts-jest 27 peer-caps typescript at <5.0.
@mariusz-peplinski
mariusz-peplinski marked this pull request as ready for review August 25, 2026 11:55
@mariusz-peplinski
mariusz-peplinski merged commit 06636a2 into main Aug 25, 2026
5 checks passed
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