Skip to content

Nothing automated exercises Metro's package-exports resolution #96

Description

@toruiwasa

Found in review of PR #94.

Field Contents
Goal A break in Metro's resolution of @pulseticker/* fails CI, instead of surfacing the next time someone runs expo start by hand.
Context Review of PR #94 (feat/mobile-scaffold). plans/REQ-17_Mobile_App_MVP.md originally carried a standing gate — "Task 7 is not done until the import resolves in Metro" — which PR #94 satisfied with a one-time manual expo start. The Jest smoke test (apps/mobile/app/__tests__/index.test.tsx) does not substitute for it: moduleNameMapper in apps/mobile/jest.config.js rewrites the bare specifier to a file path, so it bypasses the exports map entirely and proves nothing about Metro. The two packages are ESM-only ("type": "module", only import/types conditions, no CJS fallback), which is exactly the shape that resolver changes break. See plans/DEBUG_mobile_scaffold_jest_metro_resolution.md.
Scope Add a CI step that runs a real Metro bundle — expo export --platform ios (or --platform all) — so a resolution failure is a non-zero exit. Open decision: whether this rides in the mobile job added by #11 or is its own job; expo export is slower than jest+lint, so it may warrant a separate job or a path filter. Also correct the overstated comment in index.test.tsx ("a regression in either resolver surfaces here") — it covers jest-resolve only.
Test boundary The bundler itself is the test; no new unit tests. Nothing is mocked.
Done when Editing packages/schemas/package.json exports to break resolution turns CI red without anyone running Expo locally.
Branch infra/ci-metro-export-check
Dependency #11 (Task 8 — turbo.json mobile tasks + GitHub Actions CI). #11 as filed scopes the mobile job to jest + lint only, so this gap is not covered by it.
Risk MEDIUM — no current defect; the exposure is that an exports-map edit or an SDK bump flipping unstable_enablePackageExports breaks the app bundle while the whole suite stays green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infraCI/CD, Supabase config, env varstaskSDLC task unit — one issue per task-breakdown item

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions