Skip to content

fix(agents): drop unused deps, devDeps, and peer deps#1346

Merged
threepointone merged 1 commit intomainfrom
fix-1345
Apr 20, 2026
Merged

fix(agents): drop unused deps, devDeps, and peer deps#1346
threepointone merged 1 commit intomainfrom
fix-1345

Conversation

@threepointone
Copy link
Copy Markdown
Contributor

@threepointone threepointone commented Apr 20, 2026

Summary

Trim entries from packages/agents/package.json that were not imported by the package. Closes #1345 by removing json-schema-to-typescript (which transitively pulled in vulnerable lodash, GHSA-p6mc-m468-83gw) from the runtime dependency tree.

dependencies

devDependencies

  • Remove @ai-sdk/openai — only appeared in a commented-out line in evals/scheduling.eval.ts.
  • Remove @cloudflare/workers-oauth-provider — no references anywhere in the package.

peerDependencies / peerDependenciesMeta

  • Remove @ai-sdk/react — not imported directly. @cloudflare/ai-chat (an optional peer) already declares @ai-sdk/react as its own peer, so users using the chat entry points will be prompted to install it via that package.
  • Remove viem — not imported anywhere (only a JSDoc mention). @x402/evm declares viem as a regular (non-peer) dependency, so it's installed transitively whenever x402 is used.

A patch changeset for agents is included.

Test plan

  • npm install at the repo root succeeds and reconciles the lockfile.
  • tsc -p packages/agents/tsconfig.json, packages/agents/src/tests/tsconfig.json, and packages/agents/src/react-tests/tsconfig.json all pass with the removals applied.
  • CI (lint, typecheck, tests) passes.
  • Confirm npm ls json-schema-to-typescript no longer shows it under agents after install in a downstream project.

Made with Cursor


Open in Devin Review

- dependencies: remove json-schema, json-schema-to-typescript, picomatch
  (none are imported; picomatch is transitive of @rolldown/plugin-babel).
  Dropping json-schema-to-typescript also removes its lodash transitive,
  resolving the GHSA-p6mc-m468-83gw audit flag from end-user installs.
- devDependencies: remove @ai-sdk/openai (only referenced in a
  commented-out line) and @cloudflare/workers-oauth-provider (unused).
- peerDependencies / peerDependenciesMeta: remove @ai-sdk/react and viem.
  @ai-sdk/react is already declared as a peer of @cloudflare/ai-chat
  (itself an optional peer here); viem is a regular dependency of
  @x402/evm, so both flow in transitively when their features are used.

Closes #1345

Made-with: Cursor
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 20, 2026

🦋 Changeset detected

Latest commit: ec9dcae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 20, 2026

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1346

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1346

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1346

hono-agents

npm i https://pkg.pr.new/hono-agents@1346

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1346

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1346

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1346

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1346

commit: ec9dcae

@threepointone threepointone merged commit a78bb2a into main Apr 20, 2026
2 of 3 checks passed
@threepointone threepointone deleted the fix-1345 branch April 20, 2026 18:15
@github-actions github-actions Bot mentioned this pull request Apr 20, 2026
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.

json-schema-to-typescript transitive pulls vulnerable lodash into production builds (HIGH advisory)

1 participant