Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: a new release? #1600

Open
mrmurphy opened this issue Jun 20, 2019 · 12 comments
Open

Question: a new release? #1600

mrmurphy opened this issue Jun 20, 2019 · 12 comments

Comments

@mrmurphy
Copy link

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!

@benjamingr
Copy link
Collaborator

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

@petkaantonov
Copy link
Owner

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

@yosiat
Copy link

yosiat commented Jul 18, 2019

@petkaantonov any update?

@rafde
Copy link

rafde commented Jul 30, 2019

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

@benjamingr
Copy link
Collaborator

@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 :]

@rafde
Copy link

rafde commented Jul 31, 2019

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

@benjamingr
Copy link
Collaborator

@rafde here is the allSettled discussion issue: tc39/proposal-promise-allSettled#17

I don't mind un-deprecating it.

@petkaantonov
Copy link
Owner

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

Ill release tonight

@benjamingr
Copy link
Collaborator

@petkaantonov can this be closed?

@trmaphi
Copy link

trmaphi commented Dec 10, 2020

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
Copy link

trmaphi commented Dec 22, 2020

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

@TysonAndre
Copy link

TysonAndre commented Feb 8, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants