Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Babel compiled using an old version of @babel/core #11319

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions scripts/integration-tests/e2e-babel-old-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/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
yarn upgrade --scope @babel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is yarn upgrade working again in our repo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ignore me, it doesn't work. According to the docs, yarn upgrade doesn't modify package.json if it's not needed, but it still updates the dependencies. You can see that yarn.lock changes after running this command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have replaced yarn upgrade by an ad-hoc script in #11021 due to yarnpkg/yarn#7797. I am not sure if that issue has been fixed or it affects only yarn upgrade-interactive so yarn upgrade is good.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't give problems here because we are not using yarn workspaces.
In yarn 2 it's probably fixed since it is a complete rewrite, but if it's not I can work around it in whichever of those two PRs (this one or yarn 2) gets merged last.


# We use @babel/core 7.5.5 instead of 7.0.0 because without babel/babel#10208
# our @babel/standalone build fails.

node -e "\
var pkg = require('./package.json');\
pkg.devDependencies['@babel/core'] = '7.5.5';\
Object.assign(pkg.resolutions, {\
'@babel/core': '7.5.5',\
'@babel/helpers': '7.5.5',\
'@babel/traverse': '7.0.0'\
});\
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));\
"

rm yarn.lock
make bootstrap

# Test
make test-ci

cleanup