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 2.0.3 to 3.0.0

6

lib/index.d.ts

@@ -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

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