npm-fetch-changelog
Version:
fetch the changelog for an npm package from GitHub
22 lines (21 loc) • 844 B
TypeScript
import { type Release } from './parseChangelog';
export declare const getChangelogFromFile: (owner: string, repo: string) => Promise<Record<string, Release>>;
export type IncludeOptionObject = {
range?: string | null;
prerelease?: boolean | null;
minor?: boolean | null;
patch?: boolean | null;
};
export type IncludeOption = ((version: string) => boolean) | IncludeOptionObject;
export declare function includeFilter(include?: IncludeOption | null): (version: string) => boolean;
export declare function describeFilter({ pkg, include, highlight, }: {
pkg?: string;
include?: IncludeOption | null;
highlight?: boolean;
}): string;
export type Options = {
include?: IncludeOption | null;
};
export declare function fetchChangelog(pkg: string, { include }?: Options): Promise<{
[version: string]: Release;
}>;