Skip to content

Commit 19edd00

Browse files
chrfalchclaude
andcommitted
fix(ios-prebuild): resolve Flow errors in headers-xcframework-test
mixed is a deprecated utility type (use unknown), and Buffer.from needs the string+encoding overload since JSON.stringify on unknown types as string | void. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2de081b commit 19edd00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native/scripts/ios-prebuild/__tests__/headers-xcframework-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ describe('stubSlicesFromXcframework', () => {
6666
// The plist shape is a pure function of plutil's JSON; mock it so the
6767
// SupportedPlatform/Variant -> key mapping and the unknown-slice guard can be
6868
// tested without a real xcframework or macOS tooling.
69-
const mockPlist = (obj /*: mixed */) =>
69+
const mockPlist = (obj /*: unknown */) =>
7070
jest
7171
.spyOn(childProcess, 'execSync')
72-
.mockReturnValue(Buffer.from(JSON.stringify(obj)));
72+
.mockReturnValue(Buffer.from(JSON.stringify(obj) ?? '', 'utf8'));
7373

7474
afterEach(() => {
7575
jest.restoreAllMocks();

0 commit comments

Comments
 (0)