Update to Yarn 3 (#13140)

This commit is contained in:
Nicolò Ribaudo
2021-09-16 22:23:46 +02:00
committed by GitHub
parent 137fecc765
commit 2ffb19828f
17 changed files with 2126 additions and 1453 deletions

View File

@@ -64,6 +64,6 @@ node -e "
# Update deps, build and test
rm yarn.lock
make -j test-ci
YARN_ENABLE_IMMUTABLE_INSTALLS=false make -j test-ci
cleanup

View File

@@ -26,6 +26,7 @@ if [ "$BABEL_8_BREAKING" = true ] ; then
fi
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
# We only bump dependencies in the top-level package.json, because workspaces
# already use the workspace: protocol so will get the version in the monorepo
# and not from npm.
@@ -36,11 +37,11 @@ if [ "$BABEL_8_BREAKING" = true ] ; then
# Jest hangs forever in the Babel 8 e2e test when using multiple workers,
# but we don't know yet why. Until we figure it out (see
# https://github.com/babel/babel/pull/13618) we can use --runInBand.
make -j build-standalone-ci
YARN_ENABLE_IMMUTABLE_INSTALLS=false make -j build-standalone-ci
BABEL_ENV=test yarn jest --ci --runInBand
make -j test-clean
else
make -j test-ci
YARN_ENABLE_IMMUTABLE_INSTALLS=false make -j test-ci
fi
cleanup

View File

@@ -48,6 +48,13 @@ if [ "$BABEL_8_BREAKING" = true ] ; then
# Jest depends on @types/babel__traverse for Babel 7, and they contain the removed Noop node
sed -i 's/t.Noop/any/g' node_modules/@types/babel__traverse/index.d.ts
sed -i 's/t.Noop/any/g' node_modules/@types/babel__traverse/ts4.1/index.d.ts
node -e "
var pkg = require('./package.json');
pkg.resolutions || (pkg.resolutions = {});
pkg.resolutions['@types/babel__traverse/@babel/types'] = 'latest';
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));
"
fi
yarn build

View File

@@ -9,8 +9,8 @@ function startLocalRegistry {
# Start local registry
tmp_registry_log=`mktemp`
echo "Registry output file: $tmp_registry_log"
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
yarn global add verdaccio-memory@~9.7.2
(cd && nohup npx verdaccio@~5.1.2 -c $1 &>$tmp_registry_log &)
YARN_IGNORE_PATH=1 yarn global add verdaccio-memory@~10.0.0
# Wait for Verdaccio to boot
grep -q "http address" <(tail -f $tmp_registry_log)