TryGhost / express-hbs

Express handlebars template engine with inheritance, partials, i18n and async helpers.
MIT License
458 stars 76 forks source link

refactor: remove bluebird dep #252

Closed markstos closed 1 year ago

markstos commented 1 year ago

Also, update eslintrc to support arrow notation.

Ref: https://github.com/TryGhost/Ghost/issues/14882

QA Log

I was concerned about the edge case where the cache was empty.

I checked that in that case, Object.keys({}) will return empty array, and Promise.all([]); will return an array of length zero, so there's no need to a further conditional case for this.

> Object.values({});
[]
> var foo = await Promise.all([])
undefined
> foo.length
0

To confirm the done() function I modified had test coverage, I manually introduced a bug in it and confirmed that tests failed.

daniellockyer commented 1 year ago

Hey @markstos - thanks for the PR! I'm very excited to get rid of Bluebird from Ghost.

Can I ask that you remove all non-critical changes for the Bluebird removal from the PR? I need to sort out the supported Node versions and eslint config, but ideally not in this PR.

Once that's done, I'd be happy to merge!

markstos commented 1 year ago

254 has the requested changes which were easier on a fresh branch. Closing this variant.