Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@pnpm/read-project-manifest
Advanced tools
Read a project manifest (called package.json in most cases)
@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.
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');
The read-pkg package is a utility for reading and parsing package.json files. It offers similar functionality to @pnpm/read-project-manifest but is more focused on simplicity and ease of use. It does not provide as many options for reading different types of manifest files.
The pkg-up package finds the closest package.json file by traversing up from the specified directory. While it does not directly read the manifest file, it helps locate the file, which can then be read using other utilities like read-pkg.
The find-up package is a general utility for finding a file or directory by walking up parent directories. It can be used to locate a package.json file, which can then be read using other packages. It is more versatile but less specialized than @pnpm/read-project-manifest.
FAQs
Read a project manifest (called package.json in most cases)
The npm package @pnpm/read-project-manifest receives a total of 418,838 weekly downloads. As such, @pnpm/read-project-manifest popularity was classified as popular.
We found that @pnpm/read-project-manifest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.