-
Notifications
You must be signed in to change notification settings - Fork 154
Maintenance: evaluate migration to Middy 3.x #875
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
Comments
Middy does not support nodejs12.x out of the box, but The breaking changes around v2.5.x is very stable and is fine to stay with till AWS itself deprecates nodejs12.x. Because we're community maintained, I have no plans to apply any future updates to that branch. However, I would make an exception for security patches. I don't expect any though because |
Anecdotally, we are using |
I can confirm that at least on my experience However I have tried upgrading the dependency in the repo and I have found that it makes the unit tests ran on Node.js 12 fail. At the time of writing we run unit and integration tests on Node.js 12, 14, and 16. We'll revisit the issue we decide to drop Node.js 12, to track the progress of this decision follow #1061 |
While migrating the codebase to Node.js 18.x, we have updated the We can consider this issue as complete, we will revisit the Middy version once we drop support for Node.js 14. |
|
Description of the feature request
Problem statement
Middy, the dependency that we use to vend middleware has recently released a new major version (v 3.x). This version drops support for Node JS version 12.x and introduces some breaking changes.
Given that Middy, as a whole, has a large surface and we are only using
@middy/core
we need to investigate on whether there's a path to upgrade to the newer version while still continuing to support Node JS 12.x in Powertools.Additional context
Running the e2e tests on a branch that upgraded
@middy/core
to 3.0.1 seems to show that the newer release is compatible with Powertools on both versions 12 and 14 of Node (see run results).At the same time, the unit tests for that same branch are failing for all utilities and specifically in the section that relates the middleware implementations. The error message (see detail below) seems to hint at incompatibilities between the new bundling of middy that now supports both CJS and ESM bundling, and our project's configuration since the errors are related to the imports and the tests don't run at all.
Code examples
N/A
Benefits for you and the wider AWS community
Describe alternatives you've considered
Not upgrading to 3.x and staying on version 2.5.x
Additional context
Related issues, RFCs
#861
The text was updated successfully, but these errors were encountered: