import type { InstalledPkg } from "./package.ts"; export declare function splitNpmSource(spec: string): [name: string, version: string]; /** * True when a configured npm: source pins an exact version, e.g. * "npm:@scope/pkg@1.2.3" vs. the floating "npm:@scope/pkg". `pi update` * intentionally leaves pinned sources unchanged (see readInstalledPackages) * but still exits 0 and prints "Updated " either way -- callers * must not treat that text as proof anything changed. */ export declare function isPinnedNpmSource(source: string): boolean; /** The bare npm package name for a configured npm: source, pinned or not. * undefined for git:/https: sources -- there is no npm-registry name to read. */ export declare function npmPackageName(source: string): string | undefined; /** Reads a single npm package's real on-disk resolved version, regardless of * whether its configured source is pinned -- ground truth for detecting * whether an update actually changed anything. undefined for non-npm * sources or when node_modules has no matching package.json to read. */ export declare function readResolvedVersion(piHome: string, source: string): string | undefined; export declare function readResolvedIntegrity(piHome: string, source: string): string | undefined; export declare function readPackageDeclarations(piHome: string): string[]; export declare function readInstalledPackages(piHome: string): InstalledPkg[]; /** * Global scope alone is invisible to a project's own .pi/settings.json pin -- * confirmed live: a project pinned a stale major version of a since-split * package, and nothing in packed's own drift detection ever saw it. Merges * global and (when given) project-scoped declarations, tagging each so a * name pinned differently in each scope is reported twice, not silently * deduped into one. */ export declare function readInstalledPackagesAcrossScopes(piHome: string, projectRoot?: string): InstalledPkg[]; export declare function defaultPiHome(): string; //# sourceMappingURL=installed.d.ts.map