Open
Conversation
…ion sections for clarity
There was a problem hiding this comment.
Pull Request Overview
This PR integrates ArkType validation support into the typed-id library, expanding validation options alongside existing Zod and Valibot integrations. The implementation provides type-safe ID validation through ArkType schemas.
- Added ArkType as an optional peer dependency with implementation and comprehensive test coverage
- Created
createArkTypeIdSchemafunction that generates ArkType validation schemas for ID helpers - Updated documentation to include ArkType installation instructions, usage examples, and custom validation scenarios
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Added ArkType as optional peer dependency and dev dependency |
src/validators/arktype.ts |
Implemented ArkType schema creation function using regex validation |
src/validators/index.ts |
Exported ArkType validator for public API |
tests/validators/arktype.test.ts |
Added comprehensive test suite for ArkType integration |
README.md |
Updated documentation with ArkType integration guide and examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for ArkType validation to the
typed-idlibrary, allowing users to generate type-safe, prefixed IDs and validate them using ArkType schemas. The changes update documentation, package dependencies, and introduce new implementation and tests for ArkType integration.ArkType Integration:
package.json, including it in bothdevDependenciesandpeerDependencies, and marked it as optional inpeerDependenciesMeta. [1] [2]createArkTypeIdSchemafunction insrc/validators/arktype.tsto generate ArkType validation schemas for custom ID helpers.src/validators/index.tsfor public use.tests/validators/arktype.test.ts, covering default and custom options.Documentation Updates:
README.mdto announce ArkType integration, provide installation instructions, and add usage examples for ArkType validation, including custom configuration and validation scenarios. [1] [2] [3] [4] [5]These changes make it easier for users to validate IDs with ArkType, alongside existing support for Zod and Valibot, and ensure the library remains well-documented and tested.