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 0.0.0 to 1.0.0

lib/index.d.ts

7

package.json
{
"name": "pkgs-graph",
"version": "0.0.0",
"description": "Create a package graph of packages in a folder",
"version": "1.0.0",
"description": "Create a graph from an array of packages",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"scripts": {

@@ -8,0 +11,0 @@ "test": "ts-node test",

# pkgs-graph
>
> Create a graph from an array of packages

@@ -13,4 +13,58 @@ [![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)

## Usage
```js
import createPkgsGraph from 'pkgs-graph'
const graph = createPkgsGraph([
{
manifest: {
name: 'foo',
version: '1.0.0',
dependencies: {
bar: '^1.0.0',
},
},
path: 'zkochan/src/foo',
},
{
manifest: {
name: 'bar',
version: '1.1.0',
},
path: 'zkochan/src/bar',
}
])
console.log(graph)
//> {
// 'foo@1.0.0': {
// dependencies: ['bar@1.1.0'],
// manifest: {
// name: 'foo',
// version: '1.0.0',
// dependencies: {
// bar: '^1.0.0',
// },
// },
// path: 'zkochan/src/foo',
// },
// 'bar@1.1.0': {
// dependencies: [],
// manifest: {
// name: 'bar',
// version: '1.1.0',
// },
// path: 'zkochan/src/bar',
// },
// }
```
## Related
* [find-packages](https://github.com/zkochan/find-packages) - Find all packages inside a directory
* [sort-pkgs](https://github.com/zkochan/sort-pkgs) - Sort packages. Dependents first.
## License
[MIT](LICENSE) © [Zoltan Kochan](http://kochan.io)
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