Socket
Socket
Sign inDemoInstall

bluebird

Package Overview
Dependencies
Maintainers
1
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluebird - npm Package Compare versions

Comparing version 0.9.7-0 to 0.9.8-0

28

Gruntfile.js
"use strict";
Error.stackTraceLimit = 100;
var astPasses = require("./ast_passes.js");
var cc = require("closure-compiler");
var node11 = parseInt(process.versions.node.split(".")[1], 10) >= 11;

@@ -465,3 +464,3 @@ var Q = require("q");

function build( paths ) {
function build( paths, isCI ) {
var fs = require("fs");

@@ -500,9 +499,14 @@ astPasses.readConstants(fs.readFileSync(CONSTANTS_FILE, "utf8"), CONSTANTS_FILE);

return Q.all([
buildMain( sources, optionalRequireCode ).then( function() {
return buildBrowser( sources );
}),
buildDebug( sources, optionalRequireCode ),
buildZalgo( sources, optionalRequireCode )
]);
if( isCI ) {
return buildDebug( sources, optionalRequireCode );
}
else {
return Q.all([
buildMain( sources, optionalRequireCode ).then( function() {
return buildBrowser( sources );
}),
buildDebug( sources, optionalRequireCode ),
buildZalgo( sources, optionalRequireCode )
]);
}
});

@@ -602,4 +606,4 @@ }

grunt.registerTask( "build", function() {
var isCI = !!grunt.option("ci");
var done = this.async();
var features = grunt.option("features");

@@ -612,3 +616,3 @@ var paths = null;

build( paths ).then(function() {
build( paths, isCI ).then(function() {
done();

@@ -630,2 +634,4 @@ }).catch(function(e) {

var testOption = grunt.option("run");
if( !testOption ) testOption = "all";

@@ -632,0 +638,0 @@ else {

@@ -262,9 +262,5 @@ /**

Promise["try"] = Promise.attempt = function Promise$_Try( fn, args, ctx ) {
var ret = new Promise();
ret._setTrace( Promise.attempt, void 0 );
ret._cleanValues();
if( typeof fn !== "function" ) {
ret._setRejected();
ret._resolvedValue = new TypeError("fn must be a function");
return ret;
return apiRejection("fn must be a function");
}

@@ -275,10 +271,21 @@ var value = isArray( args )

var ret = new Promise();
ret._setTrace( Promise.attempt, void 0 );
if( value === errorObj ) {
ret._cleanValues();
ret._setRejected();
ret._resolvedValue = value.e;
return ret;
}
var maybePromise = Promise._cast(value);
if( maybePromise instanceof Promise ) {
ret._assumeStateOf( maybePromise, true );
}
else {
ret._cleanValues();
ret._setFulfilled();
ret._resolvedValue = value;
}
return ret;

@@ -285,0 +292,0 @@ };

@@ -262,9 +262,5 @@ /**

Promise["try"] = Promise.attempt = function Promise$_Try( fn, args, ctx ) {
var ret = new Promise();
ret._setTrace( Promise.attempt, void 0 );
ret._cleanValues();
if( typeof fn !== "function" ) {
ret._setRejected();
ret._resolvedValue = new TypeError("fn must be a function");
return ret;
return apiRejection("fn must be a function");
}

@@ -275,10 +271,21 @@ var value = isArray( args )

var ret = new Promise();
ret._setTrace( Promise.attempt, void 0 );
if( value === errorObj ) {
ret._cleanValues();
ret._setRejected();
ret._resolvedValue = value.e;
return ret;
}
var maybePromise = Promise._cast(value);
if( maybePromise instanceof Promise ) {
ret._assumeStateOf( maybePromise, true );
}
else {
ret._cleanValues();
ret._setFulfilled();
ret._resolvedValue = value;
}
return ret;

@@ -285,0 +292,0 @@ };

{
"name": "bluebird",
"description": "Full featured Promises/A+ implementation with exceptionally good performance",
"version": "0.9.7-0",
"version": "0.9.8-0",
"keywords": [

@@ -32,5 +32,2 @@ "promise",

"grunt-contrib-jshint": "~0.6.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-concat": "~0.3.0",
"promises-aplus-tests": "~1.3.2",
"acorn": "~0.3.1",

@@ -46,3 +43,2 @@ "grunt-bump": "0.0.11",

"jquery-browserify": "~1.8.1",
"closure-compiler": "~0.2.1",
"sinon": "~1.7.3",

@@ -52,3 +48,4 @@ "kew": "~0.2.2",

"concurrent": "~0.3.2",
"text-table": "~0.2.0"
"text-table": "~0.2.0",
"grunt-cli": "~0.1.9"
},

@@ -55,0 +52,0 @@ "readmeFilename": "README.md",

@@ -0,1 +1,3 @@

[![Build Status](https://travis-ci.org/petkaantonov/bluebird.png?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
<a href="http://promisesaplus.com/">

@@ -388,3 +390,3 @@ <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"

This technique utilizes the [slightly under-documented](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi#Stack_trace_collection_for_custom_exceptions) second argument of V8 `Error.captureStackTrace`. It turns out you can that the second argument can actually be used to make V8 skip all library internal stack frames [for free](https://github.com/v8/v8/blob/b5fabb9225e1eb1c20fd527b037e3f877296e52a/src/isolate.cc#L665). It only requires propagation of callers manually in library internals but this is not visible to you as user at all.
This technique utilizes the [slightly under-documented](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi#Stack_trace_collection_for_custom_exceptions) second argument of V8 `Error.captureStackTrace`. It turns out that the second argument can actually be used to make V8 skip all library internal stack frames [for free](https://github.com/v8/v8/blob/b5fabb9225e1eb1c20fd527b037e3f877296e52a/src/isolate.cc#L665). It only requires propagation of callers manually in library internals but this is not visible to you as user at all.

@@ -391,0 +393,0 @@ Without this technique, every promise (well not every, see second technique) created would have to waste time creating and collecting library internal frames which will just be thrown away anyway. It also allows one to use smaller stack trace limits because skipped frames are not counted towards the limit whereas with collecting everything upfront and filtering afterwards would likely have to use higher limits to get more user stack frames in.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc