Bug 1416257 - Disable yarn strict engines mode using .yarnrc

As of yarn 1.0+ if the version of node or yarn doesn't match that
specified in `package.json`, yarn commands will fail to run and
complain about incompatible versions. Unfortunately the error message
doesn't really make it clear that the user has the wrong version
installed, and instead gives the impression something is broken with
Treeherder. In addition, much of the time the exact version isn't
important, so the user doesn't need to go to the trouble of changing
their node installation.

As such, we just disable the yarn engines check for now.
This commit is contained in:
Ed Morley 2017-11-20 12:45:00 +00:00
Родитель 5d1b99fa79
Коммит 69f07fa84e
2 изменённых файлов: 5 добавлений и 5 удалений

4
.yarnrc Normal file
Просмотреть файл

@ -0,0 +1,4 @@
# Whilst in theory yarn's checking of the node/yarn version against the `engines` property
# in package.json is a great idea, in practice it causes unnecessary confusion/hassle for
# contributors, since most node/yarn versions will work fine with Treeherder anyway.
ignore-engines true

Просмотреть файл

@ -117,11 +117,7 @@ curl -sSfL 'https://download.mozilla.org/?product=firefox-beta-latest&lang=en-US
echo '-----> Running yarn install'
# We have to use `--no-bin-links` to work around symlink issues with Windows hosts.
# TODO: Switch the flag to a global yarn pref once yarn adds support.
# The node version isn't pinned in Vagrant (unlike Heroku/Travis) so we have to use
# --ignore-engines to prevent failures when there's a new release. This will be fixed
# as part of the move to a Docker based development environment, where the non-APT approach
# is much simpler.
yarn install --no-bin-links --ignore-engines
yarn install --no-bin-links
if [[ "$(shellcheck --version 2>&1)" != *"version: ${SHELLCHECK_VERSION}"* ]]; then
echo '-----> Installing shellcheck'