📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

@pnpm/read-project-manifest

Package Overview
Dependencies
Maintainers
0
Versions
97
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)

1000.0.7
Source
npm
Version published
Weekly downloads
593K
-0.43%
Maintainers
0
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

pnpm

FAQs

Package last updated on 06 Mar 2025

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