Détail du package

lockfile-info

ljharb69.5kMIT1.1.0

Info about an npm project - which lockfile version, which lockfile(s) are present, etc.

npm, lockfile, package-lock, shrinkwrap

readme

lockfile-info Version Badge

github actions coverage License Downloads

npm badge

Info about an npm project - which lockfile version, which lockfile(s) are present, etc.

Example

const lockfileInfo = require('lockfile-info');
const assert = require('assert');

lockfileInfo().then((results) => {
    assert.deepEqual(Object.keys(results), [
        'hasPackageJSON',
        'hasNodeModulesDir',
        'hasLockfile',
        'hasPackageLock',
        'hasShrinkwrap',
        'lockfileVersion',
    ]);

    assert.equal(typeof results.hasPackageJSON, 'boolean');
    assert.equal(typeof results.hasNodeModulesDir, 'boolean');
    assert.equal(typeof results.hasLockfile, 'boolean');
    assert.equal(typeof results.hasPackageLock, 'boolean');
    assert.equal(typeof results.hasShrinkwrap, 'boolean');
    assert.equal(typeof results.lockfileVersion, 'number'); // `NaN`, `1`, `2`, or `3`
});

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.1.0 - 2024-12-12

Commits

  • [meta] use npmignore to autogenerate an npmignore file 09955b0
  • [New] add types 0991cf2
  • [actions] split out node 10-20, and 20+ 7a2b99e
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape e7c7137
  • [actions] update rebase action 5fee3b3
  • [Dev Deps] update @ljharb/eslint-config, auto-changelog, npmignore, tape eebe909
  • [Refactor] use call-bound directly 717aa77
  • [meta] clean up changelog 006b387
  • [Tests] replace aud with npm audit 587778a
  • [meta] add funding field aa1ad5b
  • [Deps] update call-bind 85a0a67
  • [Dev Deps] add missing peer dep ee92a44
  • [meta] add sideEffects flag 26a6030

v1.0.0 - 2021-12-03

Commits