-
Notifications
You must be signed in to change notification settings - Fork 50.6k
Open
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
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:
{
"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:
- [aboutcode-org/scancode.io#1986](BUG: Pipeline failure when scanning pkg:github/facebook/react@v19.2.1 aboutcode-org/scancode.io#1986) - Pipeline failure report
- [aboutcode-org/scancode-toolkit#4631](
is_privatereturned as str in place of boolean aboutcode-org/scancode-toolkit#4631) - Root cause analysis - [aboutcode-org/scancode-toolkit#4635](Handle string is private aboutcode-org/scancode-toolkit#4635) - Defensive fix to handle malformed data
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 booleanProposed Fix
{
"name": "react-devtools-fusebox",
"version": "0.0.0",
- "private": "true",
+ "private": true,
"license": "MIT",
}Questions
- Are there other
package.jsonfiles 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug