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

pkgs-graph

Package Overview
Dependencies
Maintainers
1
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 5.1.5 to 5.2.0

CHANGELOG.md

4

lib/index.d.ts

@@ -22,3 +22,5 @@ export declare type Manifest = {

};
export default function <T>(pkgs: Array<Package & T>): {
export default function <T>(pkgs: Array<Package & T>, opts?: {
linkWorkspacePackages?: boolean;
}): {
graph: {

@@ -25,0 +27,0 @@ [id: string]: PackageNode<T>;

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

const R = require("ramda");
function default_1(pkgs) {
function default_1(pkgs, opts) {
const pkgMap = createPkgMap(pkgs);

@@ -26,4 +26,5 @@ const unmatched = [];

let rawSpec = dependencies[depName];
const isWorkspaceSpec = rawSpec.startsWith('workspace:');
try {
if (rawSpec.startsWith('workspace:')) {
if (isWorkspaceSpec) {
rawSpec = rawSpec.substr(10);

@@ -50,2 +51,8 @@ }

.map(pkg => pkg.manifest.version);
// explicitly check if false, backwards-compatibility (can be undefined)
const strictWorkspaceMatching = (opts === null || opts === void 0 ? void 0 : opts.linkWorkspacePackages) === false && !isWorkspaceSpec;
if (strictWorkspaceMatching) {
unmatched.push({ pkgName: depName, range: rawSpec });
return '';
}
if (versions.includes(rawSpec)) {

@@ -52,0 +59,0 @@ const matchedPkg = pkgs.find(pkg => pkg.manifest.name === depName && pkg.manifest.version === rawSpec);

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

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

"devDependencies": {
"@types/ramda": "^0.27.3",
"@types/ramda": "^0.27.6",
"better-path-resolve": "1.0.0",

@@ -38,3 +38,4 @@ "pkgs-graph": "link:"

"ramda": "^0.27.0"
}
},
"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