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

@pnpm/read-project-manifest

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/read-project-manifest

Read a project manifest (called package.json in most cases)

  • 2.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
411K
decreased by-20.9%
Maintainers
2
Weekly downloads
 
Created

What is @pnpm/read-project-manifest?

@pnpm/read-project-manifest is a utility package that allows you to read and parse the manifest files (like package.json) of a project. This can be useful for various tasks such as dependency management, project configuration analysis, and more.

What are @pnpm/read-project-manifest's main functionalities?

Read package.json

This feature allows you to read the package.json file of the current project directory. The function returns the parsed manifest object and the file name.

const { readProjectManifest } = require('@pnpm/read-project-manifest');

async function readManifest() {
  const { manifest, fileName } = await readProjectManifest(process.cwd());
  console.log(manifest);
  console.log(`Manifest file read from: ${fileName}`);
}

readManifest();

Read specific manifest file

This feature allows you to read a specific manifest file by providing its path. The function returns the parsed manifest object.

const { readProjectManifestOnly } = require('@pnpm/read-project-manifest');

async function readSpecificManifest(filePath) {
  const manifest = await readProjectManifestOnly(filePath);
  console.log(manifest);
}

readSpecificManifest('./path/to/package.json');

Other packages similar to @pnpm/read-project-manifest

Keywords

FAQs

Package last updated on 22 Feb 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