Skip to content

feat(arktype): ArkTypeToJsonSchemaConverter #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 18, 2025
Merged

Conversation

unnoq
Copy link
Owner

@unnoq unnoq commented Mar 18, 2025

Summary by CodeRabbit

  • New Features

    • Introduced ArkType integration for generating OpenAPI specifications, complementing the existing Valibot support.
  • Documentation

    • Enhanced package documentation and package listings across the project with clear usage examples and updated links for both ArkType and Valibot, ensuring improved guidance for creating type-safe, contract-first APIs.
    • Added new entries for @orpc/valibot and @orpc/arktype in multiple README files, expanding the list of available packages for OpenAPI specification generation.

Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 6:33am

Copy link

coderabbitai bot commented Mar 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces support for generating OpenAPI specifications from ArkType alongside Valibot. It updates multiple README files to include new package entries, revises documentation to incorporate ArkType converter integration, and adds a completely new @orpc/arktype package. The new package contains source code, tests, configuration files, and a Gitignore. In addition, the converter implementation for transforming ArkType schemas into JSON Schema has been added and exported.

Changes

File(s) Change Summary
README.md Added entries for [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot) and [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype) under Packages.
apps/content/docs/openapi/... Updated documentation to include the ArkType schema library and integrated the experimental ArkType-to-JSON Schema converter.
packages/arktype/{.gitignore, README.md, package.json, src/{converter.ts, index.ts, converter.test.ts}, tsconfig.json} Introduced a new @orpc/arktype package with its Gitignore, documentation, package configuration, converter implementation, tests, re-export in index, and TypeScript config.
packages/{client, contract, openapi-client, openapi, react-query, server, shared, standard-server-fetch, standard-server-node, standard-server, solid-query, svelte-query, vue-colada, vue-query, zod}/README.md
packages/valibot/README.md
Updated the "Packages" sections to add new entries for @orpc/valibot and @orpc/arktype, and corrected the link for @orpc/valibot where needed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant OpenAPIGenerator
    participant ArkTypeToJsonSchemaConverter

    User->>OpenAPIGenerator: Provide ArkType schema & options
    OpenAPIGenerator->>ArkTypeToJsonSchemaConverter: condition(schema)
    ArkTypeToJsonSchemaConverter-->>OpenAPIGenerator: Returns true/false
    alt condition True
        OpenAPIGenerator->>ArkTypeToJsonSchemaConverter: convert(schema, options)
        ArkTypeToJsonSchemaConverter-->>OpenAPIGenerator: (required flag, JSON Schema)
        OpenAPIGenerator->>User: Return OpenAPI spec
    else condition False
        OpenAPIGenerator->>User: Skip schema conversion
    end
Loading

Possibly related PRs

  • refactor(openapi-client, client): move openapi serializer to its own package #186: The changes in the main PR, which involve adding new packages for OpenAPI spec generation, are related to the retrieved PR, which also deals with modifications in the OpenAPI context, specifically the restructuring of exports and imports related to OpenAPI serializers.
  • feat(valibot): ValibotToJsonSchemaConverter #261: The changes in the main PR, which involve adding new packages for OpenAPI spec generation, are related to the retrieved PR that introduces a new converter for the Valibot schema library, as both PRs enhance the integration of OpenAPI specifications within the oRPC framework.

Poem

I'm a rabbit with ears so keen,
Hopping through code in a meadow of green.
ArkType and Valibot join in our flight,
Converting schemas with magical might.
Cheers to changes, crisp and bright! 🐇✨

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1dea931 and c9d11d2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • apps/content/package.json (1 hunks)

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/arktype/src/index.ts 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link

pkg-pr-new bot commented Mar 18, 2025

Open in Stackblitz

More templates

@orpc/arktype

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

@orpc/client

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

@orpc/contract

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

@orpc/openapi

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

@orpc/openapi-client

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

@orpc/react-query

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

@orpc/server

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

@orpc/shared

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

@orpc/solid-query

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

@orpc/standard-server

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

@orpc/standard-server-node

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

@orpc/svelte-query

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

@orpc/valibot

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

@orpc/standard-server-fetch

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

@orpc/vue-colada

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

@orpc/vue-query

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

@orpc/zod

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

commit: c9d11d2

@unnoq unnoq merged commit 4fc998d into main Mar 18, 2025
4 of 5 checks passed
Copy link

@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: 2

🧹 Nitpick comments (16)
packages/arktype/src/converter.ts (2)

5-15: Consider adding error handling and additional validation

The implementation works for the happy path but lacks error handling for edge cases. The converter always returns [true, jsonSchema] regardless of the schema's properties, and there's no safety check before casting to Type.

Consider these improvements:

 export class experimental_ArkTypeToJsonSchemaConverter implements ConditionalSchemaConverter {
   condition(schema: AnySchema | undefined): boolean {
     return schema !== undefined && schema['~standard'].vendor === 'arktype'
   }

   convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>] {
+    if (!this.condition(schema)) {
+      throw new Error('Schema is not an ArkType schema')
+    }
+
     const jsonSchema = (schema as Type).toJsonSchema()
+    
+    // Handle potential errors from toJsonSchema()
+    if (!jsonSchema || typeof jsonSchema !== 'object') {
+      throw new Error('Failed to convert ArkType schema to JSON Schema')
+    }

     return [true, jsonSchema]
   }
 }

Also, if there's a specific reason for always returning [true, jsonSchema] (indicating the schema is always required), consider adding a comment explaining this design decision.


10-10: Consider utilizing SchemaConvertOptions

The _options parameter is currently unused (indicated by the underscore prefix). If there are no plans to use it in the future, this is fine, but consider documenting why or how it might be used in the future.

If options will never be used, you could consider adding a brief comment explaining why:

 convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>] {
+  // SchemaConvertOptions not used for ArkType schemas as they handle all conversion internally
   const jsonSchema = (schema as Type).toJsonSchema()
packages/arktype/src/converter.test.ts (1)

1-31: Tests look good, but could be expanded for better coverage.

The test cases cover the basic functionality of ArkTypeToJsonSchemaConverter, testing both the convert and condition methods. The tests verify that the converter correctly handles simple string types and object types, and properly distinguishes between ArkType and Zod schemas.

Consider adding additional test cases to improve coverage:

  1. Test conversion of more complex ArkType schemas (arrays, unions, intersections, etc.)
  2. Test with output strategy if applicable ({ strategy: 'output' })
  3. Add tests for edge cases and error scenarios
  4. Test with nested object structures

This would ensure the converter handles all possible ArkType schemas correctly.

packages/standard-server-fetch/README.md (1)

63-64: New Package Entries Added:
The entries for @orpc/valibot and @orpc/arktype have been correctly added with appropriate links and descriptions. As a minor stylistic suggestion, consider varying the introductory phrasing (currently "OpenAPI spec generation from ...") to avoid repetitive sentence starts, which was flagged by static analysis.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

README.md (1)

63-64: New Package Entries Added:
The additions for @orpc/valibot and @orpc/arktype are integrated correctly within the "Packages" section. For enhanced readability, you might consider rephrasing the bullet points slightly to prevent repetitive sentence openings, as indicated by the static analysis hints.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/server/README.md (1)

63-64: New Package Entries Confirmation:
The "Packages" section now includes the new entries for @orpc/valibot and @orpc/arktype with correct links and descriptions. If you wish to address the static analysis suggestion, a slight rewording to differentiate the entries could be beneficial.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/client/README.md (1)

63-64: New Package Entries Inclusion:
The "Packages" section now properly lists @orpc/valibot and @orpc/arktype, ensuring consistency across the documentation. As a minor nitpick, consider varying the starting phrasing in these bullet items to avoid repetitive constructions, as noted by static analysis.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/shared/README.md (1)

68-69: New Package Entries Added

The new entries for @orpc/valibot and @orpc/arktype clearly communicate their purpose as tools for OpenAPI spec generation from Valibot and ArkType respectively. One minor stylistic suggestion: consider varying the sentence openings to avoid repetitive phrasing as flagged by static analysis.

🧰 Tools
🪛 LanguageTool

[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/openapi-client/README.md (1)

63-64: Enhanced Documentation for OpenAPI Spec Tools

The documentation now includes entries for @orpc/valibot and @orpc/arktype. These additions help users quickly identify the new OpenAPI spec generation capabilities. Just a small note—the phrase structure in these two lines is very similar; consider rewording one of them to improve readability.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/openapi/README.md (1)

63-64: Updated Package List with New Entries

The additions for @orpc/valibot and @orpc/arktype provide concise descriptions of their roles in generating OpenAPI specifications. To enhance clarity and maintain variety in tone, you might consider modifying the repetitive sentence structure noted by static analysis.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/standard-server/README.md (1)

63-64: New Documentation Updates for Server Packages

The updated "Packages" section now features @orpc/valibot and @orpc/arktype with succinct descriptions. As with other files, there is an opportunity to diversify the sentence structure to improve the overall style and readability of the documentation.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/vue-query/README.md (1)

63-64: Addition of New OpenAPI Spec Generation Tools

The README now lists @orpc/valibot and @orpc/arktype as part of the available packages. This update aligns well with the broader documentation updates across the repo. A minor improvement would be to vary the sentence openings in these lines to avoid the repetition flagged by static analysis, which will further polish the document’s tone.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/vue-colada/README.md (1)

63-64: Enhance Documentation Clarity for New Package Entries.

The new bullet points for @orpc/valibot and @orpc/arktype accurately reflect their functionality. However, both descriptions begin with similar phrasing. For improved readability, consider rewording at least one of the entries to avoid repetitive sentence starts.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/standard-server-node/README.md (1)

63-64: Ensure Consistency and Readability in Package Listings.

The additions for @orpc/valibot and @orpc/arktype are correct and consistent with the overall documentation. A minor suggestion is to vary the introductory phrasing between these bullet items to reduce redundancy and enhance clarity.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/svelte-query/README.md (1)

63-64: Refine Wording for New Package Entries.

The recently added entries for @orpc/valibot and @orpc/arktype clearly document their purpose. To further improve readability, consider slight rephrasing so that each bullet point starts with a unique tone.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/arktype/README.md (1)

51-65: Minor Style Improvement Suggestion
Several sentences in the packages and features sections (e.g., the listing of supported integrations) begin with very similar wording. While this isn’t a blocker, rephrasing some of these lines could improve readability and make the documentation flow even better.

🧰 Tools
🪛 LanguageTool

[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~60-~60: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~62-~62: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98e1b3d and 1dea931.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • README.md (1 hunks)
  • apps/content/docs/openapi/openapi-specification.md (4 hunks)
  • packages/arktype/.gitignore (1 hunks)
  • packages/arktype/README.md (1 hunks)
  • packages/arktype/package.json (1 hunks)
  • packages/arktype/src/converter.test.ts (1 hunks)
  • packages/arktype/src/converter.ts (1 hunks)
  • packages/arktype/src/index.ts (1 hunks)
  • packages/arktype/tsconfig.json (1 hunks)
  • packages/client/README.md (1 hunks)
  • packages/contract/README.md (1 hunks)
  • packages/openapi-client/README.md (1 hunks)
  • packages/openapi/README.md (1 hunks)
  • packages/react-query/README.md (1 hunks)
  • packages/server/README.md (1 hunks)
  • packages/shared/README.md (1 hunks)
  • packages/solid-query/README.md (1 hunks)
  • packages/standard-server-fetch/README.md (1 hunks)
  • packages/standard-server-node/README.md (1 hunks)
  • packages/standard-server/README.md (1 hunks)
  • packages/svelte-query/README.md (1 hunks)
  • packages/valibot/README.md (1 hunks)
  • packages/vue-colada/README.md (1 hunks)
  • packages/vue-query/README.md (1 hunks)
  • packages/zod/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/zod/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/solid-query/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/shared/README.md

[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/valibot/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/server/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/contract/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/client/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/standard-server-fetch/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/react-query/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/openapi-client/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/standard-server/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/openapi/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/standard-server-node/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/vue-colada/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/arktype/README.md

[misspelling] ~35-~35: Possible spelling mistakes found.
Context: ...tack Query (React, Vue, Solid, Svelte), Pinia Colada, and more. - Server Actions ⚡️: Ful...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~60-~60: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~62-~62: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/svelte-query/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/vue-query/README.md

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (14)
packages/arktype/src/index.ts (1)

1-1: Export looks good!

Clean and straightforward export statement that makes the converter accessible through the package's root.

packages/solid-query/README.md (1)

63-64: Documentation updates look good!

The additions to the packages list are well-formatted and consistent with the existing entries. They provide useful links to both the npm packages and the official documentation sites.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/zod/README.md (1)

63-64: Documentation updates look good!

The additions to the packages list are well-formatted and consistent with the existing entries, providing clear information about the new packages' purposes.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/arktype/src/converter.ts (1)

1-4: Import statements look good!

The imports are correctly typed and bring in all the necessary types from the required packages.

packages/contract/README.md (1)

63-64: LGTM! Added new package entries for Valibot and ArkType.

The additions of @orpc/valibot and @orpc/arktype packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/valibot/README.md (1)

63-64: LGTM! Added new package entries for Valibot and ArkType.

The additions of @orpc/valibot and @orpc/arktype packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/react-query/README.md (1)

63-64: LGTM! Added new package entries for Valibot and ArkType.

The additions of @orpc/valibot and @orpc/arktype packages to the documentation are clear and consistent with the PR's objective of introducing ArkType support alongside Valibot.

🧰 Tools
🪛 LanguageTool

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/arktype/.gitignore (1)

1-26: New .gitignore File Added:
The file provides a well-structured set of ignore rules covering hidden files, common generated folders, and typical build artifacts. This configuration should help maintain a clean repository state.

packages/arktype/tsconfig.json (1)

1-21: TSConfig Setup Looks Correct.

The new tsconfig.json properly extends the base configuration, sets the rootDir correctly, and includes necessary project references along with appropriate include and exclude patterns.

packages/svelte-query/README.md (1)

70-110: Sample Code Block is Informative.

The example code provided demonstrates how to use query, infinite query, and mutation hooks effectively. This illustrative snippet aids in understanding the integration with Svelte Query.

packages/arktype/package.json (2)

1-24: Package Metadata Looks Good.

The package metadata for @orpc/arktype is comprehensive, covering essential fields such as the package name, type, version, license, homepage, repository details, keywords, and dependency settings.


28-46: Remaining Package Settings are Correct.

Other settings such as scripts, peerDependencies, and dependencies are appropriately defined to support the package's build and usage workflows.

apps/content/docs/openapi/openapi-specification.md (2)

38-40: New ArkType Integration Notice
The updated paragraph now includes ArkType alongside Zod and Valibot. This is a clear and useful enhancement that informs users about the new supported schema library. Ensure that you also clarify (if needed) the experimental nature of ArkType in the documentation.


49-60: Converter Imports & Schema Converters Setup
The import statements correctly bring in both the Valibot and ArkType converters from their respective packages, and the OpenAPIGenerator setup correctly includes new ArkTypeToJsonSchemaConverter() in the schemaConverters array. Double-check that the naming conventions and module paths remain consistent with other parts of the codebase.

Comment on lines +25 to +27
"exports": {
".": "./src/index.ts"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Review the Exports Configuration.

The "exports" field currently points to "./src/index.ts", but only the dist directory is published (as defined in the "files" array). This mismatch might lead to runtime issues for consumers expecting compiled code. Consider updating the "exports" field to reference the built output. For example:

-  "exports": {
-    ".": "./src/index.ts"
-  },
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.mts",
+      "import": "./dist/index.mjs",
+      "default": "./dist/index.mjs"
+    }
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"exports": {
".": "./src/index.ts"
},
"exports": {
".": {
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"default": "./dist/index.mjs"
}
},

Comment on lines +73 to +75
import { OpenAPIGenerator } from '@orpc/openapi'
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot'

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix Import Error in Code Sample
The code snippet for generating the OpenAPI spec incorrectly imports experimental_ArkTypeToJsonSchemaConverter from @orpc/valibot. Since this README is for the @orpc/arktype package, the converter should be imported from @orpc/arktype. Please update the import as follows:

- import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot'
+ import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/arktype'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { OpenAPIGenerator } from '@orpc/openapi'
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/valibot'
import { OpenAPIGenerator } from '@orpc/openapi'
import { experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter } from '@orpc/arktype'

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