Skip to content

Commit 8805873

Browse files
authored
Deprecate old test script commands (facebook#19893)
* Deprecate old test script commands * Update PR template test script * Add test-stable and test-www-classic * Update circle test names * Rename test-www-classic to test-classic * Missed some job renames * Missed some more job renames
1 parent e614e69 commit 8805873

File tree

4 files changed

+68
-57
lines changed

4 files changed

+68
-57
lines changed

.circleci/config.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ jobs:
101101
- *restore_node_modules
102102
- run: node ./scripts/tasks/flow-ci
103103

104-
RELEASE_CHANNEL_stable_yarn_test:
104+
yarn_test-stable:
105105
docker: *docker
106106
environment: *environment
107107
parallelism: *TEST_PARALLELISM
108108

109109
steps:
110110
- checkout
111111
- *restore_node_modules
112-
- run: yarn test --release-channel=stable --ci
112+
- run: yarn test-stable --ci
113113

114114
yarn_test:
115115
docker: *docker
@@ -120,97 +120,97 @@ jobs:
120120
- *restore_node_modules
121121
- run: yarn test --ci
122122

123-
RELEASE_CHANNEL_stable_yarn_test_www:
123+
yarn_test-classic:
124124
docker: *docker
125125
environment: *environment
126126
parallelism: *TEST_PARALLELISM
127127
steps:
128128
- checkout
129129
- *restore_node_modules
130-
- run: yarn test --release-channel=www-classic --ci
130+
- run: yarn test-classic --ci
131131

132-
RELEASE_CHANNEL_stable_yarn_test_www_variant:
132+
yarn_test-classic_variant:
133133
docker: *docker
134134
environment: *environment
135135
parallelism: *TEST_PARALLELISM
136136
steps:
137137
- checkout
138138
- *restore_node_modules
139-
- run: yarn test --release-channel=www-classic --variant --ci
139+
- run: yarn test-classic --variant --ci
140140

141-
RELEASE_CHANNEL_stable_yarn_test_prod_www:
141+
yarn_test-classic_prod:
142142
docker: *docker
143143
environment: *environment
144144
parallelism: *TEST_PARALLELISM
145145
steps:
146146
- checkout
147147
- *restore_node_modules
148-
- run: yarn test --release-channel=www-classic --prod --ci
148+
- run: yarn test-classic --prod --ci
149149

150-
RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
150+
yarn_test-classic_prod_variant:
151151
docker: *docker
152152
environment: *environment
153153
parallelism: *TEST_PARALLELISM
154154
steps:
155155
- checkout
156156
- *restore_node_modules
157-
- run: yarn test --release-channel=www-classic --prod --variant --ci
157+
- run: yarn test-classic --prod --variant --ci
158158

159-
yarn_test_www:
159+
yarn_test-www:
160160
docker: *docker
161161
environment: *environment
162162
parallelism: *TEST_PARALLELISM
163163
steps:
164164
- checkout
165165
- *restore_node_modules
166-
- run: yarn test --release-channel=www-modern --ci
166+
- run: yarn test-www --ci
167167

168-
yarn_test_www_variant:
168+
yarn_test-www_variant:
169169
docker: *docker
170170
environment: *environment
171171
parallelism: *TEST_PARALLELISM
172172
steps:
173173
- checkout
174174
- *restore_node_modules
175-
- run: yarn test --release-channel=www-modern --variant --ci
175+
- run: yarn test-www --variant --ci
176176

177-
yarn_test_prod_www:
177+
yarn_test-www_prod:
178178
docker: *docker
179179
environment: *environment
180180
parallelism: *TEST_PARALLELISM
181181
steps:
182182
- checkout
183183
- *restore_node_modules
184-
- run: yarn test --release-channel=www-modern --prod --ci
184+
- run: yarn test-www --prod --ci
185185

186-
yarn_test_prod_www_variant:
186+
yarn_test-www_prod_variant:
187187
docker: *docker
188188
environment: *environment
189189
parallelism: *TEST_PARALLELISM
190190
steps:
191191
- checkout
192192
- *restore_node_modules
193-
- run: yarn test --release-channel=www-modern --prod --variant --ci
193+
- run: yarn test-www --prod --variant --ci
194194

195-
RELEASE_CHANNEL_stable_yarn_test_persistent:
195+
yarn_test-stable_persistent:
196196
docker: *docker
197197
environment: *environment
198198
parallelism: *TEST_PARALLELISM
199199

200200
steps:
201201
- checkout
202202
- *restore_node_modules
203-
- run: yarn test --release-channel=stable --persistent --ci
203+
- run: yarn test-stable --persistent --ci
204204

205-
RELEASE_CHANNEL_stable_yarn_test_prod:
205+
yarn_test-stable_prod:
206206
docker: *docker
207207
environment: *environment
208208
parallelism: *TEST_PARALLELISM
209209

210210
steps:
211211
- checkout
212212
- *restore_node_modules
213-
- run: yarn test --release-channel=stable --prod --ci
213+
- run: yarn test-stable --prod --ci
214214

215215
yarn_test_prod:
216216
docker: *docker
@@ -219,7 +219,7 @@ jobs:
219219
steps:
220220
- checkout
221221
- *restore_node_modules
222-
- run: yarn test --release-channel=experimental --prod --ci
222+
- run: yarn test --prod --ci
223223

224224
RELEASE_CHANNEL_stable_yarn_build:
225225
docker: *docker
@@ -316,7 +316,7 @@ jobs:
316316
root: packages/react-devtools-scheduling-profiler
317317
paths:
318318
- dist
319-
319+
320320
deploy_devtools_scheduling_profiler:
321321
docker: *docker
322322
environment: *environment
@@ -389,15 +389,15 @@ jobs:
389389
command: yarn lint-build
390390
- run: scripts/circleci/check_minified_errors.sh
391391

392-
RELEASE_CHANNEL_stable_yarn_test_build:
392+
yarn_test-stable_build:
393393
docker: *docker
394394
environment: *environment
395395
parallelism: *TEST_PARALLELISM
396396
steps:
397397
- checkout
398398
- attach_workspace: *attach_workspace
399399
- *restore_node_modules
400-
- run: yarn test --release-channel=stable --build --ci
400+
- run: yarn test-stable --build --ci
401401

402402
yarn_test_build:
403403
docker: *docker
@@ -407,7 +407,7 @@ jobs:
407407
- checkout
408408
- attach_workspace: *attach_workspace
409409
- *restore_node_modules
410-
- run: yarn test --release-channel=experimental --build --ci
410+
- run: yarn test --build --ci
411411

412412
yarn_test_build_devtools:
413413
docker: *docker
@@ -447,15 +447,15 @@ jobs:
447447
FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
448448
FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
449449
450-
RELEASE_CHANNEL_stable_yarn_test_build_prod:
450+
yarn_test-stable_build_prod:
451451
docker: *docker
452452
environment: *environment
453453
parallelism: *TEST_PARALLELISM
454454
steps:
455455
- checkout
456456
- attach_workspace: *attach_workspace
457457
- *restore_node_modules
458-
- run: yarn test --release-channel=stable --build --prod --ci
458+
- run: yarn test-stable --build --prod --ci
459459

460460
yarn_test_build_prod:
461461
docker: *docker
@@ -465,7 +465,7 @@ jobs:
465465
- checkout
466466
- attach_workspace: *attach_workspace
467467
- *restore_node_modules
468-
- run: yarn test --release-channel=experimental --build --prod --ci
468+
- run: yarn test --build --prod --ci
469469

470470
workflows:
471471
version: 2
@@ -478,25 +478,25 @@ workflows:
478478
- yarn_flow:
479479
requires:
480480
- setup
481-
- RELEASE_CHANNEL_stable_yarn_test:
481+
- yarn_test-stable:
482482
requires:
483483
- setup
484-
- RELEASE_CHANNEL_stable_yarn_test_prod:
484+
- yarn_test-stable_prod:
485485
requires:
486486
- setup
487-
- RELEASE_CHANNEL_stable_yarn_test_persistent:
487+
- yarn_test-stable_persistent:
488488
requires:
489489
- setup
490-
- RELEASE_CHANNEL_stable_yarn_test_www:
490+
- yarn_test-classic:
491491
requires:
492492
- setup
493-
- RELEASE_CHANNEL_stable_yarn_test_www_variant:
493+
- yarn_test-classic_variant:
494494
requires:
495495
- setup
496-
- RELEASE_CHANNEL_stable_yarn_test_prod_www:
496+
- yarn_test-classic_prod:
497497
requires:
498498
- setup
499-
- RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
499+
- yarn_test-classic_prod_variant:
500500
requires:
501501
- setup
502502
- RELEASE_CHANNEL_stable_yarn_build:
@@ -511,10 +511,10 @@ workflows:
511511
- RELEASE_CHANNEL_stable_yarn_lint_build:
512512
requires:
513513
- RELEASE_CHANNEL_stable_yarn_build
514-
- RELEASE_CHANNEL_stable_yarn_test_build:
514+
- yarn_test-stable_build:
515515
requires:
516516
- RELEASE_CHANNEL_stable_yarn_build
517-
- RELEASE_CHANNEL_stable_yarn_test_build_prod:
517+
- yarn_test-stable_build_prod:
518518
requires:
519519
- RELEASE_CHANNEL_stable_yarn_build
520520
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
@@ -530,16 +530,16 @@ workflows:
530530
- yarn_test_prod:
531531
requires:
532532
- setup
533-
- yarn_test_www:
533+
- yarn_test-www:
534534
requires:
535535
- setup
536-
- yarn_test_www_variant:
536+
- yarn_test-www_variant:
537537
requires:
538538
- setup
539-
- yarn_test_prod_www:
539+
- yarn_test-www_prod:
540540
requires:
541541
- setup
542-
- yarn_test_prod_www_variant:
542+
- yarn_test-www_prod_variant:
543543
requires:
544544
- setup
545545
- yarn_build:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
2. Run `yarn` in the repository root.
99
3. If you've fixed a bug or added code that should be tested, add tests!
1010
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
11-
5. Run `yarn test-prod` to test in the production environment. It supports the same options as `yarn test`.
11+
5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
1212
6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
1313
7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
1414
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,23 @@
110110
"lint-build": "node ./scripts/rollup/validate/index.js",
111111
"extract-errors": "yarn build --type=dev --extract-errors",
112112
"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json && node ./scripts/flow/createFlowConfigs.js && node ./scripts/yarn/downloadReactIsForPrettyFormat.js",
113-
"debug-test": "yarn test --debug",
113+
"debug-test": "yarn test --deprecated 'yarn test --debug'",
114114
"test": "node ./scripts/jest/jest-cli.js",
115-
"test-www": "yarn test --release-channel=www-modern",
116-
"test-www-variant": "yarn test --release-channel=www-modern --variant",
117-
"test-prod-www": "yarn test --prod --release-channel=www-modern",
118-
"test-prod-www-variant": "yarn test --prod --release-channel=www-modern --variant",
119-
"test-persistent": "yarn test --persistent",
120-
"debug-test-persistent": "yarn test --debug --persistent",
121-
"test-prod": "yarn test --prod",
122-
"debug-test-prod": "yarn test --debug --prod",
123-
"test-prod-build": "yarn test --prod --build",
124-
"test-build": "yarn test --build",
125-
"test-build-prod": "yarn test --build --prod",
115+
"test-stable": "node ./scripts/jest/jest-cli.js --release-channel=stable",
116+
"test-www": "node ./scripts/jest/jest-cli.js --release-channel=www-modern",
117+
"test-classic": "node ./scripts/jest/jest-cli.js --release-channel=www-classic",
118+
"test-www-variant": "yarn test --deprecated 'yarn test-www --variant'",
119+
"test-prod-www": "yarn test --deprecated 'yarn test-www --prod'",
120+
"test-prod-www-variant": "yarn test --deprecated 'yarn test-www --prod --variant'",
121+
"test-persistent": "yarn test --deprecated 'yarn test --persistent'",
122+
"debug-test-persistent": "yarn test --deprecated 'yarn test --debug --persistent'",
123+
"test-prod": "yarn test --deprecated 'yarn test --prod'",
124+
"debug-test-prod": "yarn test --deprecated 'yarn test --debug --prod'",
125+
"test-prod-build": "yarn test --deprecated 'yarn test --prod --build'",
126+
"test-build": "yarn test --deprecated 'yarn test --build'",
127+
"test-build-prod": "yarn test --deprecated 'yarn test --build --prod'",
126128
"test-build-devtools": "yarn test --build --project devtools",
127-
"debug-test-build-devtools": "yarn test --debug --build --project devtools",
129+
"debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'",
128130
"test-dom-fixture": "cd fixtures/dom && yarn && yarn prestart && yarn test",
129131
"flow": "node ./scripts/tasks/flow.js",
130132
"flow-ci": "node ./scripts/tasks/flow-ci.js",

scripts/jest/jest-cli.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ const argv = yargs
9393
type: 'boolean',
9494
default: false,
9595
},
96+
deprecated: {
97+
describe: 'Print deprecation message for command.',
98+
requiresArg: true,
99+
type: 'string',
100+
},
96101
}).argv;
97102

98103
function logError(message) {
@@ -287,6 +292,10 @@ function getEnvars() {
287292
}
288293

289294
function main() {
295+
if (argv.deprecated) {
296+
console.log(chalk.red(`\nPlease run: \`${argv.deprecated}\` instead.\n`));
297+
return;
298+
}
290299
validateOptions();
291300
const args = getCommandArgs();
292301
const envars = getEnvars();

0 commit comments

Comments
 (0)