Summary
Currently, several Makefile targets execute tools or scripts directly via bunx, bun run <path-to-script>, or inline bun -e commands instead of invoking defined package scripts. To ensure deterministic environments, version control, and consistent configuration across local development and CI, all executable tool invocations should be encapsulated in package scripts within their respective workspace package.json files (or root package.json).
Problem Description
- Direct calls to
bunx (e.g., bunx expo-doctor, bunx vitest) bypass explicit npm script definitions and risk version drift or unmanaged configuration.
- Standalone script executions (e.g.,
bun run scripts/pin-deps.ts) and inline evaluation scripts (bun -e) run outside defined package.json targets.
Proposed Changes
- Add explicit npm scripts to workspace/root
package.json files for all external tools and internal helper scripts currently executed directly in the Makefile:
- Mobile app (
apps/mobile/package.json): add scripts for Expo tools (prebuild, expo-doctor).
- API app (
apps/api/package.json): add scripts for vitest, sync-translations, test-mp-polling, and DB seeds.
- Shared/Root (
package.json): add root scripts for repository utility scripts (pin-deps, verify-openspec-archived, migrations).
- Update Makefile targets to route exclusively through
bun run <script-name> or workspace-scoped package scripts (bun --filter <package> run <script-name>).
- Audit and remove any raw
bunx or direct bun run path/file.ts invocations across all Makefile rules.
Acceptance Criteria
Summary
Currently, several Makefile targets execute tools or scripts directly via
bunx,bun run <path-to-script>, or inlinebun -ecommands instead of invoking defined package scripts. To ensure deterministic environments, version control, and consistent configuration across local development and CI, all executable tool invocations should be encapsulated in package scripts within their respective workspacepackage.jsonfiles (or rootpackage.json).Problem Description
bunx(e.g.,bunx expo-doctor,bunx vitest) bypass explicit npm script definitions and risk version drift or unmanaged configuration.bun run scripts/pin-deps.ts) and inline evaluation scripts (bun -e) run outside definedpackage.jsontargets.Proposed Changes
package.jsonfiles for all external tools and internal helper scripts currently executed directly in the Makefile:apps/mobile/package.json): add scripts for Expo tools (prebuild,expo-doctor).apps/api/package.json): add scripts forvitest,sync-translations,test-mp-polling, and DB seeds.package.json): add root scripts for repository utility scripts (pin-deps,verify-openspec-archived,migrations).bun run <script-name>or workspace-scoped package scripts (bun --filter <package> run <script-name>).bunxor directbun run path/file.tsinvocations across all Makefile rules.Acceptance Criteria
package.json.bunxor loose file path executions remain inMakefile.make validatepass cleanly after migration.