Skip to content

Add version schema utilities to shared protocol#500

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/apply-patch
Closed

Add version schema utilities to shared protocol#500
Copilot wants to merge 2 commits intomainfrom
copilot/apply-patch

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 3, 2026

Adds standardized version handling schemas to the shared protocol layer for use across package manifests, plugin versioning, and marketplace operations.

Changes

  • New schemas in src/shared/version.zod.ts:

    • SemanticVersionSchema - SemVer 2.0.0 validation (regex-based)
    • VersionRangeSchema - Version range patterns (^1.0.0, >=1.0.0 <2.0.0, etc.)
    • VersionConstraintSchema - Operator + version pairs
    • ReleaseChannelSchema - Enum for stable/beta/alpha/nightly/canary
    • VersionMetadataSchema - Extended metadata with channel, build info, timestamps
  • Test coverage: 32 tests covering valid/invalid inputs and edge cases

  • Exported from shared index for namespace imports

Usage

import { SemanticVersionSchema, VersionMetadataSchema } from '@objectstack/spec/shared';

// Validate version strings
const version = SemanticVersionSchema.parse('1.2.3-beta.1+build.456');

// Full version metadata
const metadata = VersionMetadataSchema.parse({
  version: '1.2.3',
  channel: 'beta',
  buildNumber: '12345',
  gitCommit: 'a1b2c3d',
  publishedAt: '2024-01-15T10:30:00Z'
});

Intended for use in system/manifest.zod.ts, system/plugin.zod.ts, and hub/marketplace.zod.ts.

Original prompt

发一个补丁


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Feb 3, 2026 6:02am

Request Review

Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation tests size/l labels Feb 3, 2026
Copilot AI changed the title [WIP] Apply patch for bug fix Add version schema utilities to shared protocol Feb 3, 2026
Copilot AI requested a review from xuyushun441-sys February 3, 2026 06:05
@hotlong hotlong closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants