Socket
Socket
Sign inDemoInstall

@pnpm/read-package-json

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/read-package-json - npm Package Compare versions

Comparing version 1.0.1 to 1.1.1

21

lib/index.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -8,3 +16,14 @@ const path = require("path");

function readPkg(pkgPath) {
return readPackageJson(pkgPath);
return __awaiter(this, void 0, void 0, function* () {
try {
return yield readPackageJson(pkgPath);
}
catch (err) {
if (err['code'])
throw err; // tslint:disable-line
const pnpmError = new Error(`${pkgPath}: ${err.message}`);
pnpmError['code'] = 'ERR_PNPM_BAD_PACKAGE_JSON'; // tslint:disable-line
throw pnpmError;
}
});
}

@@ -11,0 +30,0 @@ exports.default = readPkg;

6

package.json
{
"name": "@pnpm/read-package-json",
"version": "1.0.1",
"version": "1.1.1",
"description": "Read a package.json",

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

"@pnpm/types": "^2.0.0",
"read-package-json": "^2.0.13",
"read-package-json": "2.0.13",
"util.promisify": "^1.0.0"

@@ -49,3 +49,3 @@ },

"mos-plugin-readme": "^1.0.4",
"package-preview": "^1.0.0",
"package-preview": "^2.0.0",
"tape": "^4.8.0",

@@ -52,0 +52,0 @@ "ts-node": "^7.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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