Bug: Malformed private field in react-devtools-fusebox package.json
Current Behavior
The package.json file for react-devtools-fusebox uses a string for the private field instead of a boolean:
Location [packages/react-devtools-fusebox/package.json](https://github.com/facebook/react/blob/main/packages/react-devtools-fusebox/package.json)
{
"private": "true", // Should be: "private": true
}
Expected Behavior
According to the [npm package.json specification](https://docs.npmjs.com/cli/v11/configuring-npm/package.json#private), the private field must be a boolean, not a string:
{
"private": true, // Correct
}
Impact
This causes failures in package scanning tools that validate package metadata:
- ScanCode.io pipeline fails when scanning
pkg:github/facebook/react@v19.2.1
- Type validation error:
'"true" value must be either True or False.'
- Non-compliant with npm specification
Related upstream issues:
While downstream tools are adding workarounds, the source data should comply with the npm specification.
Reproduction
# Scan the package with ScanCode
scancode --package packages/react-devtools-fusebox/package.json --json-pp -
# Output shows:
# "is_private": "true", <-- String instead of boolean
Proposed Fix
{
"name": "react-devtools-fusebox",
"version": "0.0.0",
- "private": "true",
+ "private": true,
"license": "MIT",
}
Questions
- Are there other
package.json files in the React monorepo with similar issues?
- Was the string value intentional for any specific reason?
I'm happy to submit a PR to fix this if helpful.
Bug: Malformed
privatefield in react-devtools-fusebox package.jsonCurrent Behavior
The
package.jsonfile forreact-devtools-fuseboxuses a string for theprivatefield instead of a boolean:Location
[packages/react-devtools-fusebox/package.json](https://github.com/facebook/react/blob/main/packages/react-devtools-fusebox/package.json){ "private": "true", // Should be: "private": true }Expected Behavior
According to the [npm package.json specification](https://docs.npmjs.com/cli/v11/configuring-npm/package.json#private), the
privatefield must be a boolean, not a string:{ "private": true, // Correct }Impact
This causes failures in package scanning tools that validate package metadata:
pkg:github/facebook/react@v19.2.1'"true" value must be either True or False.'Related upstream issues:
is_privatereturned as str in place of boolean aboutcode-org/scancode-toolkit#4631) - Root cause analysisWhile downstream tools are adding workarounds, the source data should comply with the npm specification.
Reproduction
Proposed Fix
{ "name": "react-devtools-fusebox", "version": "0.0.0", - "private": "true", + "private": true, "license": "MIT", }Questions
package.jsonfiles in the React monorepo with similar issues?I'm happy to submit a PR to fix this if helpful.