-
Notifications
You must be signed in to change notification settings - Fork 183
feat: allow @middy/core v7 #4918
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
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
Thank you for the PR. As you can see, one of the GitHub checks is failing. Could you please create an issue for this and link to it in your PR? |
|
@svozza Done! |
|
Before we can merge this we need to add this new version to the test matrix in the e2e tests. I don't remember if we have dropped support for an older version of Middy.js yet, but we should keep only versions that align with Node.js 20, 22, and 24. Once we have Middy.js in our test suite and it's passing, we can merge this. |
|
Yes, I've been looking at the E2E tests and it looks like we are currently only running them against Middy v5 for most tests. |
|
Makes sense. I dug a bit into it, and from what I understand how it could be achieved that the lambda test function is bundled with the |
|
We don't use any esbuild plugin, the We just have a number of Middy.js versions installed under different aliases, and import one or the other using that alias. I think we should look at Middy.js release notes, figure out which one maps with each Node.js version, and remove the ones for versions older than 20 (if any). As long as we have 1-2 test fixtures with v7 I think that's enough for now. |
|
It looks like Middy 4 targeted Node 18, so we could remove that and replace with v7: https://middy.js.org/docs/upgrade/4-5. We don't have any Middy 4 tests so we'll need to move some of the v5 tests to v7. |
|
The Tracer tests might make sense, because that means we would have Logger -> v5, Idempotency -> v6, and Tracer -> v7:
That said, there's only one Middy test in that utility so we might want to change one of the logger ones too, to give a bit more coverage. |
|
I'm ok to remove Middy.js v4, my preference would be to add v7 to the Idempotency tests since most of the v7 changes are related to Durable Functions, which we also made changes for in that module. With that said, I don't expect breaking changes so either works. |
|
Added middy v7 and bumped all alias to respective latest version. |
|
|
I've ran the E2E tests and the idempotency ones are passing. However, I've realised that this means we now have no coverage of Middy v6 now. I propose we change two of the tests in the Logging utility to use v6 instead of v5. |
|
Ah I missed that. Great stuff! |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



See https://github.com/middyjs/middy/releases/tag/7.0.0
Closes #4920
Summary
This adds
@middy/core@v7as an allowed peer dependency.Ideally we also bump the min. Node.js version to 22, but since AWS lambda still supports Node.js 20 until July 2026 1 I opted not to introduce this breaking change.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Footnotes
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html ↩