Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/lockfile-file

Package Overview
Dependencies
Maintainers
2
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/lockfile-file

Read/write pnpm-lock.yaml files

  • 5.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130K
increased by54.28%
Maintainers
2
Weekly downloads
 
Created

What is @pnpm/lockfile-file?

@pnpm/lockfile-file is a utility package for handling lockfiles in the pnpm package manager. It provides functionalities to read, write, and manipulate lockfiles, which are essential for ensuring consistent and reproducible builds in a pnpm-managed project.

What are @pnpm/lockfile-file's main functionalities?

Read Lockfile

This feature allows you to read the wanted lockfile from a specified directory. The `readWantedLockfile` function reads the lockfile and returns its contents, which can be used for further processing or analysis.

const { readWantedLockfile } = require('@pnpm/lockfile-file');
const lockfile = readWantedLockfile('/path/to/project', { ignoreIncompatible: false });
console.log(lockfile);

Write Lockfile

This feature allows you to write a lockfile to a specified directory. The `writeWantedLockfile` function takes the directory path and the lockfile content as arguments and writes the lockfile to the specified location.

const { writeWantedLockfile } = require('@pnpm/lockfile-file');
const lockfile = { /* lockfile content */ };
writeWantedLockfile('/path/to/project', lockfile);
console.log('Lockfile written successfully');

Update Lockfile

This feature allows you to update an existing lockfile with new information. The `updateLockfile` function takes the current lockfile content and the updates as arguments and returns the updated lockfile.

const { updateLockfile } = require('@pnpm/lockfile-file');
const lockfile = { /* existing lockfile content */ };
const updatedLockfile = updateLockfile(lockfile, { /* updates */ });
console.log(updatedLockfile);

Other packages similar to @pnpm/lockfile-file

Keywords

FAQs

Package last updated on 27 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc