🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

aperture

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aperture - npm Package Compare versions

Comparing version

to
1.0.0

commands/install.js

24

aperture.js

@@ -80,2 +80,18 @@ #!/usr/bin/env node

commands.isntall =
commands.install = function(root, config, events, done) {
console.log('checking package versions...')
require('./commands/install')(
root
, config
, events.on('info progress', function(p) {
process.stdout.write(((p * 100)|0) + '% \r')
}).on('spawn', function(cwd, cmd, args) {
console.log(chalk.magenta('spawning'), cmd, args, chalk.grey(cwd))
})
, done
)
}
commands.bulk = function(root, config, events, done) {

@@ -122,2 +138,10 @@ config.bail = 'bail' in argv

events.once('info progress', function(p) {
console.log(chalk.magenta('checking registry'))
}).on('info progress', function(p) {
process.stdout.write(chalk.green('progress: '))
process.stdout.write(String((p * 100)|0))
process.stdout.write('% \r')
})
require('./commands/open')(

@@ -124,0 +148,0 @@ root

24

commands/open.js

@@ -1,5 +0,12 @@

var purge = require('./purge')
var bulk = require('./bulk')
var link = require('./link')
// Essentially, a simple wrapper for the
// following:
//
// aperture link &&
// aperture install &&
// aperture purge
var install = require('./install')
var purge = require('./purge')
var link = require('./link')
module.exports = init

@@ -11,12 +18,3 @@

config.bulk = {
command: 'npm'
, args: [
'install'
, '--color=always'
, '--production'
]
}
bulk(root, config, events, function(err) {
install(root, config, events, function(err) {
if (err) return done(err)

@@ -23,0 +21,0 @@

{
"name": "aperture",
"version": "0.5.0",
"version": "1.0.0",
"description": "Local dependencies helper",

@@ -27,3 +27,6 @@ "main": "index.js",

"pluck": "0.0.4",
"chalk": "~0.4.0"
"chalk": "~0.4.0",
"semver": "^2.2.1",
"npm-stats": "^0.3.0",
"map-limit": "0.0.0"
},

@@ -30,0 +33,0 @@ "devDependencies": {

@@ -17,10 +17,12 @@ # aperture #

Commands:
init links, installs and purges your dependencies for fresh projects
link Sets up the local links in the target directory.
list Lists the modules configured to be linked.
bulk Runs a shell command from each linked module.
config Print out the current config being used.
purge Permanently removes any module duplicates which should
be linked in the tree.
open links, installs and purges your dependencies for fresh projects.
link Sets up the local links in the target directory.
list Lists the modules configured to be linked.
bulk Runs a shell command from each linked module.
install Intelligently install your node dependencies for local development.
config Print out the current config being used.
purge Permanently removes any module duplicates which should
be linked in the tree.
Options:

@@ -106,2 +108,19 @@ -b, --bail Exit early on reaching an error during "aperture bulk".

### aperture install ###
In practice, `aperture bulk npm install` works, but can take *a long time*
when projects share a lot of common dependencies. The `install` command is
a little smarter about this, and will install each linked module's dependencies
for you in a way that minimises duplicate packages.
Essentially, aperture will build a list of the dependencies required for each
project and their expected version. For each dependency:
* Check if all of the versions are compatible, and if so install them once
in the root directory, alongside your linked modules.
* Otherwise, install that module as normal.
This can result in significant speedups (and a smaller `node_modules` folder)
for installs when working on larger projects.
### aperture purge ###

@@ -108,0 +127,0 @@

@@ -6,8 +6,9 @@

Commands:
open links, installs and purges your dependencies for fresh projects
link Sets up the local links in the target directory.
list Lists the modules configured to be linked.
bulk Runs a shell command from each linked module.
config Print out the current config being used.
purge Permanently removes any module duplicates which should
be linked in the tree.
open links, installs and purges your dependencies for fresh projects.
link Sets up the local links in the target directory.
list Lists the modules configured to be linked.
bulk Runs a shell command from each linked module.
install Intelligently install your node dependencies for local development.
config Print out the current config being used.
purge Permanently removes any module duplicates which should
be linked in the tree.