Comparing version 0.8.5-0 to 0.8.5-1
@@ -328,2 +328,8 @@ #API Reference | ||
To enable them in all instances of bluebird in node.js, use the environment variable `BLUEBIRD_DEBUG`: | ||
``` | ||
BLUEBIRD_DEBUG=1 node server.js | ||
``` | ||
You should enabled long stack traces if you want better debugging experience. For example: | ||
@@ -330,0 +336,0 @@ |
@@ -156,3 +156,3 @@ var astPasses = require("./ast_passes.js"); | ||
function runIndependentTest( file, cb ) { | ||
function runIndependentTest( file, cb , env) { | ||
var fs = require("fs"); | ||
@@ -173,6 +173,8 @@ var path = require("path"); | ||
if( file.indexOf( "mocha/") > -1 || file === "aplus.js" ) { | ||
var node = spawn('node', flags.concat(["../mocharun.js", file]), {cwd: p, stdio: stdio}); | ||
var node = spawn('node', flags.concat(["../mocharun.js", file]), | ||
{cwd: p, stdio: stdio, env: env}); | ||
} | ||
else { | ||
var node = spawn('node', flags.concat(["./"+file]), {cwd: p, stdio: stdio}); | ||
var node = spawn('node', flags.concat(["./"+file]), | ||
{cwd: p, stdio: stdio, env:env}); | ||
} | ||
@@ -183,3 +185,3 @@ node.on('exit', exit ); | ||
if( code !== 0 ) { | ||
throw new Error("process didn't exit normally"); | ||
cb(new Error("process didn't exit normally. Code: " + code)); | ||
} | ||
@@ -299,14 +301,23 @@ else { | ||
for( var i = 0, len = files.length; i < len; ++i ) { | ||
(function(file, i) { | ||
var maxParallelProcesses = 10; | ||
var len = Math.min( files.length, maxParallelProcesses ); | ||
for( var i = 0; i < len; ++i ) { | ||
(function arguments$callee(file) { | ||
totalTests++; | ||
grunt.log.writeln("Running test " + files[i] ); | ||
grunt.log.writeln("Running test " + file ); | ||
var env = undefined; | ||
if (file.indexOf("bluebird-debug-env-flag") >= 0) { | ||
env = Object.create(process.env); | ||
env["BLUEBIRD_DEBUG"] = true; | ||
} | ||
runIndependentTest(file, function(err) { | ||
if( err ) throw new Error(err + " " + file + " failed"); | ||
grunt.log.writeln("Test " + files[i] + " succeeded"); | ||
grunt.log.writeln("Test " + file + " succeeded"); | ||
testDone(); | ||
}); | ||
})(files[i], i); | ||
if( files.length > 0 ) { | ||
arguments$callee( files.shift() ); | ||
} | ||
}, env); | ||
})(files[i]); | ||
} | ||
} | ||
@@ -313,0 +324,0 @@ |
{ | ||
"name": "bluebird", | ||
"description": "Full featured Promises/A+ implementation with exceptionally good performance", | ||
"version": "0.8.5-0", | ||
"version": "0.8.5-1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "promise", |
@@ -95,2 +95,10 @@ <a href="http://promisesaplus.com/"> | ||
In node.js use the environment flag `BLUEBIRD_DEBUG`: | ||
``` | ||
BLUEBIRD_DEBUG=1 node server.js | ||
``` | ||
to enable long stack traces in all instances of bluebird. | ||
right after the library is loaded. Long stack traces cannot be disabled after being enabled, and cannot be enabled after promises have alread been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them. | ||
@@ -168,3 +176,3 @@ | ||
To run all tests, run `grunt test`. Note that new process is created for each test file, which means 40 processes as of now. The stdout of tests is ignored by default and everything will stop at the first failure. | ||
To run all tests, run `grunt test`. Note that 10 processes are created to run the tests in parallel. The stdout of tests is ignored by default and everything will stop at the first failure. | ||
@@ -171,0 +179,0 @@ Individual files can be run with `grunt test --run=filename` where `filename` is a test file name in `/test` folder or `/test/mocha` folder. The `.js` prefix is not needed. The dots for AP compliance tests are not needed, so to run `/test/mocha/2.3.3.js` for instance: |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
241336
5621
299
7