Skip to content

chore: fix TS build, security updates, and CI config#30

Merged
gibaros merged 6 commits intomainfrom
chore/deps-security-20260225
Feb 26, 2026
Merged

chore: fix TS build, security updates, and CI config#30
gibaros merged 6 commits intomainfrom
chore/deps-security-20260225

Conversation

@gibaros
Copy link
Copy Markdown
Contributor

@gibaros gibaros commented Feb 25, 2026

Summary

  • Fix pre-existing TypeScript compilation errors in HttpServer.ts — cast Hapi Request.headers (Record<string, string | string[] | undefined>) to Headers (Record<string, string>) at lines 112 and 129
  • Update all dependencies via ncu (sdk-standard-components 19.18.8, axios 1.13.5, typescript-eslint 8.56.1, npm-check-updates 19.5.0, etc.)
  • Add npm overrides for transitive vulnerabilities: axios 1.13.5, fast-xml-parser 5.3.6, cross-spawn 7.0.6, undici 6.23.0, lodash 4.17.23, qs 6.14.2
  • Update Dockerfile ARG NODE_VERSION to 22.22.0-alpine3.23
  • Update .nvmrc to 22.22.0
  • Update CircleCI orb mojaloop/build from 1.1.10 to 1.1.16
  • Add scan-type: source to .grype.yaml (prevents grype image scan CI failure when Docker tar not available)
  • Clean .grype.yaml: remove stale entries (glob, old zlib), add current base image ignores (tar, minimatch, diff, busybox, zlib)
  • Clean audit-ci.jsonc: 14 entries → 3 (only unfixable: ajv, minimatch, lodash-es)

Test plan

  • TypeScript build (npm run build) succeeds — no more TS2345 errors
  • All 44 unit tests pass across 7 test suites
  • npx audit-ci --config ./audit-ci.jsonc passes
  • npm run dep:check shows all dependencies up to date
  • CircleCI Grype scan passes with scan-type: source
  • Docker build succeeds with 22.22.0-alpine3.23

🤖 Generated with Claude Code

- Fix TypeScript compilation errors in HttpServer.ts: cast Hapi Request.headers
  to Headers type (Record<string, string>) to resolve incompatibility with
  @hapi/hapi's Record<string, string | string[] | undefined>
- Update dependencies via ncu (sdk-standard-components 19.18.8, axios 1.13.5,
  typescript-eslint 8.56.1, npm-check-updates 19.5.0, and others)
- Add npm overrides: axios 1.13.5, fast-xml-parser 5.3.6, cross-spawn 7.0.6,
  undici 6.23.0, lodash 4.17.23, qs 6.14.2
- Update Dockerfile ARG NODE_VERSION to 22.22.0-alpine3.23
- Update .nvmrc to 22.22.0
- Update CircleCI orb mojaloop/build 1.1.10 → 1.1.16
- Add scan-type: source to .grype.yaml (prevents CI grype image scan failure)
- Clean .grype.yaml: remove stale entries, add current base image ignores
- Clean audit-ci.jsonc: 14 entries → 3 (ajv, minimatch, lodash-es)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gibaros and others added 3 commits February 25, 2026 01:46
glob@10.4.5 is bundled in the Node.js base image npm and cannot be
fixed via application dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Orb version 1.1.16 has a bug where the Grype scan job
requires only Setup instead of Build, causing it to fail
because the Docker image hasn't been built yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gibaros
Copy link
Copy Markdown
Contributor Author

gibaros commented Feb 26, 2026

Regarding the code changes, they are required due to:

A breaking change on the patch update to @hapi/hapi

PR #4562 by damusix, titled "fix: auth typings and reduced type
ambiguity", was merged on 2026-02-18 and released in v21.4.5.

The PR description says: "Remove ambiguous types" — which is exactly
what happened. It replaced permissive any types with stricter ones.

The exact diff in lib/types/request.d.ts

The key change (v21.4.4...v21.4.5 comparison):

  • Headers: Record<string, any>;
  • Headers: Record<string, string | string[] | undefined>;
  • Params: Record<string, any>;
  • Params: Record<string, string>;

export interface RequestQuery {

Why it's breaking

  • In 21.4.4, request.headers['X-Something'] returned any, so const
    foo: string = request.headers['X-Something'] compiled with no
    complaints.
  • In 21.4.5+, it returns string | string[] | undefined, so the same
    line is now a TypeScript error — you need a cast or type guard.

This is a narrowing of a public type contract in a patch release,
which violates semver. Patch versions should be backwards-compatible
bug fixes.

Links

gibaros and others added 2 commits February 26, 2026 00:08
…rrides

Add version-specific npm overrides for vulnerable minimatch versions:
- minimatch@3.0.5 → 3.1.5
- minimatch@5.1.6 → 5.1.9

Remove GHSA-3ppc-4f35-3m26 from audit-ci.jsonc allowlist (now patched).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@elnyry-sam-k elnyry-sam-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gibaros gibaros merged commit 1901c2b into main Feb 26, 2026
15 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.

2 participants