bluebird icon indicating copy to clipboard operation
bluebird copied to clipboard

Question: a new release?

Open mrmurphy opened this issue 5 years ago • 12 comments

I'm so sorry to be asking this in an issue, but it seems like the best place for it. I see that since the release of 3.5.5 support for async hooks has been merged. I'm delighted, because this is really important to our setup! But it looks like that'll be going into the next release. I've tried to figure out how to run from the master branch but it's not as easy as just npm install <github_repo>#master, since there's a pre-compilation step.

Are releases made at a regular interval, or just when it feels like it's time for a release? Thanks!

mrmurphy avatar Jun 20 '19 04:06 mrmurphy

@petkaantonov just runs a script to do it. @petkaantonov

benjamingr avatar Jun 20 '19 07:06 benjamingr

I was procrastinating on release to see if something comes up with the async hooks

petkaantonov avatar Jun 30 '19 18:06 petkaantonov

@petkaantonov any update?

yosiat avatar Jul 18 '19 10:07 yosiat

I was hoping to get Promise.allSettled included in the next Bluebird release so it matches native promise API.

rafde avatar Jul 30 '19 15:07 rafde

@rafde we could happily add that in - via a Promise.allSettled = Promise.settle since bluebird's settle was an inspiration for allSettled.

I am not sure about adding a new behavior/feature that implements allSettled other than that :]

benjamingr avatar Jul 30 '19 18:07 benjamingr

I noticed settled in the code base, and also noticed https://github.com/petkaantonov/bluebird/blob/master/src/settle.js#L44

Thanks for the response

rafde avatar Jul 31 '19 15:07 rafde

@rafde here is the allSettled discussion issue: https://github.com/tc39/proposal-promise-allSettled/issues/17

I don't mind un-deprecating it.

benjamingr avatar Jul 31 '19 15:07 benjamingr

Well .allSettled could just be the same line of code with no deprecation warning

Ill release tonight

petkaantonov avatar Oct 01 '19 07:10 petkaantonov

@petkaantonov can this be closed?

benjamingr avatar Oct 18 '20 16:10 benjamingr

the Promise.allSettled() implementation in bluebird seems to be different from spec https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled.

const promise1 = Promise.resolve('Resolved!');
const promise2 = Promise.reject('Rejected!');
const promise3 = Promise.resolve('Resolved!');
const promise4 = Promise.reject('Rejected!');

const promises = [promise1, promise2, promise3, promise4];
//Expect: 
//    [ { status: 'fulfilled', value: 'Resolved!' },
//      { status: 'rejected', reason: 'Rejected!' },
//      { status: 'fulfilled', value: 'Resolved!' },
//      { status: 'rejected', reason: 'Rejected!' } ]

//Result: 
//    [ PromiseInspection { _bitField: 33554432, _settledValueField: 'Resolved!' },
//      PromiseInspection { _bitField: 16777216, _settledValueField: 'Rejected!' },
//      PromiseInspection { _bitField: 33554432, _settledValueField: 'Resolved!' },
//      PromiseInspection { _bitField: 16777216, _settledValueField: 'Rejected!' } ]
const results = await Promise.allSettled(promises);

trmaphi avatar Dec 10 '20 06:12 trmaphi

@petkaantonov could you check the return value of Promise.allSettled in bluebird

trmaphi avatar Dec 22 '20 10:12 trmaphi

the Promise.allSettled() implementation in bluebird seems to be different from spec https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled.

It may make sense to change allSettled in a new major 4.x release, since anything using https://github.com/petkaantonov/bluebird/releases/tag/v3.7.2 with bluebird.allSettled() would be calling value() instead of using .value.

There's also the question of whether it makes sense to continue to keep settled in 4.x with the original semantics of providing a callback. Leaving in settled would make migration easier, I guess?

TysonAndre avatar Feb 08 '21 22:02 TysonAndre