Skip to content

[Feature] Avoid repeated synchronous app.json reads in ExponentHelper #2875

Description

@EmmaYuan1015

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions