mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* chore: test ESM version against Node.js 24 * update Node.js 24 runtime integration test snapshot * fix node 12 LTS snapshots * Update node.cjs Co-authored-by: Nicolò Ribaudo <[email protected]> * bump verdaccio to 6.1.2 * pin node to 22 * Revert "pin node to 22" This reverts commit 7f203513fd56dc941e9f6e2d296a5e21b06d8ba2. * remove unused openssl workaround * print npm logs on error * pin create-react-app node to 22 --------- Co-authored-by: Nicolò Ribaudo <[email protected]>
59 lines
1.8 KiB
Bash
Executable File
59 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env 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 create-react-app
|
|
git clone --depth=1 https://github.com/facebook/create-react-app.git tmp/create-react-app
|
|
cd tmp/create-react-app || exit
|
|
|
|
#==============================================================================#
|
|
# TEST #
|
|
#==============================================================================#
|
|
|
|
# !!! WARNING !!!
|
|
# create-react-app uses the useBuiltIns: true option of @babel/preset-react,
|
|
# removed in Babel 8.0.0. And it does not specify runtime option. The test will break on
|
|
# runtime: "automatic", default of Babel 8.
|
|
# This change replaces useBuiltIns: true with runtime: "classic"
|
|
sed -i 's/useBuiltIns: true/runtime: "classic"/' packages/babel-preset-react-app/create.js
|
|
|
|
bump_deps="$PWD/../../utils/bump-babel-dependencies.js"
|
|
node "$bump_deps" resolutions
|
|
for d in ./packages/*/
|
|
do
|
|
(cd "$d"; node "$bump_deps" resolutions)
|
|
done
|
|
|
|
startLocalRegistry "$PWD"/../../verdaccio-config.yml
|
|
|
|
# Remove this when CRA updates jest-worker in their lockfile
|
|
node -e "
|
|
var pkg = require('./package.json');
|
|
|
|
pkg.resolutions = {
|
|
'jest-worker': '27.4.5'
|
|
};
|
|
|
|
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));
|
|
"
|
|
npm install --ignore-scripts
|
|
npx npm-force-resolutions
|
|
|
|
npm install
|
|
|
|
# Test
|
|
CI=true npm run test
|
|
|
|
cleanup
|