Test Babel compiled using an old version of @babel/core (#11319)
* Test Babel compiled using an old version of @babel/core This should catch regressions where we use a new helper without a fallback for older versions, or when we use a new @babel/traverse method. * Enable the test
This commit is contained in:
parent
d23f0ae0ec
commit
9b976b2164
@ -142,6 +142,14 @@ jobs:
|
|||||||
at: /tmp/verdaccio-workspace
|
at: /tmp/verdaccio-workspace
|
||||||
- run: ./scripts/integration-tests/e2e-babel.sh
|
- run: ./scripts/integration-tests/e2e-babel.sh
|
||||||
|
|
||||||
|
e2e-babel-old-version:
|
||||||
|
executor: node-executor
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/verdaccio-workspace
|
||||||
|
- run: ./scripts/integration-tests/e2e-babel-old-version.sh
|
||||||
|
|
||||||
e2e-create-react-app:
|
e2e-create-react-app:
|
||||||
executor: node-executor
|
executor: node-executor
|
||||||
steps:
|
steps:
|
||||||
@ -191,6 +199,9 @@ workflows:
|
|||||||
- e2e-babel:
|
- e2e-babel:
|
||||||
requires:
|
requires:
|
||||||
- publish-verdaccio
|
- publish-verdaccio
|
||||||
|
- e2e-babel-old-version:
|
||||||
|
requires:
|
||||||
|
- publish-verdaccio
|
||||||
- e2e-create-react-app:
|
- e2e-create-react-app:
|
||||||
requires:
|
requires:
|
||||||
- publish-verdaccio
|
- publish-verdaccio
|
||||||
|
|||||||
46
scripts/integration-tests/e2e-babel-old-version.sh
Executable file
46
scripts/integration-tests/e2e-babel-old-version.sh
Executable file
@ -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
|
||||||
|
|
||||||
|
# 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
|
||||||
Loading…
x
Reference in New Issue
Block a user