Switch to Yarn Workspaces (#3755)

* Switch to Yarn Workspaces

* Feedback

* Move flowconfig

* Use publish script

* Keep git status check

* Fix Flow without perf penalty

* Remove Flow from package.json "test"

* Try running it from script directly (?)

* Try magic incantations

* lol flow COME ON

* Try to skip Flow on AppVeyor

* -df

* -df

* -df

* Try to fix CI

* Revert unrelated changes

* Update CONTRIBUTING.md
This commit is contained in:
Dan Abramov
2018-01-12 01:54:53 +00:00
committed by GitHub
parent 3f7851deab
commit 0aeffe62ef
12 changed files with 65 additions and 107 deletions

View File

@@ -99,8 +99,8 @@ yarn config set registry "$custom_registry_url"
npx npm-cli-login@0.0.10 -u user -p password -e user@example.com -r "$custom_registry_url" --quotes
# Publish the monorepo
git clean -f
./tasks/release.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
git clean -df
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
# ******************************************************************************
# Test --scripts-version with a version number

View File

@@ -91,8 +91,8 @@ yarn config set registry "$custom_registry_url"
npx npm-cli-login@0.0.10 -u user -p password -e user@example.com -r "$custom_registry_url" --quotes
# Publish the monorepo
git clean -f
./tasks/release.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
git clean -df
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
# ******************************************************************************
# Now that we have published them, create a clean app folder and install them.

View File

@@ -107,6 +107,12 @@ npx npm-cli-login@0.0.10 -u user -p password -e user@example.com -r "$custom_reg
cd packages/react-error-overlay/
./node_modules/.bin/eslint --max-warnings 0 src/
yarn test
if [ $APPVEYOR != 'True' ]; then
# Flow started hanging on AppVeyor after we moved to Yarn Workspaces :-(
yarn flow
fi
cd ../..
cd packages/react-dev-utils/
yarn test
@@ -134,8 +140,8 @@ CI=true yarn test
# Test local start command
yarn start --smoke-test
git clean -f
./tasks/release.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
git clean -df
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
# ******************************************************************************
# Install react-scripts prerelease via create-react-app prerelease.

View File

@@ -26,21 +26,14 @@ set -x
cd ..
root_path=$PWD
# You can only release with npm >= 3
if [ $(npm -v | head -c 1) -lt 3 ]; then
echo "Releasing requires npm >= 3. Aborting.";
exit 1;
fi;
if [ -n "$(git status --porcelain)" ]; then
echo "Your git status is not clean. Aborting.";
exit 1;
fi
cd "$root_path"
# Compile
cd packages/react-error-overlay/
npm run build:prod
cd ../..
# Go!
./node_modules/.bin/lerna publish --independent "$@"
./node_modules/.bin/lerna publish --independent "$@"