test: patch verifyPackageTree for test purposes (#13567)

This commit is contained in:
Huáng Jùnliàng 2021-07-19 17:26:52 -04:00 committed by GitHub
parent aa18da08cd
commit fa439d6a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,13 @@ cd tmp/create-react-app || exit
# This change replaces useBuiltIns: true with runtime: "classic"
sed -i 's/useBuiltIns: true/runtime: "classic"/' packages/babel-preset-react-app/create.js
# create-react-app throws if `@babel/eslint-parser` is not pinned, but we
# must upgrade it for test purposes
sed -i "s#'@babel/eslint-parser',##" packages/react-scripts/scripts/utils/verifyPackageTree.js
# remove this line when https://github.com/facebook/create-react-app/pull/11216 gets merged
sed -i "s#isESLintPluginEnabled && 'babel-eslint',##" packages/react-scripts/scripts/utils/verifyPackageTree.js
bump_deps="$PWD/../../utils/bump-babel-dependencies.js"
node "$bump_deps"
for d in ./packages/*/