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
3
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/read-project-manifest - npm Package Compare versions

Comparing version 1.0.13 to 1.1.0

6

CHANGELOG.md
# @pnpm/read-project-manifest
## 1.1.0
### Minor Changes
- 2762781cc: safeReadProjectManifestOnly() added.
## 1.0.13

@@ -4,0 +10,0 @@

1

lib/index.d.ts
import { ProjectManifest } from '@pnpm/types';
declare type WriteProjectManifest = (manifest: ProjectManifest, force?: boolean) => Promise<void>;
export declare function safeReadProjectManifestOnly(projectDir: string): Promise<ProjectManifest | null>;
export default function readProjectManifest(projectDir: string): Promise<{

@@ -4,0 +5,0 @@ fileName: string;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.readExactProjectManifest = exports.tryReadProjectManifest = exports.readProjectManifestOnly = void 0;
exports.readExactProjectManifest = exports.tryReadProjectManifest = exports.readProjectManifestOnly = exports.safeReadProjectManifestOnly = void 0;
const util_1 = require("util");

@@ -20,2 +20,14 @@ const error_1 = __importDefault(require("@pnpm/error"));

const stat = util_1.promisify(fs.stat);
async function safeReadProjectManifestOnly(projectDir) {
try {
return await readProjectManifestOnly(projectDir);
}
catch (err) {
if (err.code === 'ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND') {
return null;
}
throw err;
}
}
exports.safeReadProjectManifestOnly = safeReadProjectManifestOnly;
async function readProjectManifest(projectDir) {

@@ -22,0 +34,0 @@ const result = await tryReadProjectManifest(projectDir);

6

package.json
{
"name": "@pnpm/read-project-manifest",
"version": "1.0.13",
"version": "1.1.0",
"description": "Read a project manifest (called package.json in most cases)",

@@ -8,3 +8,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=10.13"
"node": ">=10.14"
},

@@ -52,5 +52,5 @@ "files": [

"@types/parse-json": "^4.0.0",
"tempy": "^0.6.0"
"tempy": "^0.7.0"
},
"funding": "https://opencollective.com/pnpm"
}
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