fix(android): require expo/config-plugins re-export from with-release-signing plugin #285

Merged
james merged 1 commit from 284-android-config-plugins-require into main 2026-06-24 16:26:02 +00:00
Owner

Summary

  • apps/client/plugins/with-release-signing.js required @expo/config-plugins directly. That package is a transitive of expo, not a declared dep of @carol/client, so pnpm's strict node_modules layout hides it from apps/client/plugins/.
  • release-android.yml (run #708) now gets past the configuration phase (thanks #279) and hits :expo-constants:createExpoConfig + :app:createBundleReleaseJsAndAssets, both of which spawn node to load this plugin — they fail with Cannot find module '@expo/config-plugins'.
  • Bug has been latent since #187 added the plugin; earlier runs never surfaced it because they died at the foojay/IBM_SEMERU configuration error #279 fixed.
  • Fix: switch to require("expo/config-plugins") — a one-line module.exports = require('@expo/config-plugins') re-export shim that ships inside the expo package. Same module, resolvable from @carol/client. Matches the pattern every official Expo plugin uses (expo-secure-store/plugin/..., etc.).

Test plan

  • node -e "require('./plugins/with-release-signing.js')" from apps/client resolves cleanly with the new require.
  • pnpm -F @carol/client test — all 120 vitest cases still pass.
  • Lefthook gitleaks + conventional-commits pass.
  • release-android.yml reaches signing / asset bundling on the next run.

Closes #284.

🤖 Generated with Claude Code

## Summary - `apps/client/plugins/with-release-signing.js` required `@expo/config-plugins` directly. That package is a transitive of `expo`, not a declared dep of @carol/client, so pnpm's strict node_modules layout hides it from `apps/client/plugins/`. - `release-android.yml` (run [#708](https://forge.wynning.tech/james/carol/actions/runs/708)) now gets past the configuration phase (thanks #279) and hits `:expo-constants:createExpoConfig` + `:app:createBundleReleaseJsAndAssets`, both of which spawn `node` to load this plugin — they fail with `Cannot find module '@expo/config-plugins'`. - Bug has been latent since #187 added the plugin; earlier runs never surfaced it because they died at the foojay/IBM_SEMERU configuration error #279 fixed. - Fix: switch to `require("expo/config-plugins")` — a one-line `module.exports = require('@expo/config-plugins')` re-export shim that ships inside the `expo` package. Same module, resolvable from `@carol/client`. Matches the pattern every official Expo plugin uses (`expo-secure-store/plugin/...`, etc.). ## Test plan - [x] `node -e "require('./plugins/with-release-signing.js')"` from `apps/client` resolves cleanly with the new require. - [x] `pnpm -F @carol/client test` — all 120 vitest cases still pass. - [x] Lefthook gitleaks + conventional-commits pass. - [ ] `release-android.yml` reaches signing / asset bundling on the next run. Closes #284. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(android): require expo/config-plugins re-export instead of undeclared @expo/config-plugins (#284)
Some checks failed
Commits / Conventional Commits (pull_request) Successful in 16s
PR / Static analysis (pull_request) Successful in 1m59s
PR / OpenAPI (pull_request) Successful in 2m54s
PR / pnpm audit (pull_request) Successful in 2m36s
PR / Lint (pull_request) Successful in 3m2s
PR / Typecheck (pull_request) Successful in 3m11s
PR / Build (pull_request) Successful in 3m4s
PR / Client (web export smoke) (pull_request) Successful in 3m3s
PR / Test (postgres) (pull_request) Failing after 3m3s
PR / OSV-Scanner (pull_request) Successful in 1m17s
PR / Trivy (image) (pull_request) Failing after 1m19s
PR / Package age policy (soft) (pull_request) Successful in 30s
PR / Test (sqlite) (pull_request) Successful in 3m33s
Secrets / gitleaks (pull_request) Successful in 54s
PR / Coverage (soft) (pull_request) Successful in 1m28s
c7219542c1
apps/client/plugins/with-release-signing.js required `@expo/config-plugins` directly, but that package is a transitive of `expo` — not a declared dep of @carol/client. pnpm's strict node_modules layout hides unscoped transitives from `apps/client/plugins/`, so the Gradle tasks that spawn `node` to load the plugin (`:expo-constants:createExpoConfig`, `:app:createBundleReleaseJsAndAssets`) blew up with `Cannot find module '@expo/config-plugins'`.

Switch to `require("expo/config-plugins")` — a one-line re-export shim that lives inside the `expo` package. Same module, but resolvable from `@carol/client` since `expo` is a direct dep. Matches the pattern every official Expo plugin uses.

The bug has been latent since #187. Earlier release-android runs never surfaced it because they died earlier at the foojay/IBM_SEMERU configuration-phase failure that #279 fixed.

Verified:
- `node -e "require('./plugins/with-release-signing.js')"` from apps/client resolves the module cleanly.
- All 120 @carol/client vitest tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

📊 Test coverage

Patch coverage: no testable lines changed.

Overall (app/, lib/, db/, excluding UI per ADR-0019):

Metric Value Soft target
Lines 81.6% ≥ 50%
Branches 72.8% ⚠️ ≥ 75%
Functions 91.1% informational

Soft thresholds per ADR-0019. Coverage is informational and does not block merge.

<!-- coverage-comment --> ## 📊 Test coverage **Patch coverage:** no testable lines changed. **Overall** (`app/`, `lib/`, `db/`, excluding UI per ADR-0019): | Metric | Value | Soft target | |---|---|---| | Lines | 81.6% ✅ | ≥ 50% | | Branches | 72.8% ⚠️ | ≥ 75% | | Functions | 91.1% | informational | Soft thresholds per [ADR-0019](docs/adr/0019-coverage-soft-targets.md). Coverage is informational and does not block merge.
james merged commit 0113f9a390 into main 2026-06-24 16:26:02 +00:00
james deleted branch 284-android-config-plugins-require 2026-06-24 16:26:03 +00:00
Sign in to join this conversation.
No description provided.