Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate old test script commands #19893

Merged
merged 7 commits into from Oct 14, 2020

Conversation

rickhanlonii
Copy link
Member

@rickhanlonii rickhanlonii commented Sep 23, 2020

Overview

These aliases have been replaced with the easier to use arguments like --debug and --prod and the aliases have been proxing to the new commands for awhile now.

Deprecating the aliases now to give people a chance to use the new commands directly before removing them later.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Sep 23, 2020
"test-build-devtools": "yarn test --build --project devtools",
"debug-test-build-devtools": "yarn test --debug --build --project devtools",
"debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the end we'll have three base test commands:

  • test
  • test-www
  • test-build-devtools

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we already only have three commands since the aliases proxy to them.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 23, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5229225:

Sandbox Source
React Configuration

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we reference the old commands anywhere in the docs or PR template?

@sizebot
Copy link

sizebot commented Sep 23, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 5229225

@sizebot
Copy link

sizebot commented Sep 23, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 5229225

@rickhanlonii
Copy link
Member Author

@gaearon good thinking, updated the reference in this repo and I'll follow up with the changes to the website here.

@sebmarkbage
Copy link
Collaborator

Please update the CI command names. They should represent the command you have to run to repro the test failure. Although not sure how you’d tell someone to put a double dash.

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh this is a lot less discoverable (if we actually remove them). I always go to package JSON files in projects to find all the commands I might need to run.

Where is a single list of commands I need to run now?

@rickhanlonii
Copy link
Member Author

Note that the only thing that's really changing between the aliases and the new commands is that --debug, --prod, --build and --variant are now options for each command instead of listing a subset of all permutations of the commands.

So instead of test, test-build, test-prod, and test-build-prod it's test [--build] [--prod]. The goal is to makes it easier to do what you want without searching through the aliases to find the right command. If you want to run the prod tests you add --prod, if you want to run the tests against the build, you add --build.

This also means you can easily test missing permutations. For example, we don't have a debug-test-prod-build.

For a list of all supported options, we have the help message:

Screen Shot 2020-09-23 at 12 10 11 PM

Does this help @sebmarkbage?

@rickhanlonii
Copy link
Member Author

Update: I added test-stable and test-www-classic so we now have a test script per release channel:

  • yarn test (experimental)
  • yarn test-stable (stable)
  • yarn test-www (www-modern)
  • yarn test-classic (www-classic)

I've also updated the circle test names to reflect the command that you would run to repro. I think we should give this a try and if we hate it we can re-evaluate.

@rickhanlonii rickhanlonii merged commit 8805873 into facebook:master Oct 14, 2020
@rickhanlonii rickhanlonii deleted the rh-deprecate-test-scripts branch October 14, 2020 12:54
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants