Repository navigation
ci: check Expo versions against the installed SDK - #31
Closed
tristanheilman wants to merge 1 commit into
Closed
tristanheilman wants to merge 1 commit into
tristanheilman wants to merge 1 commit into
Conversation
expo-doctor's version check compares against Expo's live patch list, so the required Quality check fails on unchanged commits whenever Expo ships an SDK patch (#14, #22 and #28 each realigned versions to clear it). Run it with EXPO_OFFLINE so it validates against the installed SDK, and report live drift in a separate, non-required workflow.
12 of 13 tasks
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.
What does this PR do?
Stops a new Expo patch release from failing the required
Qualitycheck on commits that didn't change, and reports patch drift separately.Check Expo project healthstep now runsnpm run doctorwithEXPO_OFFLINE=1, so doctor compares installed packages against the installed SDK's own version map instead of Expo's live list.Expo SDK driftworkflow runs the livenpx expo install --checkon PRs that changepackage.jsonorpackage-lock.json, and on demand. It isn't meant to be a required check.No dependencies, Dependabot settings or app code change.
Locally, plain
npx expo-doctorstill runs the live check, so it will fail whenever Expo has shipped a patch the lockfile doesn't have yet. That's expected and doesn't mean a change is broken. I'd recommend a follow-up policy PR that points CONTRIBUTING.md and the PR template atEXPO_OFFLINE=1 npx expo-doctor, the same checkQualityruns, and says a drift failure from the plain command is fine.Why was this required?
npm run doctor, the commandQualityruns, fails onmain(9b5de01) today with no change to the repo. It passes 20/21 and fails "Check that packages match versions required by installed Expo SDK": Expo published SDK 57 patches on Oct 6, andexpo,expo-constants,expo-linking,expo-routerandexpo-sqliteare now behind. Open PRs inherit the failure.The version check prefers Expo's live versions API over the installed
expopackage's map, so its result changes whenever Expo ships a patch. Expo has shipped SDK 57 patches roughly weekly (Sep 11, 18, 24, 29 and Oct 6). #14 and #22 realigned the versions by hand, #28 is the third attempt, and Dependabot's #30 is already behind again.With
EXPO_OFFLINE=1the check still catches a real mismatch: installingexpo-linking@56makes it fail with "Major version mismatches". It just stops failing on patches published after the commit. Expo prints "Dependency validation is unreliable in offline-mode" because it skips those live overrides; the drift workflow covers that. Cap runs both its doctor andexpo install --checksteps offline the same way. I considered doctor'sEXPO_DOCTOR_SKIP_DEPENDENCY_VERSION_CHECK, but it drops the version check fromQualityentirely.Expo SDK driftshould stay out of theProtect mainruleset. It's path-filtered, and GitHub leaves a required check from a skipped workflow pending, which would block every other PR.Automated tests
No tests apply: this changes CI configuration only. Run locally on macOS with Node 24.21:
npm run doctorasQualityran it before: 20/21, fails the version check.EXPO_OFFLINE=1 npm run doctorasQualitynow runs it: 21/21. Thenpx expo-doctorbox below refers to this; plainnpx expo-doctorreports the drift until the Expo patches are bumped.npx expo install --check, the drift step: exits 1 on this branch, 0 afternpx expo install --fix.npm run lint,npm run format:checkandnpm run typecheck: pass.npm run test:ci: 18 suites, 262 tests pass.npm run bundle:check: iOS, Android and web exports pass.Expo SDK driftwill fail on this PR, since the PR changes that workflow andmainis behind. That's the check doing its job.Manual (human) testing
I ran
npm run doctoron this branch with and withoutEXPO_OFFLINE=1and got the 20/21 failure and the 21/21 pass above. No app code changed; the app from this branch loads and runs in Expo Go on an iPhone 16 Pro Max (iOS 26.6.2).Server/API contract impact
None.
AI assistance
Claude Code helped investigate the failure (reading the expo-doctor and Expo CLI source, and comparing how other Expo projects run the check), drafted both workflow changes and this description, and ran the validation listed above. I reviewed every changed line, re-ran the doctor checks myself, and can explain and defend the change.
Checklist
npm cisucceedsnpx expo-doctorpassesnpx tsc --noEmitpassesnpm test -- --ci --runInBandpassesnpx expo export --platform allsucceeds when application code changed