installed-check-core
    TypeScript icon, indicating that this package has built-in type declarations

    6.0.2 • Public • Published

    Installed Check Core

    Checks that the installed modules fulfill the requirements of package.json, both when it comes to the version ranges of the modules themselves and when it comes to the version range of their engine requirements.

    npm version npm downloads Module type: ESM Types in JS js-semistandard-style Follow @voxpelli

    Exists as a CLI as well: installed-check

    Usage

    import { installedCheck } from 'installed-check-core';
    
    const { errors } = await installedCheck({ versionCheck: true });
    
    if (result.errors.length) {
      console.error('Dependency errors: \n\n' + result.errors.join('\n') + '\n');
    }

    In CommonJS using available import() expression

    const { installedCheck } = await import('installed-check-core');

    Syntax

    const { errors, warnings, notices } = await installedCheck({
      path: 'path/to/module',
      engineCheck: true,
      engineIgnores: ['foo'],
      engineNoDev: true,
      versionCheck: true,
    });

    Parameters

    1. options – optional object containing additional options for the module

    Returns

    A Promise resolving to:

    {
      notices: ['123'],
      warnings: ['Abc'],
      errors: ['Xyz']
    };

    Options

    • path – defaults to .. Specifies the path to where the target to be checked can be found, with its package.json being there and its node_modules as well.
    • engineCheck – if set installed-check will check that the installed modules comply with the engines requirements of the package.json and suggest an alternative requirement if the installed modules don't comply.
    • engineIgnores – if set then the specified module names won't be included in the engine check. engineIgnores should an array of module names while the CLI flags should be set once for each module name.
    • engineNoDev – if set then dev dependencies won't be included in the engine check.
    • versionCheck – if set installed-check will check that the installed modules comply with the version requirements set for them the package.json.

    Keywords

    none

    Install

    npm i installed-check-core

    DownloadsWeekly Downloads

    7,028

    Version

    6.0.2

    License

    MIT

    Unpacked Size

    15.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • voxpelli