New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/audit

Package Overview
Dependencies
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/audit - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

15

CHANGELOG.md
# @pnpm/audit
## 2.1.0
### Minor Changes
- 05baaa6e7: Add new option: timeout.
### Patch Changes
- Updated dependencies [05baaa6e7]
- Updated dependencies [97c64bae4]
- @pnpm/fetch@3.1.0
- @pnpm/types@7.1.0
- @pnpm/lockfile-utils@3.0.2
- @pnpm/lockfile-walker@4.0.2
## 2.0.1

@@ -4,0 +19,0 @@

1

lib/index.d.ts

@@ -12,2 +12,3 @@ import { RetryTimeoutOptions } from '@pnpm/fetch';

retry?: RetryTimeoutOptions;
timeout?: number;
}): Promise<AuditReport>;

5

lib/index.js

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

async function audit(lockfile, opts) {
const auditTree = (0, lockfileToAuditTree_1.default)(lockfile, { include: opts.include });
const auditTree = lockfileToAuditTree_1.default(lockfile, { include: opts.include });
const registry = opts.registry.endsWith('/') ? opts.registry : `${opts.registry}/`;
const auditUrl = `${registry}-/npm/v1/security/audits`;
const res = await (0, fetch_1.default)(auditUrl, {
const res = await fetch_1.default(auditUrl, {
body: JSON.stringify(auditTree),

@@ -30,2 +30,3 @@ headers: { 'Content-Type': 'application/json' },

retry: opts.retry,
timeout: opts.timeout,
});

@@ -32,0 +33,0 @@ if (res.status !== 200) {

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

function lockfileToAuditTree(lockfile, opts) {
const importerWalkers = (0, lockfile_walker_1.lockfileWalkerGroupImporterSteps)(lockfile, Object.keys(lockfile.importers), { include: opts === null || opts === void 0 ? void 0 : opts.include });
const importerWalkers = lockfile_walker_1.lockfileWalkerGroupImporterSteps(lockfile, Object.keys(lockfile.importers), { include: opts === null || opts === void 0 ? void 0 : opts.include });
const dependencies = {};

@@ -34,3 +34,3 @@ importerWalkers.forEach((importerWalker) => {

for (const { depPath, pkgSnapshot, next } of step.dependencies) {
const { name, version } = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(depPath, pkgSnapshot);
const { name, version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot);
const subdeps = lockfileToAuditNode(next());

@@ -37,0 +37,0 @@ const dep = {

{
"name": "@pnpm/audit",
"version": "2.0.1",
"version": "2.1.0",
"description": "Audit a lockfile",

@@ -14,9 +14,2 @@ "main": "lib/index.js",

},
"scripts": {
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts",
"_test": "jest",
"test": "pnpm run compile && pnpm run _test",
"prepublishOnly": "pnpm run compile",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix"
},
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/audit",

@@ -34,3 +27,3 @@ "keywords": [

"@pnpm/constants": "5.0.0",
"@pnpm/lockfile-file": "4.0.0",
"@pnpm/lockfile-file": "4.0.1",
"nock": "12.0.3"

@@ -40,9 +33,15 @@ },

"@pnpm/error": "2.0.0",
"@pnpm/fetch": "3.0.0",
"@pnpm/fetch": "3.1.0",
"@pnpm/lockfile-types": "3.0.0",
"@pnpm/lockfile-utils": "3.0.1",
"@pnpm/lockfile-walker": "4.0.1",
"@pnpm/types": "7.0.0"
"@pnpm/lockfile-utils": "3.0.2",
"@pnpm/lockfile-walker": "4.0.2",
"@pnpm/types": "7.1.0"
},
"funding": "https://opencollective.com/pnpm"
"funding": "https://opencollective.com/pnpm",
"scripts": {
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts",
"_test": "jest",
"test": "pnpm run compile && pnpm run _test",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix"
}
}
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