rxaviers / cldr-data-npm

Npm module for Unicode CLDR JSON data
MIT License
42 stars 27 forks source link

enable download when npm version 3 or greater is detected #56

Open bruceeolson opened 6 years ago

bruceeolson commented 6 years ago

install.js checks the npm version as follows.

var npmv = child_process.execSync('npm -v').toString('utf8'); isNpm3 = (npmv.split('.')[0] == '3');

If isNpm3 is false then install aborts in some cases that it should not. For example, when npm version is greater than 3.

In this PR the logic was modified so that isNpm3 is true for 3 or greater.

isNpm3 = parseInt(npmv.split('.')[0], 10) >= 3;

rxaviers commented 5 months ago

Thank you