forked from addonscript/addonscript-spec
AddonScript version range specification
This commit is contained in:
parent
3fcece2622
commit
1861e66548
2 changed files with 24 additions and 14 deletions
|
@ -4,10 +4,25 @@
|
||||||
|
|
||||||
AddonScript version numbers MUST only contain non-whitespace ASCII characters. They SHOULD follow the
|
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
|
[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
|
according to the [Maven version order specification](#version-order-specification).
|
||||||
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,
|
### SemVer Compatible Versions
|
||||||
for example warning the user before updating to a next major version.
|
|
||||||
|
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
|
## Maven Versioning Specification
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,11 @@
|
||||||
|
|
||||||
This is the ID of the addon this relation refers to.
|
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
|
## Optional properties
|
||||||
|
|
||||||
### namespace
|
### 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
|
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.
|
[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
|
### repositories
|
||||||
|
|
||||||
This is an array of [repository](repository.md) IDs. These are the repositories, from which AddonScript will try to get this relation from,
|
This is an array of [repository](repository.md) IDs. These are the repositories, from which AddonScript will try to get this relation from,
|
||||||
|
|
Loading…
Reference in a new issue