@pnpm/read-package-json
Advanced tools
Comparing version 2.0.3 to 3.0.0
@@ -1,3 +0,3 @@ | ||
import { PackageJson } from '@pnpm/types'; | ||
export default function readPkg(pkgPath: string): Promise<PackageJson>; | ||
export declare function fromDir(pkgPath: string): Promise<PackageJson>; | ||
import { PackageManifest } from '@pnpm/types'; | ||
export default function readPkg(pkgPath: string): Promise<PackageManifest>; | ||
export declare function fromDir(pkgPath: string): Promise<PackageManifest>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path = require("path"); | ||
const readPackageJsonCB = require("read-package-json"); | ||
const readPackageManifestCB = require("read-package-json"); | ||
const util_1 = require("util"); | ||
const readPackageJson = util_1.promisify(readPackageJsonCB); | ||
const readPackageManifest = util_1.promisify(readPackageManifestCB); | ||
async function readPkg(pkgPath) { | ||
try { | ||
return await readPackageJson(pkgPath); | ||
return await readPackageManifest(pkgPath); | ||
} | ||
@@ -11,0 +11,0 @@ catch (err) { |
{ | ||
"name": "@pnpm/read-package-json", | ||
"version": "2.0.3", | ||
"version": "3.0.0", | ||
"description": "Read a package.json", | ||
@@ -8,3 +8,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=8.15" | ||
"node": ">=10" | ||
}, | ||
@@ -37,3 +37,3 @@ "files": [ | ||
"dependencies": { | ||
"@pnpm/types": "^3.0.0", | ||
"@pnpm/types": "^4.0.0", | ||
"read-package-json": "2.1.0" | ||
@@ -40,0 +40,0 @@ }, |
@@ -25,3 +25,3 @@ # @pnpm/read-package-json | ||
### default: `readPackageJson(path): Promise<PackageJson>` | ||
### default: `readPackageJson(path): Promise<PackageManifest>` | ||
@@ -32,3 +32,3 @@ ### Arguments | ||
### `fromDir(path): Promise<PackageJson>` | ||
### `fromDir(path): Promise<PackageManifest>` | ||
@@ -35,0 +35,0 @@ ### Arguments |
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
3892
313248
73
1
0
14
+ Added@pnpm/types@4.0.0(transitive)
- Removed@pnpm/types@3.2.0(transitive)
Updated@pnpm/types@^4.0.0