Files
youtube-studio-flow/documentation/YouTube Studio Flow/05 - Development/06 - Verifying Changes.md
T

2.0 KiB

Verifying Changes

Commands to check your work after making changes. Run these before considering a task done.


Backend

Run from the backend/ directory.

Type check + compile

npm run build

nest build compiles all TypeScript and surfaces type errors. This is the primary way to verify backend changes are type-correct. Fix all errors before finishing.

Lint

npm run lint

Runs ESLint with auto-fix on src/**/*.ts. Run after making changes to catch style violations. If auto-fix changes files, review the diff.

Tests

npm run test

Runs the Jest test suite. Run when modifying shared services, the render engine, or any logic that has existing tests.


Frontend

Run from the frontend/ directory.

Type check + build

npm run build

next build compiles TypeScript and runs the full Next.js production build. It catches type errors, missing imports, and invalid JSX. The most thorough check available for the frontend.

Lint

npm run lint

Runs next lint (ESLint). Run after making changes to catch import order violations, unused variables, and React-specific issues.


After schema changes

After any modification to backend/prisma/schema.prisma:

# Stop the backend and worker first, then:
npx prisma generate          # regenerate the Prisma client
npx prisma migrate deploy    # apply pending migrations
# Restart both backend processes

If you used migrate dev locally to create a migration file, commit the generated file in backend/prisma/migrations/.


Checklist

Change type Commands to run
Backend logic change npm run buildnpm run lint
Render engine / shared service npm run buildnpm run test
Prisma schema change npx prisma generatenpx prisma migrate deploynpm run build
Frontend component change npm run buildnpm run lint
Both frontend and backend Run both sets above