@@ -66,15 +66,14 @@ root_path=$PWD
66
66
if hash npm 2> /dev/null
67
67
then
68
68
npm i -g npm@latest
69
- npm cache clean || npm cache verify
70
69
fi
71
70
72
71
# Bootstrap monorepo
73
72
yarn
74
73
75
74
# Start local registry
76
75
tmp_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 &
78
77
# Wait for `verdaccio` to boot
79
78
grep -q ' http address' <( tail -f $tmp_registry_log )
80
79
@@ -83,16 +82,13 @@ npm set registry "$custom_registry_url"
83
82
yarn config set registry " $custom_registry_url "
84
83
85
84
# 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 " )
92
86
93
87
# ******************************************************************************
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.
95
90
# ******************************************************************************
91
+
96
92
git clean -df
97
93
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
98
94
@@ -104,10 +100,13 @@ git clean -df
104
100
cd $temp_app_path
105
101
npx create-react-app test-app --scripts-version=react-scripts-ts
106
102
103
+ # TODO: verify we installed prerelease
104
+
107
105
# ******************************************************************************
108
106
# Now that we used create-react-app to create an app depending on react-scripts,
109
107
# let's make sure all npm scripts are in the working state.
110
108
# ******************************************************************************
109
+
111
110
function verify_env_url {
112
111
# Backup package.json because we're going to make it dirty
113
112
cp package.json package.json.orig
@@ -171,6 +170,8 @@ function verify_module_scope {
171
170
yarn build; test $? -eq 1 || exit 1
172
171
# TODO: check for error message
173
172
173
+ rm sample.json
174
+
174
175
# Restore App.tsx
175
176
rm src/App.tsx
176
177
mv src/App.tsx.bak src/App.tsx
@@ -218,7 +219,7 @@ exists build/static/css/*.css
218
219
exists build/static/media/* .svg
219
220
exists build/favicon.ico
220
221
221
- # Run tests, overring the watch option to disable it.
222
+ # Run tests, overriding the watch option to disable it.
222
223
# `CI=true yarn test` won't work here because `yarn test` becomes just `jest`.
223
224
# We should either teach Jest to respect CI env variable, or make
224
225
# `scripts/test.js` survive ejection (right now it doesn't).
0 commit comments