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

[DevTools] Add jest-cli --reactVersion argument #24556

Merged
merged 1 commit into from May 16, 2022

Conversation

lunaruan
Copy link
Contributor

Add --reactVersion argument. This argument is only used in DevTools. When this is specified, run only the tests that have the // @reactVersion pragma that satisfies the semver version range. Otherwise, run tests as normal

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels May 14, 2022
@sizebot
Copy link

sizebot commented May 14, 2022

Comparing: 4c03bb6...21f7fbc

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 131.48 kB 131.48 kB = 42.14 kB 42.14 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.72 kB 136.72 kB = 43.69 kB 43.69 kB
facebook-www/ReactDOM-prod.classic.js = 441.11 kB 441.11 kB = 80.41 kB 80.41 kB
facebook-www/ReactDOM-prod.modern.js = 426.32 kB 426.32 kB = 78.23 kB 78.23 kB
facebook-www/ReactDOMForked-prod.classic.js = 441.11 kB 441.11 kB = 80.41 kB 80.41 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 21f7fbc

@@ -314,6 +329,10 @@ function getEnvars() {
envars.VARIANT = true;
}

if (argv.reactVersion) {
envars.REACT_VERSION = semver.minVersion(argv.reactVersion).version;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if you considered using coerce rather than minVersion?

Copy link
Contributor Author

@lunaruan lunaruan May 16, 2022

Choose a reason for hiding this comment

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

😮 How did I miss that in the docs?! I think it ends up being the same as minVersion but it's more descriptive

@lunaruan lunaruan merged commit c5e039d into facebook:main May 16, 2022
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

4 participants