Skip to content

Bug: Malformed private field in react-devtools-fusebox package.json #35793

@MohammadBinAftab

Description

@MohammadBinAftab

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

  1. Are there other package.json files in the React monorepo with similar issues?
  2. Was the string value intentional for any specific reason?

I'm happy to submit a PR to fix this if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions