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

v3 #65

Closed
mreinstein opened this issue Sep 19, 2020 · 3 comments
Closed

v3 #65

mreinstein opened this issue Sep 19, 2020 · 3 comments

Comments

@mreinstein
Copy link
Owner

mreinstein commented Sep 19, 2020

Here's what I'm thinking about for the next major release (3.0.0):

  • require node v12.17 and up
  • switch to pure es module
  • drop commonjs
  • switch to es6 everywhere (const, let, spread, destructuring, etc.)
  • ditch old callback style in favor of async function (finally!)
  • update all deps

These are just my current musings. Open for thoughts/ideas/suggestions.

@mreinstein
Copy link
Owner Author

One wrinkle with ditching the callback style is alexa-verifier-middleware is a major consumer of this module, which is an express middleware, and express still doesn't support async middlewares. It might be better to hold off on this particular item until express supports that out of the box (v5 does I think, but it's perpetually marked as alpha)

@tejashah88
Copy link
Contributor

@mreinstein We could have it so v3 could expose a .callback() and a .promise() function, to allow flexibility. The nice thing is that Node has a native method to promisify callback-based functions, so that should be easy to add.

One thing to note is that it'll be a long while before express v4 and below are so rarely used that we can completely ditch the callback style.

@mreinstein
Copy link
Owner Author

I did all of this except for the async function, since express still lacks async/await middlewares. :(

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

No branches or pull requests

2 participants