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

pkgs-graph

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pkgs-graph - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

18

lib/index.js

@@ -7,12 +7,12 @@ "use strict";

const path_1 = __importDefault(require("path"));
const npm_package_arg_1 = __importDefault(require("@pnpm/npm-package-arg"));
const resolve_workspace_range_1 = __importDefault(require("@pnpm/resolve-workspace-range"));
const npm_package_arg_1 = __importDefault(require("@zkochan/npm-package-arg"));
function default_1(pkgs, opts) {
const pkgMap = createPkgMap(pkgs);
const unmatched = [];
const graph = Object.keys(pkgMap)
.reduce((acc, pkgSpec) => {
const graph = Object.entries(pkgMap)
.reduce((acc, [pkgSpec, pkg]) => {
acc[pkgSpec] = {
dependencies: createNode(pkgMap[pkgSpec]),
package: pkgMap[pkgSpec],
dependencies: createNode(pkg),
package: pkg,
};

@@ -28,14 +28,12 @@ return acc;

};
return Object.keys(dependencies)
.map(depName => {
return Object.entries(dependencies)
.map(([depName, rawSpec]) => {
let spec;
let rawSpec = dependencies[depName];
const isWorkspaceSpec = rawSpec.startsWith('workspace:');
try {
if (isWorkspaceSpec) {
rawSpec = rawSpec.substr(10);
rawSpec = rawSpec.slice(10);
if (rawSpec === '^' || rawSpec === '~') {
rawSpec = '*';
}
;
}

@@ -42,0 +40,0 @@ spec = npm_package_arg_1.default.resolve(depName, rawSpec, pkg.dir);

{
"name": "pkgs-graph",
"version": "7.0.0",
"version": "7.0.1",
"description": "Create a graph from an array of packages",

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

"engines": {
"node": ">=14.19"
"node": ">=14.6"
},

@@ -22,10 +22,10 @@ "bugs": {

"devDependencies": {
"@types/ramda": "0.27.39",
"@types/ramda": "0.28.14",
"better-path-resolve": "1.0.0",
"pkgs-graph": "7.0.0"
"pkgs-graph": "7.0.1"
},
"dependencies": {
"@pnpm/npm-package-arg": "^1.0.0",
"@pnpm/resolve-workspace-range": "3.0.0",
"@zkochan/npm-package-arg": "^2.0.1",
"ramda": "^0.27.1"
"ramda": "^0.28.0"
},

@@ -32,0 +32,0 @@ "funding": "https://opencollective.com/pnpm",

Sorry, the diff of this file is not supported yet

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