Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

minimum-node-version

hugojosefson798ISC3.0.0

Figures out the lowest version of Node.js that satisfies package.json engines.node

node, nodejs, version, minimum, semver, babel-preset-env, satisfies

readme

minimum-node-version

Build Status npm page License ISC SemVer 2.0.0 JavaScript Style Guide

Introduction

Figures out the lowest version of Node.js that satisfies engines.node in package.json.

Can be quite useful for which node version to configure babel-preset-env for.

Prerequisite

Node.js, at least v8.0.0, but not v9.

Recommended to install latest via nvm:

nvm install stable

Installation

npm install -g minimum-node-version

CLI Usage

minimum-node-version

Will print the Node.js version.

Programmatic access

You can also import or require the module, and use it programmatically.

import minimumNodeVersion from 'minimum-node-version'

minimumNodeVersion().then(
    version => console.log(version)
)

API

Table of Contents

minimumNodeVersion

Figures out the minimum Node.js version that satisfies the project's configuration.

Returns Promise<String> A Promise of the lowest compatible Node.js version.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

New unreleased changes are listed here, and moved down to a release number when released.

[3.0.0] - 2020-12-12

Security

  • Upgrade dependencies.

Changed

  • BREAKING Require Node.js version ^10.13.0 || >=12.0.0
  • Upgrade dependencies.

[2.0.2] - 2019-07-13

Changed

  • Upgrade dependencies.
  • Require more specific Node.js version ^8.12.0 || ^10.13.0 || >=11.10.1.

[2.0.1] - 2019-06-14

Changed

  • Upgrade dependencies.

[2.0.0] - 2019-05-03

Changed

  • BREAKING Require Node.js version 8.* || >= 10.*
  • Upgrade dependencies.

[1.0.1] - 2017-12-08

Changed

  • Use semver.minSatisfying().

[1.0.0] - 2017-12-08

Added