Description
getExpoEasProjectOwner, getExpoEasProjectId, and
getExpoEasProjectName each read app.json synchronously.
Each method also reads and parses the file twice when the requested value
exists. These methods are called consecutively when opening an EAS project,
resulting in unnecessary synchronous file I/O and repeated JSON parsing.
Proposed changes
- Add a shared helper for reading and parsing
app.json
- Define the expected Expo/EAS configuration structure
- Use optional chaining when accessing nested configuration properties
- Replace synchronous file reads with the existing asynchronous
FileSystem API
- Cache the parsed configuration based on the file modification time
- Refresh the cache when
app.json changes
Expected result
Expo EAS project metadata is read safely without repeated synchronous I/O,
while changes to app.json are still detected.
Description
getExpoEasProjectOwner,getExpoEasProjectId, andgetExpoEasProjectNameeach readapp.jsonsynchronously.Each method also reads and parses the file twice when the requested value
exists. These methods are called consecutively when opening an EAS project,
resulting in unnecessary synchronous file I/O and repeated JSON parsing.
Proposed changes
app.jsonFileSystemAPIapp.jsonchangesExpected result
Expo EAS project metadata is read safely without repeated synchronous I/O,
while changes to
app.jsonare still detected.