Fix malformed private field in package.json files#530
Conversation
This commit corrects the type of the 'private' field in several package.json files from string to boolean, ensuring compliance with the npm specification.
Greptile SummaryThis PR fixes a compliance issue where the
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: b68f73e |
| "@types/vscode": "^1.95.0" | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing trailing newline
This file's trailing newline was removed (note the \ No newline at end of file in the diff). The repository's .editorconfig specifies insert_final_newline = true for all files, and other package.json files in the repo (including the also-modified packages/react-devtools-fusebox/package.json) retain their trailing newline. Please restore it.
| } | |
| } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: compiler/packages/react-forgive/client/package.json
Line: 22:22
Comment:
**Missing trailing newline**
This file's trailing newline was removed (note the `\ No newline at end of file` in the diff). The repository's `.editorconfig` specifies `insert_final_newline = true` for all files, and other `package.json` files in the repo (including the also-modified `packages/react-devtools-fusebox/package.json`) retain their trailing newline. Please restore it.
```suggestion
}
```
How can I resolve this? If you propose a fix, please make it concise.| "vscode-languageserver-textdocument": "^1.0.12" | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing trailing newline
Same issue as the client package.json — the trailing newline was removed. The .editorconfig requires insert_final_newline = true. Please restore it.
| } | |
| } |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: compiler/packages/react-forgive/server/package.json
Line: 25:25
Comment:
**Missing trailing newline**
Same issue as the client `package.json` — the trailing newline was removed. The `.editorconfig` requires `insert_final_newline = true`. Please restore it.
```suggestion
}
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Mirror of facebook/react#35802
Original author: Pantkartik
Summary
This PR fixes a compliance issue with the npm package.json specification where the
privatefield was incorrectly typed as a string ("true") instead of a boolean (true).While some tools may handle this leniently, strict package scanners and validation pipelines (such as ScanCode.io) fail when encountering this malformed metadata. According to the npm documentation, the
privatefield must be a boolean.Approach & Changes
I conducted a codebase-wide audit to identify all instances of this pattern, rather than fixing only the reported file.
I updated the
privatefield from"true"totruein the following files:Test Plan
grep -r "\"private\": \"true\"" .) to confirm no other occurrences remain in the repository.Related Issues
Fixes #35793