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

jobhub

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jobhub - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

7

CHANGELOG.md

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

0.1.2 / 2016-09-06
==================
* Add optional "meta" prop to JobConfig
* Fix missing @throws to HubManager#queueJob
* Fix queueForTermination not marked as protected
0.1.1 / 2016-09-01

@@ -2,0 +9,0 @@ ==================

2

lib/HubManager.js

@@ -164,2 +164,3 @@ var createUUID = require('uuid').v4;

* @throws {JobNotFoundError}
* @throws {InvalidUniqueKeyError}
*/

@@ -232,2 +233,3 @@ HubManager.prototype.queueJob = function(job, params) {

*
* @protected
* @param {TrackedJob} trackedJob

@@ -234,0 +236,0 @@ */

@@ -17,2 +17,3 @@ var path = require('path');

* @property {function} [onProgress=null]
* @property {object} [meta={}]
*/

@@ -185,2 +186,9 @@

}
if (jobConfig.meta && typeof jobConfig.meta !== 'object') {
throw new errors.InvalidJobConfigError(
'Job ' + JSON.stringify(jobName) + ' config must have an object for "meta", if specified',
jobName,
'meta'
);
}
}

@@ -204,3 +212,4 @@ else {

onReject: jobConfig.onReject || null,
onProgress: jobConfig.onProgress || null
onProgress: jobConfig.onProgress || null,
meta: jobConfig.meta || {}
};

@@ -207,0 +216,0 @@ };

2

package.json
{
"name": "jobhub",
"version": "0.1.1",
"version": "0.1.2",
"description": "Manages running jobs in child processes",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -185,3 +185,4 @@ var path = require('path');

'onResolve',
'onReject'
'onReject',
'meta'
].sort();

@@ -198,3 +199,4 @@

onReject: function() {},
onProgress: function() {}
onProgress: function() {},
meta: {}
};

@@ -213,2 +215,3 @@ var parsed = util.parseJobConfig('FOO', jobConfig);

expect(parsed.onProgress).toBe(jobConfig.onProgress);
expect(parsed.meta).toBe(jobConfig.meta);
});

@@ -232,2 +235,4 @@

expect(parsed.onProgress).toBe(null);
expect(parsed.meta).toBeA(Object);
expect(parsed.meta).toEqual({});
});

@@ -276,2 +281,4 @@

expect(parsed.onProgress).toBe(null);
expect(parsed.meta).toBeA(Object);
expect(parsed.meta).toEqual({});
});

@@ -371,2 +378,11 @@

});
it('should throw a InvalidJobConfigError if "meta" is specified and not an object', function() {
expect(function() {
util.parseJobConfig('FOO', { run: function() {}, meta: 5 });
}).toThrowWithProps(errors.InvalidJobConfigError, {
jobName: 'FOO',
propName: 'meta'
});
});
});

@@ -373,0 +389,0 @@

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