Newlyweds Proposing Marriage

    fast-outdated
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.0 • Public • Published

    Fast-outdated

    version Maintenance MIT dep size Known Vulnerabilities

    Fast and Programmatically npm outdated --json implementation that use pacote to achieve similar result.

    Requirements

    Getting Started

    This package is available in the Node Package Repository and can be easily installed with npm or yarn.

    $ npm i fast-outdated
    # or
    $ yarn add fast-outdated

    Usage example

    const { outdated, clearCache } = require("fast-outdated");
    
    async function main() {
        clearCache();
        const data = await outdated(void 0, { devDependencies: true });
        console.log(JSON.stringify(data, null, 4));
    }
    main().catch(console.error);

    API

    declare namespace Outdated {
        interface Packages {
            [packageName: string]: {
                wanted: string;
                current: string;
                latest: string;
                location: string;
            }
        }
    
        interface Options {
            devDependencies?: boolean;
            token?: string;
        }
    
        export function outdated(cwd?: string, options?: Options): Promise<Packages>;
        export function clearCache(): any;
    }
    
    export as namespace Outdated;
    export = Outdated;

    outdated(cwd?: string, options?: Outdated.Options): Promise< Outdated.Packages >

    Will give you equivalent result that the command npm outdated --json. The default cwd value will be equal to process.cwd().

    Options:

    name default value description
    devDependencies false Include devDependencies
    token undefined npm token for private packages

    clearCache()

    Call pacote.clearMemoized.

    Roadmap

    • Improve test suite

    License

    MIT

    Install

    npm i fast-outdated

    DownloadsWeekly Downloads

    10

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    7.45 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar