Skip to content

feat: deprecate JRPC V1#385

Open
lwin-kyaw wants to merge 2 commits intomasterfrom
feat/deprecate-jrpc-v1
Open

feat: deprecate JRPC V1#385
lwin-kyaw wants to merge 2 commits intomasterfrom
feat/deprecate-jrpc-v1

Conversation

@lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Feb 27, 2026

Motivation and Context

Jira Link:

Description

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
Primarily adds deprecation annotations and export guidance, which may surface new TypeScript/IDE warnings for downstream consumers and prompt migration work. Minor typing change in propagateToMutableRequest is low runtime risk but could affect compile-time expectations.

Overview
Marks the JRPC V1 surface area (engine, middleware types, provider helpers, and postMessage/stream utilities) as deprecated via JSDoc and adds top-level guidance in src/jrpc/index.ts to migrate to the ./v2 exports.

Improves V2 compatibility typing by making propagateToMutableRequest generic over its return type, and extends compatibility-utils tests to cover the new generic behavior and default typing.

Updates package-lock.json metadata by removing a number of peer: true flags from dev dependencies.

Written by Cursor Bugbot for commit d51d1ff. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

const clonedRequest = deepClone(req);
propagateToRequest(clonedRequest, context);
return clonedRequest;
return clonedRequest as ReturnType;
Copy link

Choose a reason for hiding this comment

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

Generic parameter shadows built-in TypeScript ReturnType utility

Low Severity

The generic type parameter ReturnType on propagateToMutableRequest shadows TypeScript's built-in ReturnType<T> utility type. This prevents use of the utility type within the function scope and can confuse developers who associate ReturnType with the standard utility. A name like TReturn or Result would avoid the shadowing.

Fix in Cursor Fix in Web

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