Skip to content

Feature Request: add support for Middy.js 6.x #3367

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

Closed
anthony-nhs opened this issue Nov 26, 2024 · 9 comments · Fixed by #3368
Closed

Feature Request: add support for Middy.js 6.x #3367

anthony-nhs opened this issue Nov 26, 2024 · 9 comments · Fixed by #3368
Assignees
Labels
completed This item is complete and has been merged/shipped dependencies Changes that touch dependencies, e.g. Dependabot, etc. feature-request This item refers to a feature request for an existing or new utility

Comments

@anthony-nhs
Copy link
Contributor

Expected Behavior

You can install v6.x of @middy/core and @aws-lambda-powertools/logger

Current Behavior

When installing v6.x of @middy/core you get this error

 npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @aws-lambda-powertools/[email protected]
npm ERR! Found: @middy/[email protected]
npm ERR! node_modules/@middy/core
npm ERR!   @middy/core@"^6.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @middy/core@"4.x || 5.x" from @aws-lambda-powertools/[email protected]
npm ERR! node_modules/@aws-lambda-powertools/logger
npm ERR!   @aws-lambda-powertools/logger@"^2.11.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @middy/[email protected]
npm ERR! node_modules/@middy/core
npm ERR!   peerOptional @middy/core@"4.x || 5.x" from @aws-lambda-powertools/[email protected]
npm ERR!   node_modules/@aws-lambda-powertools/logger
npm ERR!     @aws-lambda-powertools/logger@"^2.11.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Code snippet

in package.json

  "dependencies": {
    "@aws-lambda-powertools/logger": "^2.11.0",
    "@middy/core": "^6.0.0",

Steps to Reproduce

Install @middy/core v6 and @aws-lambda-powertools/logger

Possible Solution

change peerDepenedencies in @aws-lambda-powertools/logger to include v6 of @middy/core

Powertools for AWS Lambda (TypeScript) version

latest

AWS Lambda function runtime

22.x

Packaging format used

npm

Execution logs

@anthony-nhs anthony-nhs added bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Nov 26, 2024
Copy link

boring-cyborg bot commented Nov 26, 2024

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@dreamorosi
Copy link
Contributor

dreamorosi commented Nov 26, 2024

Hi, thank you for opening this issue.

This is intentional, and also not a bug.

Powertools for AWS is officially compatible only with v4.x and v5.x as of now, as stated in our docs. Middy.js v6.x was released recently and we haven't yet added automated tests to ensure it's compatible, this is why the peer dependency version range doesn't include the new version.

I'm going to convert this to a feature request and put it in the backlog.

@dreamorosi dreamorosi added dependencies Changes that touch dependencies, e.g. Dependabot, etc. feature-request This item refers to a feature request for an existing or new utility discussing The issue needs to be discussed, elaborated, or refined and removed bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Nov 26, 2024
@dreamorosi dreamorosi moved this from Triage to Backlog in Powertools for AWS Lambda (TypeScript) Nov 26, 2024
@dreamorosi dreamorosi changed the title Bug: peer dependency of @middy/core 4.x || 5.x in @aws-lambda-powertools/logger Feature Request: add support for Middy.js 6.x Nov 26, 2024
@anthony-nhs
Copy link
Contributor Author

Thanks for the update. I have created a PR that runs test for middy 4, 5, 6 but I appreciate that you might want further tests or investigations on it
#3368

Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi added pending-release This item has been merged and will be released soon and removed discussing The issue needs to be discussed, elaborated, or refined labels Nov 29, 2024
@WtfJoke
Copy link

WtfJoke commented Dec 12, 2024

@dreamorosi out of curiosity, when is the next release planned with this change 🙃 ?

@dreamorosi
Copy link
Contributor

Hey @WtfJoke, sorry for the delay.

The team has been busy for re:Invent and we skipped a release week last week.

I am planning on making a release early next week on Monday/Tuesday at the latest.

Thank you for your patience, and sorry for the inconvenience.

@WtfJoke
Copy link

WtfJoke commented Dec 12, 2024

No worries! Take your time for the release. Thank you for the fast answer.

Copy link
Contributor

This is now released under v2.12.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Dec 17, 2024
@WtfJoke
Copy link

WtfJoke commented Dec 17, 2024

@dreamorosi and team, thank you for the release 🙌♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped dependencies Changes that touch dependencies, e.g. Dependabot, etc. feature-request This item refers to a feature request for an existing or new utility
Projects
Development

Successfully merging a pull request may close this issue.

3 participants