babel/scripts/integration-tests/e2e-babel-old-version.sh
Huáng Jùnliàng 3fad7eab9b
Use Yarn 2 (#11962)
* chore: use yarn 2

* chore: remove redundant yarn locks

* chore: remove publishEslintPkg

* chore: remove redundant make bootstrap

* Update .yarnrc.yml

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>

* chore: use workspace protocol for eslint packages in the root

Co-Authored-By: merceyz <merceyz@users.noreply.github.com>

* chore: pin caniuse-lite versions

Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie
depends on specific caniuse-lite versions. We pinned the version here
so we don't have to deal with fixture different in e2e-tests
where all deps will be updated and tested.

* chore: resolve yarn install warnings

* chore: update yarn cache path on circle/travis

* chore: add yarn deduplicate plugin

* chore: deduplicate lock files

* chore: move devDependencies to leaf packages

* chore: remove @yarnpkg/plugin-constraints

* chore: remove unused dedupe options

* test: fix unwanted self reference

* chore: remove output-file-sync dependency

* chore: update browserify to 16.5.2

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-25 14:37:30 -04:00

51 lines
1.6 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
# Go to the root of the monorepo
cd ../..
#==============================================================================#
# TEST #
#==============================================================================#
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
node "$PWD"/scripts/integration-tests/utils/bump-babel-dependencies.js
(
yarn why @babel/core | grep -o "@babel/core@npm:.* (via npm:.*)";
yarn why @babel/helpers | grep -o "@babel/helpers@npm:.* (via npm:.*)";
yarn why @babel/traverse | grep -o "@babel/traverse@npm:.* (via npm:.*)"
) | uniq | node -e "
var pkg = require('./package.json');
var packages = fs.readFileSync(0, 'utf8').trim().split('\n');
pkg.devDependencies['@babel/core'] = '7.0.0';
packages.forEach(desc => {
const { name, specifier } = desc
.match(/(?<name>@babel\/[a-z]+).*\(via (?<specifier>npm:[^)]+)\)/)
.groups;
pkg.resolutions[name + '@' + specifier] = '7.0.0';
});
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));
"
# Update deps, build and test
rm yarn.lock
make -j test-ci
cleanup