/** * .what = checks if a version string is a linked dependency version * .why = linked versions (link:. or file:.) indicate the repo IS the package, * so they satisfy any minVersion check by definition */ export declare const isLinkedDependencyVersion: (input: { value: unknown; }) => boolean; /** * regex for check.minVersion expressions with optional .ifInstalled() modifier * * matches: * - @declapract{check.minVersion('1.2.3')} * - @declapract{check.minVersion('1.2.3').ifInstalled()} * * .note = exact match version (anchored) for single expression validation */ export declare const CHECK_MIN_VERSION_REGEX: RegExp; /** * regex for check.minVersion expressions (global, unanchored) for bulk replacement * * matches all occurrences in a string, not just exact matches */ export declare const CHECK_MIN_VERSION_REGEX_GLOBAL: RegExp; /** * regex to detect @declapract expressions with unsupported modifiers * * matches expressions that look like check.minVersion but have unknown modifiers * * .note = the negative lookahead includes \} to account for the closing brace */ export declare const CHECK_MIN_VERSION_UNSUPPORTED_MODIFIER_REGEX: RegExp; /** * .what = throws if expression contains unsupported modifier * .why = fail fast when declarations use modifiers this version cannot handle, * rather than silently writing raw expressions to output files */ export declare const assertNoUnsupportedModifiers: (value: string) => void; /** * grabs the `x.y.z` part from strings that match the shape `@declapract{check.minVersion('x.y.z')}` or `@declapract{check.minVersion('x.y.z').ifInstalled()}` * * returns null if no match */ export declare const getMinVersionFromCheckMinVersionExpression: (value: string) => string | null; /** * checks if the expression has the .ifInstalled() modifier * * returns true if .ifInstalled() is present */ export declare const hasIfInstalledModifier: (value: string) => boolean; /** * checks whether the string matches the form "@declapract{check.minVersion('x.y.z')}" (exact match only) */ export declare const isCheckMinVersionExpression: (value: string) => boolean; /** * .what = evaluates a foundValue against a minVersion, to check if it passes it or not * .why = enables validation of package versions against minimum requirements * * .note = uses semver library for correct version comparison instead of regex, * which failed for multi-digit version components (e.g., 1.27.12 vs 1.17.20) */ export declare const checkDoesFoundValuePassesMinVersionCheck: ({ foundValue, minVersion, ifInstalled, }: { foundValue: unknown; minVersion: string; ifInstalled?: boolean; }) => boolean;