refactor(interop): remove json-schema-typed#1232
Conversation
json-schema-typed fixed [RemyRylan/json-schema-typed#116](RemyRylan/json-schema-typed#116)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR removes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Example instruction:
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. Comment |
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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-typedwrapper from@orpc/interoppackage - Updated
json-schema-typedfrom version 8.0.1 to 8.0.2 - Added direct dependencies on
json-schema-typed@^8.0.2to@orpc/json-schemaand@orpc/openapipackages
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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/interopis 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-checkkeywordsbeing imported viaimport typewhile used intypeof keywords.
LOGIC_KEYWORDSusessatisfies (typeof keywords)[number][], which relies onkeywordsas a value. Right nowkeywordsis only brought in throughimport 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
keywordsas a value for thetypeofquery.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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 insrc/types.tsand 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.tswith a direct dependency. Please verify that all packages consumingjson-schema-typeduse 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 inlineno-restricted-importsdisables) matches the new dependency wiring and keeps theJsonSchemaunion semantics unchanged. Please just confirm thattsc -band your Node + TS-native scenario (where this refactor originated) both type-check cleanly with these direct imports.
More templates
@orpc/ai-sdk
@orpc/arktype
@orpc/client
@orpc/contract
@orpc/experimental-durable-iterator
@orpc/hey-api
@orpc/interop
@orpc/json-schema
@orpc/nest
@orpc/openapi
@orpc/openapi-client
@orpc/otel
@orpc/experimental-pino
@orpc/experimental-publisher
@orpc/experimental-ratelimit
@orpc/react
@orpc/react-query
@orpc/experimental-react-swr
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-aws-lambda
@orpc/standard-server-fastify
@orpc/standard-server-fetch
@orpc/standard-server-node
@orpc/standard-server-peer
@orpc/svelte-query
@orpc/tanstack-query
@orpc/trpc
@orpc/valibot
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
json-schema-typed fixed RemyRylan/json-schema-typed#116
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.