New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bob

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bob - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

.gitignore

8

CHANGELOG.md

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

### 0.3.4 (SNAPSHOT)
### 0.4.0 (SNAPSHOT)
* Re-add scripts.test override
* Add .bob.json configuration file support
* Rename deploy-unpack to ssh-unpack, deploy-restart to ssh-restart
* Add shh-mkdir target to create remote directory to deploy to
### 0.3.4
* Fix package.json and node_modules symlink in build/stage for coverage target

@@ -3,0 +9,0 @@

@@ -105,4 +105,10 @@ {

}
},
"test": {
"override": {
"prop": "scripts.test",
"target": "test-npm"
}
}
}
}

20

lib/bob.js
var _ = require('underscore'),
fs = require('fs'),
Config = require('./config').Config,
Make = require('./make').Make,
p = require('path'),
PackageJson = require('./packagejson').PackageJson,
util = require('./util'),
valentine = require('valentine');
util = require('./util');

@@ -13,4 +12,3 @@ // Bob takes care of executing Make with specified params and targets

var makeJson = JSON.parse(fs.readFileSync(p.join(opts.bobDir, 'conf/make.json'))),
packageJson = new PackageJson('package.json'),
pkg = packageJson.read();
config = new Config(opts).read();

@@ -21,8 +19,6 @@ // prepare parameters

// keys: Makefile params in underscore-separated uppercase format
// config: configuration values in package.json and mode file
var keys = makeJson.params,
config = valentine.extend(pkg, JSON.parse(fs.readFileSync(p.join(opts.bobDir, 'conf/mode/' + opts.mode + '.json')))),
params = [];
// each key FOO_BAR coresponds to pkg's { foo: { bar: '' }}
// each key FOO_BAR coresponds to config's { foo: { bar: '' }}
keys.BOB_DIR = { 'default': opts.bobDir };

@@ -34,3 +30,3 @@ keys.APP_DIR = { 'default': opts.appDir };

var props = key.toLowerCase().replace(/_/g, '.'),
value = util.apply(util.val(props, pkg), pkg);
value = util.apply(util.val(props, config), config);

@@ -44,4 +40,4 @@ // use value in package.json as priority

props.split('.').length >= 3 &&
keys[key][util.val(props.replace(/\.[^\.]+$/, '.type'), pkg)]) {
params[key] = keys[key][util.val(props.replace(/\.[^\.]+$/, '.type'), pkg)];
keys[key][util.val(props.replace(/\.[^\.]+$/, '.type'), config)]) {
params[key] = keys[key][util.val(props.replace(/\.[^\.]+$/, '.type'), config)];

@@ -67,3 +63,3 @@ // use default value as last resort

var pos = targets.indexOf(key);
if (pos !== -1 && keys[key].override && util.val(keys[key].override.prop, pkg)) {
if (pos !== -1 && keys[key].override && util.val(keys[key].override.prop, config)) {
targets[pos] = keys[key].override.target;

@@ -70,0 +66,0 @@ }

@@ -13,3 +13,3 @@ {

],
"version": "0.3.4",
"version": "0.4.0",
"homepage": "http://github.com/cliffano/bob",

@@ -21,5 +21,2 @@ "author": "Cliffano Subagio <blah@cliffano.com> (http://blog.cliffano.com)",

},
"scripts": {
"test": "npm install -g bob; bob clean lint test coverage;"
},
"repository": {

@@ -53,3 +50,3 @@ "type": "git",

"engines": {
"node": ">= 0.4.0"
"node": ">= 0.4.0 < 0.7.0"
},

@@ -56,0 +53,0 @@ "licenses": [

@@ -78,3 +78,3 @@ Bob [![http://travis-ci.org/cliffano/bob](https://secure.travis-ci.org/cliffano/bob.png?branch=master)](http://travis-ci.org/cliffano/bob)

<td>test</td>
<td>Run <a href=http://github.com/cloudhead/vows">cloudhead/vows</a> against all .js files in test/ directory.</td>
<td>Run <a href=http://github.com/cloudhead/vows">cloudhead/vows</a> against all .js files in test/ directory. If <code>{scripts.test}</code> is available, then <code>npm test</code> will be executed instead.</td>
</tr>

@@ -107,11 +107,11 @@ <tr>

<td>stop</td>
<td>Stop the app by executing <code>node {name}.js stop</code> .</td>
<td>Stop the app by executing <code>node {name}.js stop</code> . If <code>{scripts.stop}</code> is configured, then <code>npm stop</code> will be executed instead.</td>
</tr>
<tr>
<td>start</td>
<td>Start the app by executing <code>node {name}.js start</code> .</td>
<td>Start the app by executing <code>node {name}.js start</code> . If <code>{scripts.start}</code> is configured, then <code>npm start</code> will be executed instead.</td>
</tr>
<tr>
<td>restart</td>
<td>Restart the app by executing <code>node {name}.js restart</code> .</td>
<td>Restart the app by executing <code>node {name}.js restart</code> . If <code>{scripts.restart}</code> is configured, then <code>npm restart</code> will be executed instead.</td>
</tr>

@@ -139,9 +139,13 @@ <tr>

<tr>
<td>deploy-unpack <code>(experimental)</code></td>
<td>Deploy, then remotely unpack the .tar.gz package file via SSH.</td>
<td>ssh-unpack <code>(experimental)</code></td>
<td>(SSH only) Deploy, then remotely unpack the .tar.gz package file.</td>
</tr>
<tr>
<td>deploy-restart <code>(experimental)</code></td>
<td>Deploy, unpack, then remotely execute <code>node {name.js} restart</code> .</td>
<td>ssh-restart <code>(experimental)</code></td>
<td>(SSH only) Deploy, unpack, then remotely execute <code>node {name.js} restart</code> .</td>
</tr>
<tr>
<td>ssh-mkdir <code>(experimental)</code></td>
<td>(SSH only) Remotely create the directory to deploy the package file to.</td>
</tr>
</table>

@@ -154,9 +158,6 @@

Add this scripts.test to project's package.json file:
Configure the project's .travis.yml file:
{
"scripts": {
"test": "npm install -g bob; bob clean lint test coverage;"
}
}
before_install: "npm install -g bob"
script: "bob clean lint test coverage"

@@ -163,0 +164,0 @@ ###Jenkins CI

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