Skip to main content

Versioning

The TEN framework follows the Semantic Versioning (SemVer) specification for all package versions. This standardized approach helps manage dependencies and compatibility across the ecosystem.

Package version declaration

Each TEN package must include a version field in its manifest.json file:


_3
{
_3
"version": "1.0.0"
_3
}

Package types and organization

TEN packages are organized in the following directory structure:


_5
└── ten_packages/
_5
├── extension/
_5
├── extension_group/
_5
├── protocol/
_5
└── system/

These packages are distinguished by the type field in their manifest.json:


_3
{
_3
"type": "system" // "extension", "extension_group", "protocol"
_3
}

Dependency management

Specify version requirements for dependencies in your package's manifest.json:


_24
{
_24
"dependencies": [
_24
{
_24
"type": "system",
_24
"name": "ten_runtime",
_24
"version": "1.0.1"
_24
},
_24
{
_24
"type": "system",
_24
"name": "ten_runtime_go",
_24
"version": "1.0.3"
_24
},
_24
{
_24
"type": "extension",
_24
"name": "default_http_extension_cpp",
_24
"version": "1.0.0"
_24
},
_24
{
_24
"type": "extension_group",
_24
"name": "default_extension_group",
_24
"version": "1.0.0"
_24
}
_24
]
_24
}

info

If you don't specify a version requirement for a dependency, the system uses the latest available version.

Version requirement syntax

A version requirements string can contain multiple requirements separated by commas. Each requirement supports the following operators:

  • >, >=, =: Specify a version range or exact version
  • ~: Specify a minimum version with limited flexibility
    • With major, minor, and patch specified: only patch-level changes are allowed
    • With only major and minor specified: only patch-level changes allowed
    • With only major specified: minor and patch-level changes allowed
  • ^: Allow SemVer-compatible updates
    • This operator is the default when no operator is specified
    • Updates are allowed as long as they don't change the leftmost non-zero number
    • Examples:
      • ^0.1.12 (same as 0.1.12): can update to 0.1.13 but not 0.2.0
      • ^1.0 (same as 1.0): can update to 1.1 but not 2.0
info

A version specified as 0.0.x is considered incompatible with any other version.