@pnpm/read-package-json
Advanced tools
Comparing version 1.1.1 to 2.0.0
"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 }); | ||
@@ -15,15 +7,13 @@ const path = require("path"); | ||
const readPackageJson = promisify(readPackageJsonCB); | ||
function readPkg(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; | ||
} | ||
}); | ||
async function readPkg(pkgPath) { | ||
try { | ||
return await 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; | ||
} | ||
} | ||
@@ -30,0 +20,0 @@ exports.default = readPkg; |
{ | ||
"name": "@pnpm/read-package-json", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Read a package.json", | ||
@@ -8,3 +8,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8" | ||
}, | ||
@@ -40,3 +40,3 @@ "files": [ | ||
"dependencies": { | ||
"@pnpm/types": "^2.0.0", | ||
"@pnpm/types": "^3.0.0", | ||
"read-package-json": "2.0.13", | ||
@@ -52,3 +52,3 @@ "util.promisify": "^1.0.0" | ||
"tape": "^4.8.0", | ||
"ts-node": "^7.0.0", | ||
"ts-node": "^8.0.1", | ||
"tslint": "^5.8.0", | ||
@@ -55,0 +55,0 @@ "typescript": "^3.0.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5003
26
+ Added@pnpm/types@3.2.0(transitive)
- Removed@pnpm/types@2.0.0(transitive)
Updated@pnpm/types@^3.0.0