yeoman / doctor

Detect potential issues with users system that could prevent Yeoman from working correctly
http://yeoman.io
BSD 2-Clause "Simplified" License
61 stars 17 forks source link

Update bin-version-check package not to use cross-spaws-async package. #53

Closed silverskyvicto closed 3 years ago

silverskyvicto commented 4 years ago

When installing yeoman using npm, I get the following warning:

npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead

This is due to the old bin-version-check package, which is doctor's dependent library, so it can be resolved by using a newer version.

How about it?

$ npm install -g yo
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
<User home directory>/.nodebrew/node/v12.16.2/bin/yo -> <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo/lib/cli.js
<User home directory>/.nodebrew/node/v12.16.2/bin/yo-complete -> <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo/lib/completion/index.js

> core-js@3.6.5 postinstall <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> ejs@2.7.4 postinstall <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

> spawn-sync@1.0.15 postinstall <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo/node_modules/spawn-sync
> node postinstall

> yo@3.1.1 postinstall <User home directory>/.nodebrew/node/v12.16.2/lib/node_modules/yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version
✔ yo version

Everything looks all right!
+ yo@3.1.1
added 684 packages from 392 contributors in 21.82s
LitoMore commented 4 years ago

@silverskyvicto The error name has been changed to InvalidBinaryVersion in bin-version-check@4.0.0.

This code below should be updated:

https://github.com/yeoman/doctor/blob/3a3689c2d88ff1c1233e728313a38e6c4edaaec0/lib/rules/yo-version.js#L21

LitoMore commented 4 years ago

By the way, could you add test for this? I would be better if we can cover the catch statement.

silverskyvicto commented 4 years ago

@LitoMore I added one test and it seems that I was able to test the error of the pattern that is not InvalidBinaryVersion, so I will reflect this as well.

LitoMore commented 4 years ago

ping @SBoudrias

silverskyvicto commented 3 years ago

@LitoMore It's been a long time since I submitted this pull request, has it not gone through review?

silverskyvicto commented 3 years ago

Related Issue: #49