Skip to content

Commit

Permalink
Allow relaxing the Node.js runtime version requirement (#3402)
Browse files Browse the repository at this point in the history
With this change, the `engines.node` of `package.json` need not be a fixed version; it can be a range using a subset of formats defined by `semver`.

A very limited subset of what [semver](https://github.com/npm/node-semver/blob/cb1ca1d5480a6c07c12ac31ba5f2071ed530c4ed/README.md#ranges) supports has been added; only a single comparator, composed of an operator and a version, is supported.

The supported operators are
 *   `>`    Greater than
 *   `>=`   Greater than or equal to
 *   `=`    Equal
 *   `~`    Tilde ranges: Allows patch changes if a minor version is specified but if only a major version is specified, it allows minor changes.
 *   `^`    Caret ranges: Allows patch and minor updates when major is non-zero (and we will never have that).

If no operator is specified, equality is assumed.

Signed-off-by: Miki <miki@amazon.com>
(cherry picked from commit b080da5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
github-actions[bot] committed Feb 17, 2023
1 parent 4a7c97e commit 0eec764
Show file tree
Hide file tree
Showing 3 changed files with 1,220 additions and 79 deletions.
Loading

0 comments on commit 0eec764

Please sign in to comment.