ekalinin/nodeenv

Support semantic versioning or similar

adifelice-godaddy opened this issue · 0 comments

It would be helpful to allow pinning minor versions of Node using pattern matching similar to semantic versioning. This is useful for environments constantly scanned for vulnerabilities.

References:

Current configuration example:

[nodeenv]
node = 14.18.0

Installs node-v14.18.0 as expected, which contains vulnerabilities.

Desired configuration:

[nodeenv]
node = 14.18

Installs node-v14.18.2 automatically patching the above.

Quick demo using semantic-version:

>>> from semantic_version import Version, SimpleSpec
>>> versions = [Version('14.18.0'), Version('14.18.1'), Version('14.18.2'), Version('14.19.0')]
>>> s = SimpleSpec('14.18')
>>> str(s.select(versions))
'14.18.2'