@file-cache/package-lock
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@file-cache/package-lock

Create cache key that is based on lock file like package-lock.json.

Supported Lock Files

  • package-lock.json
  • yarn.lock
  • pnpm-lock.yaml
  • bun.lockb

Installation

npm install @file-cache/package-lock

Usage

import { createPackageLockKey } from '@file-cache/npm';
const hash = createPackageLockKey(); // "package-lock.json__<hash>" 

API

createPackageLockKey(packageDir): string

Create cache key that is based on lock file like package-lock.json. Search lock file from rootDir.

  • Default packageDir is process.cwd().

Tests

npm test

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @file-cache/package-lock

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

4.24 kB

Total Files

4

Last publish

Collaborators

  • azu