@juit/check-updates
Version:
Small and fast utility to update package dependencies
51 lines (50 loc) • 1.72 kB
TypeScript
import type { ReleaseType } from 'semver';
import type { VersionsCache } from './versions';
export type UpdaterOptions = {
bump: ReleaseType | undefined;
debug: boolean;
quick: boolean;
strict: boolean;
workspaces: boolean;
};
declare class Workspaces {
private _versions;
private _emitter;
get length(): number;
onUpdate(handler: (name: string, version: string) => void): void;
register(name: string, version?: string): void;
update(name: string, version: string): void;
has(name: string): boolean;
[Symbol.iterator](): Generator<[name: string, version: string]>;
}
export declare class Updater {
private readonly _packageFile;
private readonly _options;
private readonly _cache;
private readonly _workspaces;
private _packageData?;
private _npmRc?;
private _originalVersion?;
private _debug;
private _children;
private _changed;
constructor(_packageFile: string, _options: UpdaterOptions, _cache: VersionsCache, _workspaces?: Workspaces);
get name(): string | undefined;
get version(): string;
set version(version: string);
get packageFile(): string;
get changed(): boolean;
init(): Promise<this>;
private get _details();
private _bump;
/** Update a single dependency, returning the highest matching version */
private _updateDependency;
/** Update a dependencies group, populating the "updated" version field */
private _updateDependenciesGroup;
/** Update dependencies and return the version number of this package */
update(): Promise<void>;
align(version?: string): void;
/** Write out the new package file */
write(): Promise<void>;
}
export {};