ObjectStackObjectStack

Plugin Versioning

Plugin Versioning protocol schemas

Plugin Versioning and Compatibility Protocol

Defines comprehensive versioning, compatibility checking, and dependency

resolution mechanisms for the plugin ecosystem.

Based on semantic versioning (SemVer) with extensions for:

  • Compatibility matrices

  • Breaking change detection

  • Migration paths

  • Multi-version support

Source: packages/spec/src/kernel/plugin-versioning.zod.ts

TypeScript Usage

import { BreakingChange, CompatibilityLevel, CompatibilityMatrixEntry, DependencyConflict, DeprecationNotice, MultiVersionSupport, PluginCompatibilityMatrix, PluginDependencyResolutionResult, PluginVersionMetadata, SemanticVersion, VersionConstraint } from '@objectstack/spec/kernel';
import type { BreakingChange, CompatibilityLevel, CompatibilityMatrixEntry, DependencyConflict, DeprecationNotice, MultiVersionSupport, PluginCompatibilityMatrix, PluginDependencyResolutionResult, PluginVersionMetadata, SemanticVersion, VersionConstraint } from '@objectstack/spec/kernel';

// Validate data
const result = BreakingChange.parse(data);

BreakingChange

Properties

PropertyTypeRequiredDescription
introducedInstringVersion that introduced this breaking change
typeEnum<'api-removed' | 'api-renamed' | 'api-signature-changed' | 'behavior-changed' | 'dependency-changed' | 'configuration-changed' | 'protocol-changed'>
descriptionstring
migrationGuidestringoptionalHow to migrate from old to new
deprecatedInstringoptionalVersion where old API was deprecated
removedInstringoptionalVersion where old API will be removed
automatedMigrationbooleanWhether automated migration tool is available
severityEnum<'critical' | 'major' | 'minor'>Impact severity

CompatibilityLevel

Compatibility level between versions

Allowed Values

  • fully-compatible
  • backward-compatible
  • deprecated-compatible
  • breaking-changes
  • incompatible

CompatibilityMatrixEntry

Properties

PropertyTypeRequiredDescription
fromstringVersion being upgraded from
tostringVersion being upgraded to
compatibilityEnum<'fully-compatible' | 'backward-compatible' | 'deprecated-compatible' | 'breaking-changes' | 'incompatible'>Compatibility level between versions
breakingChangesObject[]optional
migrationRequiredboolean
migrationComplexityEnum<'trivial' | 'simple' | 'moderate' | 'complex' | 'major'>optional
estimatedMigrationTimenumberoptional
migrationScriptstringoptionalPath to migration script
testCoveragenumberoptionalPercentage of migration covered by tests

DependencyConflict

Properties

PropertyTypeRequiredDescription
typeEnum<'version-mismatch' | 'missing-dependency' | 'circular-dependency' | 'incompatible-versions' | 'conflicting-interfaces'>
pluginsObject[]
descriptionstring
resolutionsObject[]optional
severityEnum<'critical' | 'error' | 'warning' | 'info'>

DeprecationNotice

Properties

PropertyTypeRequiredDescription
featurestringDeprecated feature identifier
deprecatedInstring
removeInstringoptional
reasonstring
alternativestringoptionalWhat to use instead
migrationPathstringoptionalHow to migrate to alternative

MultiVersionSupport

Properties

PropertyTypeRequiredDescription
enabledboolean
maxConcurrentVersionsintegerHow many versions can run at the same time
selectionStrategyEnum<'latest' | 'stable' | 'compatible' | 'pinned' | 'canary' | 'custom'>
routingObject[]optional
rolloutObjectoptional

PluginCompatibilityMatrix

Properties

PropertyTypeRequiredDescription
pluginIdstring
currentVersionstring
compatibilityMatrixObject[]
supportedVersionsObject[]
minimumCompatibleVersionstringoptionalOldest version that can be directly upgraded

PluginDependencyResolutionResult

Properties

PropertyTypeRequiredDescription
successboolean
resolvedObject[]optional
conflictsObject[]optional
warningsstring[]optional
installationOrderstring[]optionalPlugin IDs in order they should be installed
dependencyGraphRecord<string, string[]>optionalMap of plugin ID to its dependencies

PluginVersionMetadata

Properties

PropertyTypeRequiredDescription
pluginIdstring
versionObjectSemantic version number
versionStringstringFull version string (e.g., 1.2.3-beta.1+build.123)
releaseDatestring
releaseNotesstringoptional
breakingChangesObject[]optional
deprecationsObject[]optional
compatibilityMatrixObject[]optional
securityFixesObject[]optional
statisticsObjectoptional
supportObject

SemanticVersion

Semantic version number

Properties

PropertyTypeRequiredDescription
majorintegerMajor version (breaking changes)
minorintegerMinor version (backward compatible features)
patchintegerPatch version (backward compatible fixes)
preReleasestringoptionalPre-release identifier (alpha, beta, rc.1)
buildstringoptionalBuild metadata

VersionConstraint

Union Options

This schema accepts one of the following structures:

Option 1

Exact version: 1.2.3

Type: string


Option 2

Compatible with: ^1.2.3 (>=1.2.3 <2.0.0)

Type: string


Option 3

Approximately: ~1.2.3 (>=1.2.3 <1.3.0)

Type: string


Option 4

Greater than or equal: >=1.2.3

Type: string


Option 5

Greater than: >1.2.3

Type: string


Option 6

Less than or equal: <=1.2.3

Type: string


Option 7

Less than: <1.2.3

Type: string


Option 8

Range: 1.2.3 - 2.3.4

Type: string


Option 9

Any version

Type: string


Option 10

Latest stable version

Type: string



On this page