Repository navigation
Conversation
|
@CathyZaks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Enforce building @yieldvault/api-schemas prior to backend build, dev, and typechecking, and document the monorepo build order in contributor and setup guides.
CathyZaks
force-pushed
the
fix/issue-1371-build-api-schemas-before-tsc
branch
from
October 2, 2026 16:31
b2d765d to
1daa7ee
Compare
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
Enforce and document the monorepo build order ensuring
@yieldvault/api-schemasis built before running backend TypeScript compilation (tsc), development, or type-checking.Problem
backend/src/middleware/validate.tsimports@yieldvault/api-schemas, which emits type declarations topackages/api-schemas/dist/index.d.ts. In local development environments after a fresh clone,packages/api-schemashas not been built yet, causingtsc --noEmitand backend builds to fail withCannot find module '@yieldvault/api-schemas'. Furthermore, the backendpackage.jsonhad duplicate and conflictingbuildscript definitions, and documentation lacked instructions on building shared packages before backend startup.Solution
buildscripts inbackend/package.jsonand configureprebuild,predev, andtypecheckscripts to invokebuild:schemas(npm --prefix ../packages/api-schemas run build) before running TypeScript or startingdev.build:schemas, rootbuild,typecheck, and updatedev:backendanddev:frontendin the rootpackage.jsonto ensure schemas are built before running workspace dev servers.CONTRIBUTING.md,docs/LOCAL_DEV_BOOTSTRAP.md,docs/CONTRIBUTOR_ONBOARDING_CHECKLIST.md, andbackend/docs/REQUEST_VALIDATION.md.Changes
build:schemas, rootbuild,typecheck, and ensureddev:backend/dev:frontendtriggerbuild:schemasfirst.buildscript entries, addedbuild:schemas, wiredpredevandprebuildto compile schemas before building/running, and added atypecheckscript.npm run build:schemasafter installing dependencies and clarified the build order dependency.npm run build:schemasto Section 2 and referenced the automatic build enforcement in Section 5.@yieldvault/api-schemasbuild dependency for backend type validation.Testing
npm run build:schemasfrombackendand confirmed successful compilation of@yieldvault/api-schemas.npx vitest run scripts/validate-workspace-test-scripts.test.tsand confirmed all 6 tests pass.Closes #1371