/** * Validate Package.json Executor * * Validates that package.json dependencies match project.json build dependencies. * This ensures the two sources of truth don't drift apart. * * Usage: * nx run architecture:validate-packagejson */ import type { ExecutorContext } from '@nx/devkit'; import { TestOnlyDepMode } from '../../lib/package-validator'; export interface ValidatePackageJsonOptions { /** * Strictness for "a test-only package is listed in dependencies" (i.e. it lands in * the `pnpm deploy --prod` closure and ships to production). * 'error' (default) | 'warn' (migration) | 'off'. */ testOnlyDepMode?: TestOnlyDepMode; } export interface ExecutorResult { success: boolean; } export default function runExecutor(options: ValidatePackageJsonOptions, context: ExecutorContext): Promise;