You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@pnpm/read-project-manifest

Package Overview
Dependencies
12
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

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)


Version published
Maintainers
2
Created

Package description

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

Readme

Source

@pnpm/read-project-manifest

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

npm version

Installation

pnpm add @pnpm/read-project-manifest

Usage

import readProjectManifest from '@pnpm/read-project-manifest'

const { manifest, fileName } = await readProjectManifest(process.cwd())

License

MIT

Keywords

FAQs

Package last updated on 03 Oct 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc