8000 fix(deps): upgrade @hey-api/openapi-ts to 0.99 and regenerate the client by adeelahmad · Pull Request #44 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(deps): upgrade @hey-api/openapi-ts to 0.99 and regenerate the client - #44

Merged
adeelahmad merged 1 commit into
mainfrom
claude/fix-vulnerable-deps-hk9ud5
Oct 2, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/fix-vulnerable-deps-hk9ud5

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: after #41, pnpm audit still reported 21 frontend advisories (2 critical). All of them came from @hey-api/openapi-ts 0.83: handlebars, tar (through c12 and giget), and the generator's own buildClientParams prototype-chain advisory.

After: pnpm audit reports no known vulnerabilities. Nothing changes for users.

Motivation and Context

The 0.83 → 0.99 upgrade (held Dependabot #7) is the only fix for the handlebars and tar criticals, because 0.97+ no longer depends on either.

How:

  • @hey-api/openapi-ts is 0.99.0 and app/openapi-client is regenerated. Regenerating twice produces the same output.
  • output.format/lint are replaced by postProcess: ["prettier"]. ESLint was what failed partway through the earlier 0.99 attempt: eslint.config.mjs ignores the generated folder, and ESLint exits 2 when every file it is given is ignored.
  • Behavior kept: the new client returns a request that never got a response as { error, response: undefined } instead of throwing. throwingNetworkErrors (lib/api/client.ts) adds an error interceptor to the server and browser clients so those requests still reject. Without it, signing in while the API is down would say "Wrong email or password". auth.ts and lib/auth/tokens.ts use response?.status to satisfy the new types.
  • Adds a js-yaml@^4 floor of 4.3.2, because the new ref-parser pins 4.2.0.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests. (__tests__/api-client.test.ts: network failure rejects, HTTP error returns {error, response}, success returns data. The first test fails without the interceptor.)
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Checked locally, since no runner is available:

  • tsc, eslint and Prettier are clean. Jest passes 538/538. next build succeeds. The pre-commit hooks pass.
  • Smoke test in Chromium against the production build, the API and a real SurrealDB 3.2.4 server: first-admin setup with the setup code, a wrong password ("Wrong email or password."), sign-in, skipping the wizard, and loading 15 app pages. There were no 5xx responses and no error text. With the API stopped, sign-in shows "An unexpected error occurred", not the wrong-password message.

Supersedes #7.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YPDRcAu87qM3sf5WRoPWY6


Generated by Claude Code

Removes the critical handlebars and tar alerts from the generator's
dependency tree and fixes the prototype-chain advisory in the generated
client. The new client returns network failures as results; an error
interceptor keeps them throwing as before, so an unreachable API is not
mistaken for an API error. ESLint is dropped as a post-processor because
eslint.config.mjs ignores the generated folder and ESLint exits non-zero
on it. js-yaml 4 gets a security floor.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YPDRcAu87qM3sf5WRoPWY6
@adeelahmad
adeelahmad force-pushed the claude/fix-vulnerable-deps-hk9ud5 branch from 8eb97fe to d5ef22b Compare October 2, 2026 14:11
@adeelahmad
adeelahmad merged commit 2cdb919 into main Oct 2, 2026
0 of 4 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

0