Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/lockfile-utils

Package Overview
Dependencies
Maintainers
3
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/lockfile-utils - npm Package Compare versions

Comparing version 2.0.16 to 2.0.17

11

CHANGELOG.md
# @pnpm/lockfile-utils
## 2.0.17
### Patch Changes
- Updated dependencies [d54043ee4]
- Updated dependencies [d54043ee4]
- @pnpm/lockfile-types@2.1.0
- @pnpm/types@6.3.0
- dependency-path@5.0.4
- @pnpm/resolver-base@7.0.4
## 2.0.16

@@ -4,0 +15,0 @@

4

lib/index.d.ts

@@ -1,2 +0,2 @@

export * from '@pnpm/lockfile-types';
import { refToRelative } from 'dependency-path';
import nameVerFromPkgSnapshot from './nameVerFromPkgSnapshot';

@@ -7,4 +7,4 @@ import packageIdFromSnapshot from './packageIdFromSnapshot';

import satisfiesPackageManifest from './satisfiesPackageManifest';
export * from '@pnpm/lockfile-types';
export { nameVerFromPkgSnapshot, packageIdFromSnapshot, packageIsIndependent, pkgSnapshotToResolution, satisfiesPackageManifest, };
import { refToRelative } from 'dependency-path';
export declare const getPkgShortId: typeof refToRelative;

@@ -10,20 +10,23 @@ "use strict";

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPkgShortId = exports.satisfiesPackageManifest = exports.pkgSnapshotToResolution = exports.packageIsIndependent = exports.packageIdFromSnapshot = exports.nameVerFromPkgSnapshot = void 0;
__exportStar(require("@pnpm/lockfile-types"), exports);
const nameVerFromPkgSnapshot_1 = require("./nameVerFromPkgSnapshot");
const dependency_path_1 = require("dependency-path");
const nameVerFromPkgSnapshot_1 = __importDefault(require("./nameVerFromPkgSnapshot"));
exports.nameVerFromPkgSnapshot = nameVerFromPkgSnapshot_1.default;
const packageIdFromSnapshot_1 = require("./packageIdFromSnapshot");
const packageIdFromSnapshot_1 = __importDefault(require("./packageIdFromSnapshot"));
exports.packageIdFromSnapshot = packageIdFromSnapshot_1.default;
const packageIsIndependent_1 = require("./packageIsIndependent");
const packageIsIndependent_1 = __importDefault(require("./packageIsIndependent"));
exports.packageIsIndependent = packageIsIndependent_1.default;
const pkgSnapshotToResolution_1 = require("./pkgSnapshotToResolution");
const pkgSnapshotToResolution_1 = __importDefault(require("./pkgSnapshotToResolution"));
exports.pkgSnapshotToResolution = pkgSnapshotToResolution_1.default;
const satisfiesPackageManifest_1 = require("./satisfiesPackageManifest");
const satisfiesPackageManifest_1 = __importDefault(require("./satisfiesPackageManifest"));
exports.satisfiesPackageManifest = satisfiesPackageManifest_1.default;
__exportStar(require("@pnpm/lockfile-types"), exports);
// for backward compatibility
const dependency_path_1 = require("dependency-path");
exports.getPkgShortId = dependency_path_1.refToRelative;
//# sourceMappingURL=index.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const dp = require("dependency-path");
const dp = __importStar(require("dependency-path"));
exports.default = (depPath, pkgSnapshot) => {

@@ -5,0 +24,0 @@ if (!pkgSnapshot.name) {

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const dp = require("dependency-path");
const dp = __importStar(require("dependency-path"));
exports.default = (depPath, pkgSnapshot, registries) => {
var _a;
if (pkgSnapshot.id)
return pkgSnapshot.id;
return dp.tryGetPackageId(registries, depPath) || depPath;
return (_a = dp.tryGetPackageId(registries, depPath)) !== null && _a !== void 0 ? _a : depPath;
};
//# sourceMappingURL=packageIdFromSnapshot.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const dp = require("dependency-path");
const get_npm_tarball_url_1 = require("get-npm-tarball-url");
const dp = __importStar(require("dependency-path"));
const get_npm_tarball_url_1 = __importDefault(require("get-npm-tarball-url"));
const nameVerFromPkgSnapshot_1 = __importDefault(require("./nameVerFromPkgSnapshot"));
const url = require("url");
const nameVerFromPkgSnapshot_1 = require("./nameVerFromPkgSnapshot");
exports.default = (depPath, pkgSnapshot, registries) => {
var _a;
// tslint:disable:no-string-literal
/* eslint-disable @typescript-eslint/dot-notation */
if (pkgSnapshot.resolution['type'] || ((_a = pkgSnapshot.resolution['tarball']) === null || _a === void 0 ? void 0 : _a.startsWith('file:'))) {

@@ -14,5 +36,5 @@ return pkgSnapshot.resolution;

const { name } = nameVerFromPkgSnapshot_1.default(depPath, pkgSnapshot);
const registry = pkgSnapshot.resolution['registry']
|| (name[0] === '@' && registries[name.split('/')[0]])
|| registries.default;
const registry = pkgSnapshot.resolution['registry'] ||
(name[0] === '@' && registries[name.split('/')[0]]) ||
registries.default;
let tarball;

@@ -37,4 +59,4 @@ if (!pkgSnapshot.resolution['tarball']) {

}
// tslint:enable:no-string-literal
/* eslint-enable @typescript-eslint/dot-notation */
};
//# sourceMappingURL=pkgSnapshotToResolution.js.map

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

exports.default = (lockfile, pkg, importerId) => {
var _a, _b;
const importer = lockfile.importers[importerId];

@@ -14,4 +15,4 @@ if (!importer)

for (const depField of types_1.DEPENDENCIES_FIELDS) {
const importerDeps = importer[depField] || {};
const pkgDeps = pkg[depField] || {};
const importerDeps = (_a = importer[depField]) !== null && _a !== void 0 ? _a : {};
const pkgDeps = (_b = pkg[depField]) !== null && _b !== void 0 ? _b : {};
let pkgDepNames;

@@ -18,0 +19,0 @@ switch (depField) {

{
"name": "@pnpm/lockfile-utils",
"version": "2.0.16",
"version": "2.0.17",
"description": "Utils for dealing with pnpm-lock.yaml",

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

"engines": {
"node": ">=10.13"
"node": ">=10.16"
},

@@ -16,4 +16,4 @@ "files": [

"scripts": {
"lint": "tslint -c ../../tslint.json src/**/*.ts test/**/*.ts",
"_test": "cd ../.. && c8 --reporter lcov --reports-dir packages/lockfile-utils/coverage ts-node packages/lockfile-utils/test --type-check",
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts",
"_test": "jest",
"test": "pnpm run compile && pnpm run _test",

@@ -38,4 +38,4 @@ "prepublishOnly": "pnpm run compile",

"@types/js-yaml": "^3.12.5",
"@types/ramda": "^0.27.11",
"tempy": "^0.6.0",
"@types/ramda": "^0.27.28",
"tempy": "^1.0.0",
"write-yaml-file": "^4.1.0",

@@ -45,10 +45,10 @@ "yaml-tag": "1.1.0"

"dependencies": {
"@pnpm/lockfile-types": "2.0.1",
"@pnpm/resolver-base": "7.0.3",
"@pnpm/types": "6.2.0",
"dependency-path": "5.0.3",
"@pnpm/lockfile-types": "2.1.0",
"@pnpm/resolver-base": "7.0.4",
"@pnpm/types": "6.3.0",
"dependency-path": "5.0.4",
"get-npm-tarball-url": "^2.0.1",
"ramda": "^0.27.0"
"ramda": "^0.27.1"
},
"funding": "https://opencollective.com/pnpm"
}
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