Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/SDK/Language/ReactNative.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function getFiles(): array
'destination' => 'src/react-native-shim.d.ts',
'template' => 'react-native/src/react-native-shim.d.ts.twig',
],
[
'scope' => 'default',
'destination' => 'src/expo-file-system-shim.d.ts',
'template' => 'react-native/src/expo-file-system-shim.d.ts.twig',
],
[
'scope' => 'default',
'destination' => 'src/service.ts',
Expand Down
3 changes: 2 additions & 1 deletion templates/react-native/package-lock.json.twig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/react-native/package.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"typescript": "5.9.3"
},
"dependencies": {
"expo-file-system": "18.*.*",
"json-bigint": "1.0.0"
},
"peerDependencies": {
"expo": "*",
"expo-file-system": ">=18.0.0",

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.

P1 Peer range exposes legacy API break

When an Expo SDK 54+ application supplies expo-file-system 19+, the new peer range accepts that implementation while generated services still import legacy filesystem APIs from the package root, causing multipart file uploads to fail at runtime.

Knowledge Base Used: Templates

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/react-native/package.json.twig
Line: 48

Comment:
**Peer range exposes legacy API break**

When an Expo SDK 54+ application supplies `expo-file-system` 19+, the new peer range accepts that implementation while generated services still import legacy filesystem APIs from the package root, causing multipart file uploads to fail at runtime.

**Knowledge Base Used:** [Templates](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-generator/-/docs/templates.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

"react-native": ">=0.76.7 <1.0.0"
},
"overrides": {
Expand Down
22 changes: 22 additions & 0 deletions templates/react-native/src/expo-file-system-shim.d.ts.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
declare module 'expo-file-system' {
export enum EncodingType {
UTF8 = 'utf8',
Base64 = 'base64',
}
export const cacheDirectory: string;
export function readAsStringAsync(
fileUri: string,
options?: {
encoding?: EncodingType;
position?: number;
length?: number;
}
): Promise<string>;
export function writeAsStringAsync(
fileUri: string,
contents: string,
options?: {
encoding?: EncodingType;
}
): Promise<void>;
}