feat(nodejs): Add expected_version variable (#5081)

* add `expected_version` variable to `nodejs`

* show comparison symbols with `expected_version`

* documentation, formatting, more tests

* Remapped `engines_version` to $version

* Added better descriptions to docs

* Update docs/config/README.md

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Removed clone from `nodejs`, formatting

* refactored function calls

* rewrote `engines_version` formatter

* Moved Lazy variables into maps

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
marcybell
2023-06-01 22:24:11 +03:00
committed by GitHub
parent 351bf9d0b3
commit 70d2014f34
2 changed files with 104 additions and 12 deletions
+6 -5
View File
@@ -2859,11 +2859,12 @@ By default the module will be shown if any of the following conditions are met:
### Variables
| Variable | Example | Description |
| -------- | ---------- | ------------------------------------ |
| version | `v13.12.0` | The version of `node` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
| Variable | Example | Description |
| --------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| version | `v13.12.0` | The version of `node` |
| engines_version | `>=12.0.0` | `node` version requirement as set in the engines property of `package.json`. Will only show if the version requirement does not match the `node` version. |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string