Socket
Socket
Sign inDemoInstall

graphquire

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphquire - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

10

bin/graphquire.js

@@ -118,4 +118,10 @@ #!/usr/bin/env node

if (error) return console.trace(error)
if (!options.isWriting) return console.log(JSON.stringify(graph, '', ' '))
if (options.isVerbose) console.log(JSON.stringify(graph, '', ' '))
if (!options.isWriting) {
var id, source, modules = graph.modules
for (id in modules) {
if ((source = modules[id].source)) modules[id].source = String(source)
}
return console.log(JSON.stringify(graph, '', ' '))
}
if (options.isVerbose) console.log(graph)
write(graph, function onWrite(error) {

@@ -122,0 +128,0 @@ if (error) return console.trace(error)

4

History.md
# History #
## 0.5.2 / 2011-05-29 ##
- Improving print output
## 0.5.1 / 2011-05-29 ##

@@ -4,0 +8,0 @@

{
"name": "graphquire",
"id": "graphquire",
"version": "0.5.1",
"version": "0.5.2",
"description": "module graph builder.",

@@ -6,0 +6,0 @@ "keywords": [ "dependencies", "graph", "modules", "require", "linker" ],

@@ -27,3 +27,3 @@ # graphquire #

npm install graphquire
npm install graphquire

@@ -39,11 +39,11 @@ ## Usage ##

"devDependencies": {
"graphquire": ">=0.5.0"
}
"devDependencies": {
"graphquire": ">=0.5.0"
}
2. Add install script to your `package.json`:
"scripts": {
"install": "graphquire --clean --write"
}
"scripts": {
"install": "graphquire --clean --write"
}

@@ -65,39 +65,39 @@ ### Browser ###

graphquire test/fixtures/pckg1/package.json
graphquire test/fixtures/pckg1/package.json
{
"name": "pckg1",
"cachePath": "./node_modules",
"location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json",
"modules": {
"pckg1": {
"id": "pckg1",
"path": "./index.js",
"requirements": {
"http!foo.org/a": "http!foo.org/a.js"
{
"name": "pckg1",
"cachePath": "./node_modules",
"location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json",
"modules": {
"pckg1": {
"id": "pckg1",
"path": "./index.js",
"requirements": {
"http!foo.org/a": "http!foo.org/a.js"
}
},
"http!foo.org/a.js": {
"id": "http!foo.org/a.js",
"path": "node_modules/http!foo.org/a.js",
"uri": "http://foo.org/a.js",
"requirements": {
"./nested/b": "http!foo.org/nested/b.js"
}
},
"http!foo.org/nested/b.js": {
"id": "http!foo.org/nested/b.js",
"path": "node_modules/http!foo.org/nested/b.js",
"uri": "http://foo.org/nested/b.js",
"requirements": {
"http!bar.org/c": "http!bar.org/c.js"
}
},
"http!bar.org/c.js": {
"id": "http!bar.org/c.js",
"path": "node_modules/http!bar.org/c.js",
"uri": "http://bar.org/c.js"
}
}
},
"http!foo.org/a.js": {
"id": "http!foo.org/a.js",
"path": "node_modules/http!foo.org/a.js",
"uri": "http://foo.org/a.js",
"requirements": {
"./nested/b": "http!foo.org/nested/b.js"
}
},
"http!foo.org/nested/b.js": {
"id": "http!foo.org/nested/b.js",
"path": "node_modules/http!foo.org/nested/b.js",
"uri": "http://foo.org/nested/b.js",
"requirements": {
"http!bar.org/c": "http!bar.org/c.js"
}
},
"http!bar.org/c.js": {
"id": "http!bar.org/c.js",
"path": "node_modules/http!bar.org/c.js",
"uri": "http://bar.org/c.js"
}
}
}

@@ -107,52 +107,52 @@ 2. You can also analyze graphs on the remote packages (Please note that source

graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json
graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json
{
"name": "pckg2",
"version": "0.0.1",
"description": "test package with remote dependencies",
"cachePath": "./node_modules",
"location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json",
"modules": {
"pckg2": {
"uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",
"id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",
"source": "...."
"requirements": {
"https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js"
{
"name": "pckg2",
"version": "0.0.1",
"description": "test package with remote dependencies",
"cachePath": "./node_modules",
"location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json",
"modules": {
"pckg2": {
"uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",
"id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",
"source": "...."
"requirements": {
"https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js"
}
},
"https!github.com/Gozala/models/raw/master/lib/models.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/models.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/models.js",
"source": "....."
"requirements": {
"./events": "https!github.com/Gozala/models/raw/master/lib/events.js"
}
},
"https!github.com/Gozala/models/raw/master/lib/events.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/events.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/events.js",
"source": "....."
"requirements": {
"./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js"
}
},
"https!github.com/Gozala/models/raw/master/lib/extendables.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js",
"source": "...."
}
}
},
"https!github.com/Gozala/models/raw/master/lib/models.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/models.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/models.js",
"source": "....."
"requirements": {
"./events": "https!github.com/Gozala/models/raw/master/lib/events.js"
}
},
"https!github.com/Gozala/models/raw/master/lib/events.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/events.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/events.js",
"source": "....."
"requirements": {
"./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js"
}
},
"https!github.com/Gozala/models/raw/master/lib/extendables.js": {
"id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",
"path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",
"uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js",
"source": "...."
}
}
}
3. Install missing dependencies to the local filesystem:
graphquire --write path/to/package.json
graphquire --write path/to/package.json
4. No longer used dependencies can be also cleaned up by additional argument:
graphquire --write --clean path/to/package.json
graphquire --write --clean path/to/package.json

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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