#!/usr/bin/env sh
# Lint commit messages
npm run lint:commits

# Lint code
npm run lint

# TypeScript type checking
npm run type-check

# Check formatting
npm run format:check

# Prepare CLI fixtures
npm install --ignore-scripts --no-audit --no-fund --prefix test/fixtures
npm install --ignore-scripts --no-audit --no-fund --prefix test/fixtures-up-to-date

# Run tests with coverage
npm test

# Check lockfile drift
npm run check:lockfile

# Detect duplicate code
npm run check:duplication

# Run CLI integration tests
npm run test:cli

# Run E2E CLI test
npm run test:cli -- test/cli.e2e.real-fixture.test.js

# Check for stale dependencies (excluded packages configured in .dry-aged-deps.json)
npm run check:deps
npm run audit:ci