From c88ad91e3189ebafa36a91c0964d8dc92ceeb2a6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 18 Dec 2022 14:26:24 +0100 Subject: [PATCH] docs: added section on versioning --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 8b56267..4ce6f2d 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,25 @@ Plugins will be lazy-loaded when one of the following is `true`: - it defines an `init` method - `config.defaults.lazy == true` +### Versioning + +If you want to install a specific revision of a plugin, you can use `commit`, +`tag`, `branch`, `version`. + +The `version` property supports [Semver](https://semver.org/) ranges: + +- `*`: latest stable version (this excludes pre-release versions) +- `1.2.x`: any version that starts with `1.2`, such as `1.2.0`, `1.2.3`, etc. +- `^1.2.3`: any version that is compatible with `1.2.3`, such as `1.3.0`, `1.4.5`, etc., but not `2.0.0`. +- `~1.2.3`: any version that is compatible with `1.2.3`, such as `1.2.4`, `1.2.5`, but not `1.3.0`. +- `>1.2.3`: any version that is greater than `1.2.3`, such as `1.3.0`, `1.4.5`, etc. +- `>=1.2.3`: any version that is greater than or equal to `1.2.3`, such as `1.2.3`, `1.3.0`, `1.4.5`, etc. +- `<1.2.3`: any version that is less than `1.2.3`, such as `1.1.0`, `1.0.5`, etc. +- `<=1.2.3`: any version that is less than or equal to `1.2.3`, such as `1.2.3`, `1.1.0`, `1.0.5`, etc + +> You can set `config.defaults.version = "*"` to install the latest stable +> version of plugins that support Semver. + ```lua