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

8

lib/index.d.ts

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

/// <reference path="../typings/index.d.ts" />
export declare type Manifest = {

@@ -18,8 +19,9 @@ name: string;

};
export declare type PackageNode = Package & {
export declare type PackageNode<T> = {
package: Package & T;
dependencies: string[];
};
export default function (pkgs: Package[]): {
export default function <T>(pkgs: Array<Package & T>): {
graph: {
[id: string]: PackageNode;
[id: string]: PackageNode<T>;
};

@@ -26,0 +28,0 @@ unmatched: Array<{

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
///<reference path="../typings/index.d.ts"/>
const npa = require("@zkochan/npm-package-arg");
const path = require("path");
const R = require("ramda");
const semver = require("semver");
const R = require("ramda");
const npa = require("@zkochan/npm-package-arg");
function default_1(pkgs) {

@@ -12,4 +14,4 @@ const pkgMap = createPkgMap(pkgs);

acc[pkgSpec] = {
manifest: pkgMap[pkgSpec].manifest,
dependencies: createNode(pkgMap[pkgSpec])
dependencies: createNode(pkgMap[pkgSpec]),
package: pkgMap[pkgSpec],
};

@@ -31,3 +33,3 @@ return acc;

if (spec.type === 'directory') {
const matchedPkg = R.values(pkgMap).find(pkg => pkg.path === spec.fetchSpec);
const matchedPkg = R.values(pkgMap).find(pkg => path.relative(pkg.path, spec.fetchSpec) === '');
if (!matchedPkg) {

@@ -34,0 +36,0 @@ return '';

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

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

"scripts": {
"test": "preview && ts-node test --type-check",
"lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts",
"test": "npm run tsc && pnpm run lint && ts-node test --type-check",
"tsc": "tsc",
"prepublishOnly": "npm run tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zkochan/pkgs-graph.git"
},
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/pkgs-graph",
"author": {

@@ -27,19 +25,22 @@ "name": "Zoltan Kochan",

"engines": {
"node": ">=8"
"node": ">=8.15"
},
"bugs": {
"url": "https://github.com/zkochan/pkgs-graph/issues"
"url": "https://github.com/pnpm/pnpm/issues"
},
"homepage": "https://github.com/zkochan/pkgs-graph#readme",
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/pkgs-graph#readme",
"devDependencies": {
"@pnpm/tslint-config": "0.0.0",
"@types/node": "*",
"@types/ramda": "^0.26.0",
"@types/semver": "^6.0.0",
"@types/tape": "^4.2.29",
"package-preview": "^2.0.0",
"better-path-resolve": "1.0.0",
"pkgs-graph": "link:",
"tape": "^4.6.3",
"ts-node": "^8.0.3",
"tslint": "5.16.0",
"typescript": "^3.0.0"
},
"dependencies": {
"@types/node": "*",
"@types/ramda": "^0.26.0",
"@types/semver": "^5.3.31",
"@zkochan/npm-package-arg": "^1.0.0",

@@ -46,0 +47,0 @@ "ramda": "^0.26.0",

@@ -5,3 +5,3 @@ # pkgs-graph

[![Build Status](https://img.shields.io/travis/zkochan/pkgs-graph/master.svg)](https://travis-ci.org/zkochan/pkgs-graph) [![npm version](https://img.shields.io/npm/v/pkgs-graph.svg)](https://www.npmjs.com/package/pkgs-graph)
[![npm version](https://img.shields.io/npm/v/pkgs-graph.svg)](https://www.npmjs.com/package/pkgs-graph)

@@ -11,3 +11,3 @@ ## Installation

```
npm i -g pkgs-graph
<npm|yarn|pnpm> add pkgs-graph
```

@@ -14,0 +14,0 @@

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