import * as Schema from "effect/Schema"; import * as Option from "effect/Option"; /** * Minimal version entry shape used for range resolution. * Compatible with the full VersionEntry from the registry module. */ export interface VersionEntryLike { readonly version: Version; } /** * Canonical strict semver pattern from semver.org. * * Equivalent to `semver.valid(value) === value`: rejects leading `v`, * whitespace, partial versions, and leading-zero numeric identifiers. */ export declare const SEMVER_PATTERN: RegExp; /** * Schema for an exact semver version (no ranges). */ export declare const VersionSchema: Schema.brand; /** * Inferred type for an exact semver version. */ export type Version = Schema.Schema.Type; /** * Schema for a semver version range, including exact versions and range expressions. */ export declare const VersionRangeSchema: Schema.brand; /** * Inferred type for a semver version range. */ export type VersionRange = Schema.Schema.Type; /** * Decode a value as an exact semver version. */ export declare const decodeVersionSync: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Version">; /** * Decode a value as a semver version range. */ export declare const decodeVersionRangeSync: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"VersionRange">; /** * Decode a value as a semver version range, or none when it is not one. */ export declare const decodeVersionRangeOption: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Option.Option>; /** * Check whether a string is a valid semver version range. */ export declare const isValidVersionRange: (range: string) => boolean; /** Return one range representing the complete intersection, or undefined when unsatisfiable. */ export declare const intersectVersionConstraints: (constraints: ReadonlyArray) => string | undefined; /** * Check whether moving from `previousVersion` to `currentVersion` includes at * least a minor version bump. */ export declare const hasMinorOrMajorVersionBump: (previousVersion: string, currentVersion: string) => boolean; /** * Whether a version is one the range admits: the one predicate every * selection and every satisfaction check applies, so a range admits the same * versions wherever it is asked. It follows semver exactly, so `*` and an * absent range admit every stable version and no prerelease; a prerelease is * admitted only by a range that names its version tuple. */ export declare const versionSatisfiesRange: (version: Version, range: VersionRange) => boolean; /** * The request a Registry selection or retention judges: the authored * constraint, or `*` when none was authored, so an absent constraint admits * exactly what `*` admits — every stable version and no prerelease. The * authored spelling stays with the caller, for diagnostics only. */ export declare const normalizeVersionRequest: (request: Option.Option) => string; /** Whether a request names one exact version rather than a range. */ export declare const isExactVersionRequest: (request: string) => boolean; /** * Whether a version satisfies a normalized request: an exact request admits * only its own version, build metadata included; a range admits what * {@link versionSatisfiesRange} admits; an invalid request admits nothing. */ export declare const versionSatisfiesRequest: (version: string, request: string) => boolean; /** * Select the highest version the range admits, independent of input order. * An absent range admits what `*` admits; an invalid range admits nothing. */ export declare const resolveVersionInRange: (versions: ReadonlyArray, range: Option.Option) => Option.Option; //# sourceMappingURL=version-constraints.d.ts.map