/** * @file Lazy-loader for socket-btm's `node:smol-versions`. `node:smol-versions` * is the multi-ecosystem version helper exposed by socket-btm's smol Node * binary. It supports npm/maven/pypi/nuget/ gem version comparison + range * satisfies with internal C++ acceleration on the npm hot path. Returns * `undefined` on stock Node + non-Node runtimes. Result is cached across * calls. * * @internal — used by `src/versions.ts` to resolve smol-aware version * ops. Most callers should use the standard `versions` exports, * which already route through this when smol is present. */ /** * Surface of `node:smol-versions`. See socket-btm's * additions/source-patched/lib/smol-versions.js for the canonical shape. Each * entry takes an optional `ecosystem` (default `'npm'`) — pass it for non-npm * versions; npm callers can omit. */ export interface SmolVersionsBinding { compare(a: string, b: string, ecosystem?: string | undefined): -1 | 0 | 1; eq(a: string, b: string, ecosystem?: string | undefined): boolean; gt(a: string, b: string, ecosystem?: string | undefined): boolean; gte(a: string, b: string, ecosystem?: string | undefined): boolean; inc(version: string, release: 'major' | 'minor' | 'patch' | 'prerelease', ecosystem?: string | undefined, identifier?: string | undefined): string | undefined; lt(a: string, b: string, ecosystem?: string | undefined): boolean; lte(a: string, b: string, ecosystem?: string | undefined): boolean; max(versions: readonly string[], ecosystem?: string | undefined): string | undefined; maxSatisfying(versions: readonly string[], range: string, ecosystem?: string | undefined): string | undefined; min(versions: readonly string[], ecosystem?: string | undefined): string | undefined; minSatisfying(versions: readonly string[], range: string, ecosystem?: string | undefined): string | undefined; neq(a: string, b: string, ecosystem?: string | undefined): boolean; rsort(versions: readonly string[], ecosystem?: string | undefined): string[]; satisfies(version: string, range: string, ecosystem?: string | undefined): boolean; sort(versions: readonly string[], ecosystem?: string | undefined): string[]; valid(version: string, ecosystem?: string | undefined): string | undefined; filter(versions: readonly string[], range: string, ecosystem?: string | undefined): string[]; coerce(version: string, ecosystem?: string | undefined): string | undefined; } /** * Returns `node:smol-versions` when running on the smol Node binary, otherwise * `undefined`. Result is cached across calls. */ export declare function getSmolVersions(): SmolVersionsBinding | undefined;