shimaore/esl

Version 10.0.0?

james-criscuolo opened this issue · 2 comments

I see via npm outdated and visiting this repo on npmjs.com that Version 10.0.0 was released 9 days go. Guessing the commits/changelog were just not pushed to github?

Hi @james-criscuolo, thank you for the kind reminder! I've been using gitlab lately and github isn't in my workflow anymore — and I forgot to update package.json before I published on npm.

In 10.0 I updated parts of the code to mostly work with recent ES constructs (the code relies on async/await, class, native Promises, no longer uses bluebird's Promise cancellation, etc.). This was something I wanted to do for some time but never got to. This requires newer Node.js so that's one breaking change, but that one is rather obvious so people will spot it early.

The other breaking change that's more subtle (and can lead to bugs, but might avoid memory leaks) is that the code doesn't .bind(this) on Promises anymore.

This will break existing code that relies on Promise-chaining. In other words, if your code still depends on this inside the then callback:

  .then(function() {
    this.hangup()
  })

then you definitely want to stay with 9.x or below.

However if you've migrated your code to use await

  await this.hangup()

then this version will work fine.

Other than that there might not be any real benefits to upgrading. The API is the same in terms of methods (no methods were added nor removed). I had to rewrite some parts of the queuing mechanism to get rid of bluebird, and the Promise-with-timeout might be cleaner than previous implementation, but the tests didn't show anything really exciting.

Thanks, I'll close this. I haven't updated my code to await, so I may be hanging back a while, but we'll get there eventually I'm sure.