Configure kds-mobile build to generate TypeScript API contract - #531
Merged
Merged
Conversation
EAS Build enables its eager bundle phase when the build metadata reports Expo SDK >= 52, which runs `expo export:embed --eager`. This app is on SDK 51, whose @expo/cli (0.18.31) has no --eager flag, so `nx build kds-mobile` failed with "CommandError: Unknown arguments: --eager". The reported SDK version is derived from whichever `expo` resolves from the app directory, and the app declared `"expo": "*"`, so any install from this manifest could pull a newer SDK than the workspace. Pin `expo` to the workspace range and declare sdkVersion in app.json so the version EAS sees is deterministic. Also generate the api-contract TS during eas-build-post-install, since src/__generated__ is gitignored and therefore never uploaded to EAS, and depend on that codegen from the nx build target for local builds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPSwsKvPMpTwJQ5PD5pWZ2
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ensures the kds-mobile app generates TypeScript API contract types before building, and pins the Expo SDK version to match the configured SDK version.
Changes
api-contract:generate:tsas a dependency of thebuildtarget inproject.json, ensuring codegen runs before the build startseas-build-post-installscript to explicitly runapi-contract:generate:tswithNX_DAEMON=falseto guarantee type generation in the EAS build environmentexpoto~51.0.39inpackage.jsonand added matchingsdkVersion: "51.0.0"toapp.jsonfor consistencyImplementation details
The changes follow the pattern established in the codebase where codegen must run before dependent code compiles (as noted in CLAUDE.md). The EAS script modification ensures the build succeeds in the cloud environment where the NX daemon may not persist across build phases. The Expo version pinning prevents SDK mismatches that could cause runtime issues.
https://claude.ai/code/session_01MPSwsKvPMpTwJQ5PD5pWZ2