Skip to content

fix: change private field from string to boolean in react-devtools-fusebox package.json#581

Closed
everettbu wants to merge 1 commit intomainfrom
fix/devtools-fusebox-private-field-type
Closed

fix: change private field from string to boolean in react-devtools-fusebox package.json#581
everettbu wants to merge 1 commit intomainfrom
fix/devtools-fusebox-private-field-type

Conversation

@everettbu
Copy link

Mirror of facebook/react#35862
Original author: darshjme-codes


Fixes #35793

Problem

The package.json has a malformed private field using a string value instead of a boolean:

"private": "true"  // ❌ Wrong (string)

This violates the npm package.json specification which requires the private field to be a boolean.

Impact

This causes failures in package scanning and validation tools:

  • ScanCode.io pipeline failures when scanning pkg:github/facebook/react@v19.2.1
  • ❌ Type validation error: '"true" value must be either True or False.'
  • ❌ Non-compliance with npm specification

Related upstream issues:

While downstream tools are adding workarounds, the source data should comply with the npm specification.

Solution

Change the private field to a boolean value:

{
  "name": "react-devtools-fusebox",
  "version": "0.0.0",
- "private": "true",
+ "private": true,
  "license": "MIT",
}

Testing

  • ✅ Package metadata now validates correctly in ScanCode and other scanning tools
  • ✅ Compliant with npm specification
  • ✅ No functional impact (string "true" and boolean true behave identically in npm, but tools rely on correct typing)

Note: Issue reporter (@prashantsingh1819) offered to submit a PR but hasn't yet, so I'm submitting this fix to resolve the scanning failures.

…sebox package.json

Fixes #35793

## Problem
The react-devtools-fusebox package.json has a malformed `private` field
using a string value instead of a boolean:

  "private": "true"  // ❌ Wrong (string)

This violates the npm package.json specification which requires the
`private` field to be a boolean:
https://docs.npmjs.com/cli/v11/configuring-npm/package-json#private

## Impact
This causes failures in package scanning and validation tools:
- ScanCode.io pipeline failures (pkg:github/facebook/react@v19.2.1)
- Type validation errors: '"true" value must be either True or False'
- Non-compliance with npm specification

Related upstream issues:
- aboutcode-org/scancode.io#1986 - Pipeline failure report
- aboutcode-org/scancode-toolkit#4631 - Root cause analysis

## Solution
Change the `private` field to a boolean value:

  "private": true  // ✅ Correct (boolean)

This 1-character fix makes the package.json compliant with the npm
specification and resolves scanning failures in downstream tools.
@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Greptile Summary

Fixes the private field in packages/react-devtools-fusebox/package.json from a string value ("true") to the correct boolean value (true), bringing it into compliance with the npm package.json specification. While npm itself treats both identically, downstream tooling (e.g., ScanCode) enforces strict type validation and fails on the string variant.

  • Minimal, single-line change with no functional impact on npm behavior
  • Note: two other files in the repo have the same issue — compiler/packages/react-forgive/server/package.json and compiler/packages/react-forgive/client/package.json — and could benefit from the same fix in a follow-up

Confidence Score: 5/5

  • This PR is safe to merge — it is a trivial, one-character type correction in a package.json file with zero functional impact.
  • The change is a single-line fix correcting a JSON value type from string to boolean. It has no effect on runtime behavior, build processes, or dependencies. The fix is clearly correct per the npm specification.
  • No files require special attention.

Important Files Changed

Filename Overview
packages/react-devtools-fusebox/package.json Corrects the private field from string "true" to boolean true, complying with the npm package.json specification. No issues found.

Last reviewed commit: ef77a63

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu
Copy link
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 26, 2026
@everettbu everettbu deleted the fix/devtools-fusebox-private-field-type branch February 26, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant