@@ -66,15 +66,14 @@ root_path=$PWD
6666if hash npm 2> /dev/null
6767then
6868 npm i -g npm@latest
69- npm cache clean || npm cache verify
7069fi
7170
7271# Bootstrap monorepo
7372yarn
7473
7574# Start local registry
7675tmp_registry_log=` mktemp`
77- nohup npx verdaccio@2.7.2 & > $tmp_registry_log &
76+ nohup npx verdaccio@3.2.0 -c tasks/verdaccio.yaml & > $tmp_registry_log &
7877# Wait for `verdaccio` to boot
7978grep -q ' http address' <( tail -f $tmp_registry_log )
8079
@@ -83,16 +82,13 @@ npm set registry "$custom_registry_url"
8382yarn config set registry " $custom_registry_url "
8483
8584# Login so we can publish packages
86- npx npm-cli-login@0.0.10 -u user -p password -e user@example.com -r " $custom_registry_url " --quotes
87-
88- if [ $APPVEYOR != ' True' ]; then
89- # Flow started hanging on AppVeyor after we moved to Yarn Workspaces :-(
90- yarn flow
91- fi
85+ (cd && npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r " $custom_registry_url " )
9286
9387# ******************************************************************************
94- # Publish to local registry
88+ # First, test the create-react-app development environment.
89+ # This does not affect our users but makes sure we can develop it.
9590# ******************************************************************************
91+
9692git clean -df
9793./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
9894
@@ -104,10 +100,13 @@ git clean -df
104100cd $temp_app_path
105101npx create-react-app test-app --scripts-version=react-scripts-ts
106102
103+ # TODO: verify we installed prerelease
104+
107105# ******************************************************************************
108106# Now that we used create-react-app to create an app depending on react-scripts,
109107# let's make sure all npm scripts are in the working state.
110108# ******************************************************************************
109+
111110function verify_env_url {
112111 # Backup package.json because we're going to make it dirty
113112 cp package.json package.json.orig
@@ -171,6 +170,8 @@ function verify_module_scope {
171170 yarn build; test $? -eq 1 || exit 1
172171 # TODO: check for error message
173172
173+ rm sample.json
174+
174175 # Restore App.tsx
175176 rm src/App.tsx
176177 mv src/App.tsx.bak src/App.tsx
@@ -218,7 +219,7 @@ exists build/static/css/*.css
218219exists build/static/media/* .svg
219220exists build/favicon.ico
220221
221- # Run tests, overring the watch option to disable it.
222+ # Run tests, overriding the watch option to disable it.
222223# `CI=true yarn test` won't work here because `yarn test` becomes just `jest`.
223224# We should either teach Jest to respect CI env variable, or make
224225# `scripts/test.js` survive ejection (right now it doesn't).
0 commit comments