diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 0e884ba064901dea1f13ab12f446b4f93cbea02e..dc47ce0b54a3684a8d06c172ef392fda3fd5fff5 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2473,8 +2473,9 @@ For example you have multiple `package.json` and want to use `dependencyDashboar ### allowedVersions -Use this - usually within a packageRule - to limit how far to upgrade a dependency. -For example, if you wish to upgrade to Angular v1.5 but not to `angular` v1.6 or higher, you could define this to be `<= 1.5` or `< 1.6.0`: +You can use `allowedVersions` - usually within a `packageRules` entry - to limit how far to upgrade a dependency. + +For example, if you want to upgrade to Angular v1.5 but _not_ to `angular` v1.6 or higher, you could set `allowedVersions` to `<= 1.5` or `< 1.6.0`: ```json { @@ -2487,10 +2488,14 @@ For example, if you wish to upgrade to Angular v1.5 but not to `angular` v1.6 or } ``` -The valid syntax for this will be calculated at runtime because it depends on the versioning scheme, which is itself dynamic. +Renovate calculates the valid syntax for this at runtime, because it depends on the dynamic versioning scheme. + +#### Using regular expressions + +You can use Regular Expressions in the `allowedVersion` config. +You must _begin_ and _end_ your Regular Expression with the `/` character! -This field also supports Regular Expressions if they begin and end with `/`. -For example, the following will enforce that only 3 or 4-part versions are supported, without any prefixes: +For example, this config only allows 3 or 4-part versions, without any prefixes in the version: ```json { @@ -2503,8 +2508,12 @@ For example, the following will enforce that only 3 or 4-part versions are suppo } ``` -This field also supports a special negated regex syntax for ignoring certain versions. -Use the syntax `!/ /` like the following: +Again: note how the Regular Expression _begins_ and _ends_ with the `/` character. + +#### Ignore versions with negated regex syntax + +You can use a special negated regex syntax to ignore certain versions. +You must use the `!/ /` syntax, like this: ```json {