Skip to content

fix(deps): bump runtime dependencies to latest minor/patch (axios, path-to-regexp security fixes) - #301

Merged
mfal merged 11 commits into
masterfrom
claude/deps-prod-minor
Oct 16, 2026
Merged

mfal merged 11 commits into
masterfrom
claude/deps-prod-minor

Conversation

@mfal

@mfal mfal commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Bumps runtime dependencies to the newest release within their current major that is at least 7 days old (.yarnrc.yml sets npmMinimalAgeGate: 10080). Re-derived from the registry on 2026-10-16, on top of current master.

This closes open security advisories: master currently resolves axios@1.15.2 and path-to-regexp@8.3.0, both of which have open GitHub advisories. The versions here have none.

Bumped

package workspace from to why it matters
axios commons, generator, root resolutions ^1.15.2 ^1.20.0 security, see below
path-to-regexp commons ^8.3.0 ^8.4.2 security, see below
@types/parse-path commons ^7.0.3 ^7.1.0
context models ^4.0.17 ^4.0.18
js-yaml generator ^5.4.1 ^5.4.3
prettier generator ^3.6.2 ^3.9.9 also devDependencies ^3.9.6 → ^3.9.9, see below
zod generator ^4.4.3 ^4.6.5

Security: axios 1.15.2 → 1.20.0

axios@1.15.2 is affected by 29 non-duplicate GitHub advisories (12 high). They were fixed in batches in 1.16.0, 1.18.0 and 1.20.0. Only 1.20.0 is clean. High-severity ones include:

axios is a runtime dependency of the published @mittwald/api-client-commons and of the generator. ^1.15.2 allows consumers to get 1.20.0 but doesn't force it, so existing lockfiles stay on a vulnerable version. Raising the floor to ^1.20.0 fixes that.

The root resolutions: { "axios": … } entry overrides every axios range in the workspace, so it is bumped in lockstep. Without that, the lockfile would stay at 1.15.2.

Behavior change for Node consumers behind a proxy: axios 1.20.0 tunnels HTTPS requests through a configured proxy (config.proxy or HTTPS_PROXY) via CONNECT, using its own HttpsProxyAgent (new dependency https-proxy-agent@5). A user-supplied httpsAgent is no longer used as-is, only its .options are copied. Browsers are unaffected (the http adapter is mapped out via the browser field). Worth a smoke test of the mw CLI behind a proxy.

Security: path-to-regexp 8.3.0 → 8.4.2

Both are fixed in 8.4.0.

prettier: devDependencies bumped too

Generator lists prettier in both dependencies and devDependencies. Yarn lets devDependencies win within a workspace, so bumping only dependencies would leave 3.9.6 installed. Both entries are bumped, and the lockfile is deduped to a single prettier 3.9.9. Strictly speaking, that is outside the "dependencies only" scope.

Not bumped

  • Too young for the age gate: js-yaml 5.5.0 (2026-10-15), prettier 3.9.10 (2026-10-10), zod 4.6.6 / 4.6.7 (2026-10-11 / 12). These will qualify on a later run.
  • type-fest (^4.30.0, latest in-major 4.41.0): from 4.39.x on, HasRequiredKeys semantics change. RequestFunction then no longer rejects a call that omits a required path parameter (RequestFunction.test-types.ts: unused @ts-expect-error). That is a loss of type safety in a published API, so it needs a review of that contract, not a mechanical bump.
  • another-deep-freeze (1.0.0): 1.0.1 is a broken publish (the tarball ships no build/, so main/types dangle). Still the latest release.

Everything else is already at its newest in-major release on master. Most of this PR's original bumps from September landed via #302, #303, #298 and #310 in the meantime.

Verification

  • yarn install --immutable: clean, @yarnpkg/core stays at 4.9.1
  • nx run-many -t build,lint,test,test:unit,test:compile --skip-nx-cache: all green (test:client-generation-clean only needs a clean tree and passes after commit)
  • build:client-prod: no diff against the committed generated client with prettier 3.9.9 / zod 4.6.5 / js-yaml 5.4.3
  • Installed versions checked via require.resolve (prettier 3.9.9, zod 4.6.5, js-yaml 5.4.3, context 4.0.18)

🤖 Generated with Claude Code

Bumps all runtime `dependencies` to the newest version within their
current major that satisfies the repository's `npmMinimalAgeGate` of one
week.

- @oclif/plugin-help   ^6.2.33 -> ^6.3.0   (generator)
- @types/parse-path    ^7.0.3  -> ^7.1.0   (commons)
- axios                ^1.15.2 -> ^1.20.0  (commons, generator)
- context              ^3.0.33 -> ^3.1.0   (models)
- js-yaml              ^4.1.0  -> ^4.3.2   (generator)
- path-to-regexp       ^8.3.0  -> ^8.4.2   (commons)
- prettier             ^3.6.2  -> ^3.9.6   (generator)
- tsd                  ^0.31.2 -> ^0.33.0  (models)
- zod-validation-error ^3.5.3  -> ^3.5.4   (generator)

The root `resolutions` entry for axios is bumped in lockstep; it
overrides every axios range in the workspace, so leaving it at ^1.15.2
would have made the dependency bump a no-op in the lockfile.

Two candidates are deliberately left untouched:

- type-fest (^4.30.0): 4.39.x changes the semantics of `HasRequiredKeys`
  so that `NullableOnNoRequiredKeysDeep` no longer marks a missing path
  parameter as an error, breaking the type-level contract asserted in
  `packages/commons/src/types/RequestFunction.test-types.ts`. Upgrading
  needs a review of that contract rather than a mechanical bump.
- another-deep-freeze (1.0.0): the 1.0.1 tarball is a broken publish and
  ships no `build/` directory, so `main` and `types` both dangle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mfal and others added 7 commits October 14, 2026 10:42
yarn.lock rebuilt from master's lockfile plus the PR-only entries,
then normalized via yarn install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	packages/models/package.json
#	yarn.lock
# Conflicts:
#	packages/generator/package.json
#	packages/models/package.json
#	yarn.lock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-derived from the registry: newest in-major release at least one
week old (npmMinimalAgeGate).

- context  ^4.0.17 -> ^4.0.18 (models)
- js-yaml  ^5.4.1  -> ^5.4.3  (generator)
- prettier ^3.9.6  -> ^3.9.9  (generator)
- zod      ^4.4.3  -> ^4.6.5  (generator)

prettier is bumped in generator's devDependencies too: Yarn lets
devDependencies win within a workspace, so bumping only `dependencies`
would leave 3.9.6 installed. The lockfile is deduped to a single
prettier 3.9.9.

Regenerating the client (build:client-prod) produces no diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mfal mfal changed the title fix(deps): bump dependencies to latest minor/patch fix(deps): bump runtime dependencies to latest minor/patch (axios, path-to-regexp security fixes) Oct 16, 2026
@mfal
mfal marked this pull request as ready for review October 16, 2026 07:58
@mfal
mfal enabled auto-merge (squash) October 16, 2026 07:58

@ins0 ins0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Unverified: raising the axios floor can leave consumers with two axios copies when their own lockfile pins axios below 1.20 and they pass their own instance to ApiClientBase. extractTotalCountHeader checks response.headers instanceof AxiosHeaders and would then throw for every list call. A duck-typed check on headers.get would be more robust. Not caused by this PR, just more likely after it.

Nit: The repo squash-merges with COMMIT_MESSAGES, so the squash body would carry the outdated list from 3ff22b7 (context ^3.0.33 -> ^3.1.0, js-yaml ^4.1.0 -> ^4.3.2, @oclif/plugin-help, tsd, zod-validation-error) plus the # Conflicts: blocks of the merge commits. Please replace the body when merging.

Nit: The description says 29 advisories for axios 1.15.2; gh api '/advisories?ecosystem=npm&affects=axios@1.15.2' returns 28 that aren't withdrawn (12 high). The cited CVEs and fix versions check out.

Comment thread packages/commons/package.json Resolved
Comment thread packages/commons/package.json Resolved
Comment thread packages/commons/package.json Resolved
Comment thread packages/generator/package.json Resolved
Comment thread yarn.lock Resolved
- commons: remove parse-path, path-to-regexp and @types/parse-path.
  None of them is imported anywhere in the package (nor in its
  published dist), so dropping them closes the path-to-regexp
  advisories for consumers for good instead of bumping a dead
  dependency.
- generator: remove @types/prettier, a deprecated stub; prettier ships
  its own types.
- generator: remove prettier from devDependencies. It is imported at
  runtime (src/generation/format.ts) and already listed in
  dependencies; the duplicate entry let devDependencies silently
  override the runtime range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ins0

ins0 commented Oct 16, 2026

Copy link
Copy Markdown
Member

Should: The description no longer matches the diff after 2dd03aa. The table still lists path-to-regexp and @types/parse-path as bumped, but both are removed now. The section "Security: path-to-regexp 8.3.0 → 8.4.2" should say that it is removed as unused. The section "prettier: devDependencies bumped too" is obsolete, and the removal of @types/prettier isn't mentioned.

Nit: While you're at it, the description could also mention the axios proxy behavior change (CONNECT tunneling via https-proxy-agent, see the inline comment) and fix the advisory count (28 active, not 29).

Should: type-fest is still open (see the inline comment). Leaving it for a follow-up PR is fine, it just shouldn't get lost.

mfal and others added 2 commits October 16, 2026 10:41
… 4.39

From type-fest 4.39 on, HasRequiredKeys distributes over unions and
reports false for primitives. Consumers already resolve type-fest 4.41
through the ^4.30.0 range, which made the request object of 474 of 491
v2 operations optional (e.g. f({}) without a required path parameter
compiled). Use a local HasRequiredKeys with the 4.30 semantics so the
request types no longer depend on the resolved type-fest version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
instanceof AxiosHeaders fails when a consumer ends up with two axios
copies (e.g. passing their own instance to ApiClientBase), so every list
call threw. Check for a get() method instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mfal
mfal merged commit f355b56 into master Oct 16, 2026
1 check 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