Skip to content

Remove $FlowExpectedError[sketchy-null-string] (utils.js) (#59765) - #59765

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
jcperez-ch:export-D128806028
Nov 3, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
jcperez-ch:export-D128806028

Conversation

@jcperez-ch

@jcperez-ch jcperez-ch commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Replace commandResult.stdout || '(empty)' and commandResult.stderr || '(empty)' with explicit null-or-empty checks, and remove their $FlowExpectedError[sketchy-null-string] suppressions.

Both fields are ?string. x || '(empty)' falls back only for undefined, null and ''; x == null || x === '' ? '(empty)' : x falls back for exactly those values and keeps every other string, including whitespace. The header line, stdout and stderr are each read once, in the original order.

Changelog: [Internal]

Differential Revision: D128806028

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Nov 2, 2026
@meta-codesync

meta-codesync Bot commented Nov 2, 2026

Copy link
Copy Markdown

@jcperez-ch has exported this pull request. If you are a Meta employee, you can view the originating Diff in D128806028.

Summary:

Replace `commandResult.stdout || '(empty)'` and `commandResult.stderr || '(empty)'` with explicit null-or-empty checks, and remove their `$FlowExpectedError[sketchy-null-string]` suppressions.

Both fields are `?string`. `x || '(empty)'` falls back only for `undefined`, `null` and `''`; `x == null || x === '' ? '(empty)' : x` falls back for exactly those values and keeps every other string, including whitespace. The header line, `stdout` and `stderr` are each read once, in the original order.

Changelog: [Internal]

Differential Revision: D128806028
@meta-codesync meta-codesync Bot changed the title Remove $FlowExpectedError[sketchy-null-string] (utils.js) Remove $FlowExpectedError[sketchy-null-string] (utils.js) (#59765) Nov 2, 2026

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit 7a3bcf0 into react:main Nov 3, 2026
97 checks passed
@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 3, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @jcperez-ch in 7a3bcf0

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants