Nicolò Ribaudo ff922962a4
Fix create-react-app and vue-cli tests on Node.js 17 (#13879)
* Fix `create-react-app` and `vue-cli` tests on Node.js 17

* Only on Node 17

* Fix
2021-10-25 07:22:42 +02:00

43 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
#==============================================================================#
# SETUP #
#==============================================================================#
# Start in scripts/integration-tests/ even if run from root directory
cd "$(dirname "$0")" || exit
source utils/local-registry.sh
source utils/cleanup.sh
# Echo every command being executed
set -x
# Clone vue-cli
git clone --depth=1 https://github.com/vuejs/vue-cli tmp/vue-cli
cd tmp/vue-cli || exit
#==============================================================================#
# TEST #
#==============================================================================#
# Don't use Yarn 2
export YARN_IGNORE_PATH=1
startLocalRegistry "$PWD"/../../verdaccio-config.yml
yarn install --ignore-engines # Remove --ignore-engines when vue-cli upgrades their lockfile to eslint-import-resolver-webpack@0.13.2
node "$PWD"/../../utils/bump-babel-dependencies.js
yarn lerna exec -- node "$PWD"/../../utils/bump-babel-dependencies.js
yarn install --ignore-engines # Remove --ignore-engines when vue-cli upgrades their lockfile to eslint-import-resolver-webpack@0.13.2
if [[ "$(node --version)" == v17.* ]]; then
# Remove this when https://github.com/webpack/webpack/issues/14532 is fixed
export NODE_OPTIONS=--openssl-legacy-provider
fi
# Test
CI=true yarn test -p babel,babel-preset-app
unset YARN_IGNORE_PATH
cleanup