question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

perhaps deprecate the npm package?

See original GitHub issue

Seeing as the npm package haven’t been updated in two years and the suggestion in the ā€œReadme -> Noteā€ about using native promises when possible still stands, would it make sense to deprecate this package on npm?

I’m in the process of trying to refactor a package to using native promises, async/await and async iterators and it’s sometime a risky business unknowingly if something dose some abnormal to the promise chain like tapping in and calling .delay(), .spread() or any of the other utilities after a promise chain.

I’m more okey with this kind of code:

return bluebirdPromise.delay(250)

than something like

function foo() {
  return Promise.resolve(123)
}

foo().delay(250).then(console.log)

At any point i might refactor foo to a async/await and perhaps use native promises or async/await instead.

I think it would be better to depend on a spec’ed promise A+ polyfill instead.

beside, this bluebird promise did not have Promise.allSettled so i had to use globalThis.Promise.allSettled to avoid the imported bluebird-promise imported in at the top of the file.

maybe bluebird have run its course, and say that it’s time to say goodby to bluebird?

you have done an amazing work with promises and made browser lookup to bluebirds promise tools and speed so a big thank you.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
benjamingrcommented, Feb 17, 2022

Verified nothing (yet) on the NPM side but they’re working on it.

1reaction
benjamingrcommented, Feb 17, 2022

maybe we can add something to @types/bluebird that some of the promise chain methods is best avoided and mark only some chain methods as deprecated? šŸ’

Another good idea might be an ESLint rule that warns on these methods and then suggest adding it to the airbnb base config people use?


As a side note I really wish there was a way to port the warnings since they’re the main thing still missing (though less so since async await became more dominant)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecating and undeprecating packages or package versions
Deprecating an entire package will remove it from search results on the npm website and a deprecation message will also be displayed on...
Read more >
What is node package deprecation? | by Clyde Bates - Medium
The quickest answer is the author/owner of the package. Deprecation information is held in the package registry and linked to your code via...
Read more >
NPM warn message about deprecated package - Stack Overflow
This is the correct answer when dealing with a subset of old packages. npm outdated is nice, but will probably spew out a...
Read more >
How to avoid problems with deprecated npm packages?
If the system is anything bigger than a simple CRUD, then rewriting a communication library every year is not a good idea. It's...
Read more >
How node package deprecation works
You have probably encountered a warning message saying: "npm WARN deprecated packageX: Use packageY instead, see {link to theĀ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found