diff --git a/docs/concepts/versioning.md b/docs/concepts/versioning.md index a03cdc1..a1fb148 100644 --- a/docs/concepts/versioning.md +++ b/docs/concepts/versioning.md @@ -4,10 +4,25 @@ AddonScript version numbers MUST only contain non-whitespace ASCII characters. They SHOULD follow the [SemVer specifications](https://semver.org/spec/v2.0.0.html). AddonScript version numbers are ordered -according to the [Maven version order specification](#version-order-specification). If an AddonScript -version number is valid SemVer, that version of the addon is SemVer compatible and implies all semantics -according to SemVer. AddonScript implementations MAY provide specific behavior based on the semver semantics, -for example warning the user before updating to a next major version. +according to the [Maven version order specification](#version-order-specification). + +### SemVer Compatible Versions + +If an AddonScript version number is valid SemVer, that version of the addon is SemVer compatible and implies +all semantics according to SemVer. AddonScript implementations MAY provide specific behavior based on the +semver semantics, for example warning the user before updating to a next major version. + +## AddonScript Version Ranges + +An AddonScript version range can either be a [SemVer version range](https://github.com/semver/semver/pull/584) +or a [Maven version range](#dependency-version-requirement-specification). If a version range starts with one +of SemVer primitive operators (`<`, `<=`, `>`, `>=`, `=`) it will be considered as a SemVer version range, +otherwise it will be a Maven version range. SemVer version ranges can only include +[SemVer compatible versions](#semver-compatible-versions). If the version range is required to include +an exact version, for example when using the `included` [relational flag](./flags.md#relational-flags), +it MUST be a Maven version range, which is the targeted version surrounded by `[]`. In all other cases +it is highly RECOMMENDED to use SemVer version ranges, as long as the targeted addon uses +[SemVer compatible versions](#semver-compatible-versions). ## Maven Versioning Specification diff --git a/docs/schema/relation.md b/docs/schema/relation.md index d6c034a..daa9072 100644 --- a/docs/schema/relation.md +++ b/docs/schema/relation.md @@ -16,6 +16,11 @@ This is the ID of the addon this relation refers to. +### version + +This is an [AddonScript version range](../concepts/versioning.md#addonscript-version-ranges) that specifies, which versions +of the related addon are targeted by this relation. + ## Optional properties ### namespace @@ -23,16 +28,6 @@ This is the ID of the addon this relation refers to. This is the [namespace](../concepts/namespaces.md) of the related addon. This property will be implicitly equal to the [namespace of the addon](manifest.md#namespace), if it was not set explicitly. -### version - -This is a [maven version range](../concepts/versioning.md#dependancy-version-requirement-specification) that specifies, which versions -of the related addon are targeted by this relation. You can either set this property or `semver`, but exactly one of them MUST be set. - -### semver - -This is a [semver version range](https://github.com/semver/semver/pull/584) of supported versions of this relation. -It will only allow versions of the related addon, which have a valid semver version number, which is in this range. - ### repositories This is an array of [repository](repository.md) IDs. These are the repositories, from which AddonScript will try to get this relation from,