/** * Configuration-driven validation for pnpm's `minimumReleaseAgeExclude` list. * * This module intentionally does not read repository files or parse YAML. A repository-specific * adapter can parse its workspace and lockfile once, then pass the resulting values here. Keeping * the policy engine pure makes its public contract safe to share with other repositories and keeps * private package names, scopes, and documentation out of this package. */ import type { ReleaseAgeExemptionGroup, ReleaseAgePolicyConfig, ReleaseAgePolicySnapshot } from './release-age-policy-types.mts'; export type { ReleaseAgeExemptionGroup, ReleaseAgePermanentExemption, ReleaseAgePolicyConfig, ReleaseAgePolicySnapshot, } from './release-age-policy-types.mts'; /** Returns a flat list of temporary selectors, preserving declaration order. */ export declare function flattenReleaseAgeSelectors(groups: ReadonlyArray): string[]; /** * Validates temporary exemption shape without applying repository-specific policy. * * The returned messages are deliberately path-free so a caller can attach its own CI annotation * location. The function reports every independent error rather than throwing on malformed input. */ export declare function validateReleaseAgeExemptionGroups(groups: ReadonlyArray): string[]; /** Extracts an npm package name from a pnpm lockfile package key. */ export declare function packageNameFromPnpmLockKey(key: string): string | null; /** Tests whether a lockfile key represents an exact package@version selector. */ export declare function pnpmLockPackageKeyMatchesSelector(key: string, selector: string): boolean; /** * Validates registry/workspace/graph consistency for a configured release-age policy. * * `activePackageNames` should be the union of dependency names discovered in tracked manifests and * the lockfile. If `lockfilePackageKeys` is supplied, every temporary selector must match a key; * omitting it lets adapters that do not track lockfiles use the shape and registry checks alone. */ export declare function validateReleaseAgePolicy(config: ReleaseAgePolicyConfig, snapshot: ReleaseAgePolicySnapshot): string[];