-
Notifications
You must be signed in to change notification settings - Fork 50.3k
fix: update root package.json (metadata + scripts fix) #35199
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
fix: update root package.json (metadata + scripts fix) #35199
Conversation
|
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to fix metadata and script issues in the root package.json, but introduces critical problems that break the testing infrastructure and violate monorepo best practices. The changes add name/version/description fields, change private from true to false, modify the test script to use "yarn jest", and add a new "ci" script.
Key Issues:
- Changes the test script from the custom jest-cli.js wrapper to "yarn jest", which creates a circular dependency that breaks testing
- Makes the root package public, contradicting monorepo conventions where only workspace packages should be publishable
- The "ci" script addition is reasonable but depends on the broken test script
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "extract-errors": "node scripts/error-codes/extract-errors.js", | ||
| "postinstall": "node ./scripts/flow/createFlowConfigs.js", | ||
| "test": "node ./scripts/jest/jest-cli.js", | ||
| "test": "yarn jest", |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from "node ./scripts/jest/jest-cli.js" to "yarn jest" breaks the test infrastructure. The repository has a jest configuration at line 123-124 that explicitly prevents direct jest execution by setting testRegex to "/scripts/jest/dont-run-jest-directly.js$", which throws an error stating "Don't run jest directly. Run yarn test instead." This creates a circular dependency where "yarn test" calls "yarn jest", which is blocked by the configuration. All other test commands in the scripts section use "node ./scripts/jest/jest-cli.js" directly with various options, which is the correct approach. The test script should follow the same pattern as test-stable, test-www, etc.
| "test": "yarn jest", | |
| "test": "node ./scripts/jest/jest-cli.js", |
| "private": true, | ||
| "name": "react-fork-sudip", | ||
| "version": "0.0.1", | ||
| "private": false, |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the root package public could cause unintended consequences. This is a monorepo for React development, not a publishable package itself. The root package.json is typically kept private in monorepos to prevent accidental publishing to npm. The individual packages under "packages/*" are the ones meant to be published. Setting "private": false on the root package contradicts standard monorepo practices and could lead to confusion or accidental npm publishing.
| "private": false, | |
| "private": true, |
Summary
This PR fixes several issues in the root package.json of the monorepo.
Fixes
Why?
These changes resolve metadata inconsistencies and script failures,
making the repo installable, testable, and CI-compatible.
This is a safe, non-breaking improvement and ready to merge.