Comparing version 3.0.0 to 3.0.1
10
kgo.js
@@ -39,3 +39,3 @@ var run = require('./run'); | ||
if(defaultsDefined){ | ||
throw new Error('Defaults may be defined only once per kgo'); | ||
throw new Error('Defaults may be defined only once per kgo'); | ||
} | ||
@@ -45,3 +45,3 @@ | ||
if(key in tasks){ | ||
throw new Error('A task is already defined for ' + key); | ||
throw new Error('A task is already defined for ' + key); | ||
} | ||
@@ -69,3 +69,3 @@ results[key] = defaults[key]; | ||
if(names[i] in results){ | ||
throw new Error('A default with the same name as this task (' + names[i] + ') has already been set'); | ||
throw new Error('A default with the same name as this task (' + names[i] + ') has already been set'); | ||
} | ||
@@ -80,3 +80,3 @@ } | ||
if(typeof dependency !== 'string'){ | ||
throw new Error('dependency was not a string: ' + dependency + ' in task: ' + names); | ||
throw new Error('dependency was not a string: ' + dependency + ' in task: ' + names); | ||
} | ||
@@ -87,3 +87,3 @@ }); | ||
if(name in tasks){ | ||
throw new Error('A task with the same name (' + name + ') is aready defined'); | ||
throw new Error('A task with the same name (' + name + ') is aready defined'); | ||
} | ||
@@ -90,0 +90,0 @@ |
{ | ||
"name": "kgo", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Flow control the super easy way", | ||
@@ -38,3 +38,6 @@ "main": "kgo.js", | ||
] | ||
}, | ||
"dependencies": { | ||
"stack-slice": "^1.0.0" | ||
} | ||
} |
@@ -1,2 +0,3 @@ | ||
var ignoreDependency = /^\!.+/, | ||
var stackSlice = require('stack-slice'), | ||
ignoreDependency = /^\!.+/, | ||
errorDependency = /^\*/, | ||
@@ -20,2 +21,5 @@ errorSymbol = '*'; | ||
if(error){ | ||
if(error instanceof Error){ | ||
stackSlice(error, __dirname, true); | ||
} | ||
return this._done(error); | ||
@@ -22,0 +26,0 @@ } |
@@ -478,2 +478,16 @@ var test = require('tape'), | ||
); | ||
}); | ||
test('must have argmuents', function(t){ | ||
t.plan(1); | ||
function someTask(done){ | ||
done(new Error('bang')); | ||
} | ||
kgo | ||
('someTask', someTask) | ||
(['*'], function(error){ | ||
t.notOk(~error.stack.indexOf('kgo')); | ||
}); | ||
}); |
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
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
23245
636
1
+ Addedstack-slice@^1.0.0
+ Addedstack-slice@1.0.1(transitive)