Skip to content

refactor(interop): remove json-schema-typed#1232

Merged
dinwwwh merged 1 commit intomainfrom
refactor/interop/remove-json-schema-typed
Nov 22, 2025
Merged

refactor(interop): remove json-schema-typed#1232
dinwwwh merged 1 commit intomainfrom
refactor/interop/remove-json-schema-typed

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Nov 21, 2025

json-schema-typed fixed RemyRylan/json-schema-typed#116

Summary by CodeRabbit

  • Chores
    • Reorganized internal dependency structure by moving json-schema-typed availability to json-schema and openapi packages, removing indirect re-exports from the interop package.

✏️ Tip: You can customize this high-level summary in your review settings.

@dinwwwh dinwwwh requested a review from Copilot November 21, 2025 02:57
@vercel
Copy link
Copy Markdown

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
orpc Ready Ready Preview Comment Nov 21, 2025 3:02am

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 21, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 21, 2025

Walkthrough

This PR removes the json-schema-typed re-export layer from the interop package and establishes direct dependencies in the json-schema and openapi packages, consolidating external module access while updating corresponding imports, exports, and tests.

Changes

Cohort / File(s) Change Summary
Configuration & Dependencies
.github/dependabot.yml, packages/json-schema/package.json, packages/openapi/package.json
Removed json-schema-typed from eslint group patterns in Dependabot; added json-schema-typed (^8.0.2) as direct dependencies to json-schema and openapi packages
Interop Package Removal
packages/interop/README.md, packages/interop/package.json
Removed json-schema-typed documentation reference; removed json-schema-typed from public exports and devDependencies
Interop Re-exports Cleanup
packages/interop/src/json-schema-typed/* (index.ts, draft-07.ts, draft-2019-09.ts, draft-2020-12.ts and corresponding .test.ts files)
Removed wildcard re-export statements and associated tests that verified exports from json-schema-typed modules
Direct Module Imports
packages/json-schema/src/types.ts, packages/openapi/src/schema.ts
Updated imports to use bare json-schema-typed module instead of via @orpc/interop; added eslint-disable-next-line no-restricted-imports comments

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review the interop package.json export mappings removal to ensure no public API contract breakage
  • Verify the import path substitutions in json-schema and openapi packages are consistent
  • Confirm the new direct dependencies in json-schema and openapi are properly declared and compatible

Possibly related PRs

  • unnoq/orpc#845: Modifies the same json-schema-typed import/export surface in packages/json-schema and packages/openapi
  • unnoq/orpc#873: Directly related as it removes json-schema-typed re-exports and tests from packages/interop while shifting to direct dependencies
  • unnoq/orpc#594: Modifies the same Dependabot configuration patterns around eslint group

Suggested labels

size:L

Poem

🐰 No more middle layers, just direct paths we'll take,
From interop's re-exports, a clean break we make,
json-schema-typed now stands on its own,
Simpler dependencies in every zone! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR removes json-schema-typed from @orpc/interop but adds it as a direct dependency to @orpc/json-schema and @orpc/openapi packages, which contradicts the issue's core request to address the incompatibility with TypeScript's erasableSyntaxOnly option. The changes appear to relocate rather than resolve the json-schema-typed incompatibility issue. Clarify whether this PR addresses the upstream library issue or if the incompatibility is being tackled separately in the json-schema-typed repository.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely summarizes the main objective: removing the json-schema-typed dependency from the interop package.
Out of Scope Changes check ✅ Passed All changes directly relate to removing json-schema-typed from @orpc/interop and relocating its usage to @orpc/json-schema and @orpc/openapi packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/interop/remove-json-schema-typed

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @unnoq, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the dependency management for the json-schema-typed package. Previously, json-schema-typed was re-exported through the @orpc/interop package to work around an upstream issue. With that issue now resolved, this change removes json-schema-typed from interop and instead makes it a direct dependency for any packages that require it, such as @orpc/json-schema and @orpc/openapi. This streamlines the project's dependency graph and simplifies the interop package's role.

Highlights

  • Removal of json-schema-typed from @orpc/interop: The json-schema-typed package and all its related re-export files have been entirely removed from the @orpc/interop package, as the upstream issue it was addressing has been resolved.
  • Direct Dependency for Consumers: Packages that previously relied on @orpc/interop to re-export json-schema-typed (specifically @orpc/json-schema and @orpc/openapi) now directly depend on json-schema-typed.
  • Dependency Management Cleanup: The dependabot.yml configuration and pnpm-lock.yaml have been updated to reflect these dependency changes, including a version bump for json-schema-typed to 8.0.2.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the codebase to remove the json-schema-typed package from the @orpc/interop compatibility layer, as the upstream package has been fixed. The changes correctly remove the re-exports and associated files from the interop package, and update dependent packages to use json-schema-typed directly. The changes are clean and well-executed. I've added a couple of minor suggestions to improve the code style of the new imports.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the json-schema-typed re-export from the @orpc/interop package after the upstream package fixed issue RemyRylan/json-schema-typed#116. Packages that need json-schema-typed now depend on it directly.

Key changes:

  • Removed json-schema-typed wrapper from @orpc/interop package
  • Updated json-schema-typed from version 8.0.1 to 8.0.2
  • Added direct dependencies on json-schema-typed@^8.0.2 to @orpc/json-schema and @orpc/openapi packages

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-lock.yaml Updated dependency locations and version from 8.0.1 to 8.0.2
packages/openapi/src/schema.ts Changed imports from @orpc/interop/json-schema-typed/draft-2020-12 to direct json-schema-typed/draft-2020-12 imports
packages/openapi/package.json Added json-schema-typed as direct dependency
packages/json-schema/src/types.ts Changed imports from @orpc/interop/json-schema-typed/* to direct json-schema-typed/* imports
packages/json-schema/package.json Added json-schema-typed as direct dependency
packages/interop/src/json-schema-typed/* Removed all re-export files and test files for json-schema-typed
packages/interop/package.json Removed json-schema-typed dependency and all related export paths
packages/interop/README.md Removed documentation about json-schema-typed re-export
.github/dependabot.yml Removed json-schema-typed from excluded packages list
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/interop/package.json (1)

36-39: Interop no longer depends on / exposes json-schema-typed – treat this as a breaking API change.

Dropping the json-schema-typed dependency and its exports from @orpc/interop is coherent with the refactor, but it removes the @orpc/interop/json-schema-typed/* entrypoints that downstreams may be using. Make sure this is called out in release notes and, if you follow semver, scheduled with an appropriate version bump.

packages/openapi/src/schema.ts (1)

1-4: Double-check keywords being imported via import type while used in typeof keywords.

LOGIC_KEYWORDS uses satisfies (typeof keywords)[number][], which relies on keywords as a value. Right now keywords is only brought in through import type { JSONSchema, keywords }, which can trip TypeScript’s “type-only import used as a value” rules.

If you see any tsc errors around this, a safer pattern is:

-// eslint-disable-next-line no-restricted-imports
-import type { JSONSchema, keywords } from 'json-schema-typed/draft-2020-12'
-// eslint-disable-next-line no-restricted-imports
-import { ContentEncoding as JSONSchemaContentEncoding, Format as JSONSchemaFormat, TypeName as JSONSchemaTypeName } from 'json-schema-typed/draft-2020-12'
+// eslint-disable-next-line no-restricted-imports
+import type { JSONSchema } from 'json-schema-typed/draft-2020-12'
+// eslint-disable-next-line no-restricted-imports
+import {
+  ContentEncoding as JSONSchemaContentEncoding,
+  Format as JSONSchemaFormat,
+  TypeName as JSONSchemaTypeName,
+  keywords,
+} from 'json-schema-typed/draft-2020-12'

This keeps JSONSchema type-only while importing keywords as a value for the typeof query.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c99db9 and cb57f72.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .github/dependabot.yml (0 hunks)
  • packages/interop/README.md (0 hunks)
  • packages/interop/package.json (1 hunks)
  • packages/interop/src/json-schema-typed/draft-07.test.ts (0 hunks)
  • packages/interop/src/json-schema-typed/draft-07.ts (0 hunks)
  • packages/interop/src/json-schema-typed/draft-2019-09.test.ts (0 hunks)
  • packages/interop/src/json-schema-typed/draft-2019-09.ts (0 hunks)
  • packages/interop/src/json-schema-typed/draft-2020-12.test.ts (0 hunks)
  • packages/interop/src/json-schema-typed/draft-2020-12.ts (0 hunks)
  • packages/interop/src/json-schema-typed/index.test.ts (0 hunks)
  • packages/interop/src/json-schema-typed/index.ts (0 hunks)
  • packages/json-schema/package.json (1 hunks)
  • packages/json-schema/src/types.ts (1 hunks)
  • packages/openapi/package.json (1 hunks)
  • packages/openapi/src/schema.ts (1 hunks)
💤 Files with no reviewable changes (10)
  • packages/interop/src/json-schema-typed/draft-07.ts
  • packages/interop/src/json-schema-typed/index.ts
  • packages/interop/src/json-schema-typed/draft-2020-12.test.ts
  • packages/interop/src/json-schema-typed/draft-2019-09.ts
  • .github/dependabot.yml
  • packages/interop/src/json-schema-typed/index.test.ts
  • packages/interop/src/json-schema-typed/draft-07.test.ts
  • packages/interop/README.md
  • packages/interop/src/json-schema-typed/draft-2020-12.ts
  • packages/interop/src/json-schema-typed/draft-2019-09.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: Agent
  • GitHub Check: lint
  • GitHub Check: publish-commit
  • GitHub Check: test
🔇 Additional comments (3)
packages/json-schema/package.json (1)

36-43: Direct json-schema-typed dependency looks correct; just confirm version alignment.

Adding "json-schema-typed": "^8.0.2" matches the new imports in src/types.ts and keeps the type-level dependency explicit. Please just double-check this is the intended range across all packages (json-schema, openapi, any others) and that it behaves as expected in your Node + TypeScript setup (including --experimental-strip-types / erasableSyntaxOnly).

packages/openapi/package.json (1)

72-82: Adding json-schema-typed to openapi deps is consistent with schema imports.

This aligns the runtime/type imports in src/schema.ts with a direct dependency. Please verify that all packages consuming json-schema-typed use the same version range and that your lockfile is updated so you don’t accidentally end up with multiple versions.

packages/json-schema/src/types.ts (1)

1-6: Direct json-schema-typed imports for draft types look good.

Switching the draft imports to json-schema-typed/* (with inline no-restricted-imports disables) matches the new dependency wiring and keeps the JsonSchema union semantics unchanged. Please just confirm that tsc -b and your Node + TS-native scenario (where this refactor originated) both type-check cleanly with these direct imports.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Nov 21, 2025

More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@1232

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1232

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1232

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1232

@orpc/experimental-durable-iterator

npm i https://pkg.pr.new/@orpc/experimental-durable-iterator@1232

@orpc/hey-api

npm i https://pkg.pr.new/@orpc/hey-api@1232

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1232

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1232

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1232

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1232

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@1232

@orpc/otel

npm i https://pkg.pr.new/@orpc/otel@1232

@orpc/experimental-pino

npm i https://pkg.pr.new/@orpc/experimental-pino@1232

@orpc/experimental-publisher

npm i https://pkg.pr.new/@orpc/experimental-publisher@1232

@orpc/experimental-ratelimit

npm i https://pkg.pr.new/@orpc/experimental-ratelimit@1232

@orpc/react

npm i https://pkg.pr.new/@orpc/react@1232

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@1232

@orpc/experimental-react-swr

npm i https://pkg.pr.new/@orpc/experimental-react-swr@1232

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1232

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1232

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@1232

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@1232

@orpc/standard-server-aws-lambda

npm i https://pkg.pr.new/@orpc/standard-server-aws-lambda@1232

@orpc/standard-server-fastify

npm i https://pkg.pr.new/@orpc/standard-server-fastify@1232

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@1232

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@1232

@orpc/standard-server-peer

npm i https://pkg.pr.new/@orpc/standard-server-peer@1232

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@1232

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1232

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1232

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1232

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@1232

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@1232

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1232

commit: cb57f72

@dinwwwh dinwwwh merged commit a2ee553 into main Nov 22, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with TypeScript's erasableSyntaxOnly option

2 participants