yarnpkg/yarn

upgrade-interactive should do engine checks before showing the prompt

Open

#5902 opened on May 29, 2018

View on GitHub
 (3 comments) (1 reaction) (1 assignee)JavaScript (41,514 stars) (2,731 forks)batch import
cat-featuregood first issue

Description

Do you want to request a feature or report a bug? I want to request an improvement to an existing feature.

What is the current behavior? Given a local installation of NodeJS 10.0.0 and a package file that requires at least NodeJS 10.1.0, upgrade-interactive only shows an error after the user selects which packages they want to update.

If the current behavior is a bug, please provide the steps to reproduce.

  • Edit your package.json to include an engine requirement for "node": "x" where x is a version greater than your currently installed NodeJS version.
  • Run yarn upgrade-interactive --latest and select which dependencies to update.
  • See the error that says you need at least version x of NodeJS.

What is the expected behavior?

  • Edit your package.json to include an engine requirement for "node": "x" where x is a version greater than your currently installed NodeJS version.
  • Run yarn upgrade-interactive --latest and select which dependencies to update.
  • See the error that says you need at least version x of NodeJS.

In short, I would like these errors to show up before I spend time researching and selecting dependencies to update, rather than after. Since these checks are not affected by my upgrade choices, this should be possible.

Contributor guide