pkgs-graph
Advanced tools
Comparing version 0.0.0 to 1.0.0
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
70
9163
6
87
1