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

fix(appconfig): #1009 rewrite to not use deprecated appconfig getConfiguration command #1029

Conversation

mju-spyrosoft
Copy link
Contributor

@mju-spyrosoft mju-spyrosoft commented Mar 13, 2023

#1009

Rewrites parts of appconfig middleware to no longer use deprecated GetConfigurationCommand and use GetLatestConfigurationCommand instead. Basically uses new way of getting appconfig.

  • Calls start session configuration once per lambda initialization. See why

This token should only be used once in your first call to GetLatestConfiguration. You must use the new token in the GetLatestConfiguration response (NextPollConfigurationToken) in each subsequent call to GetLatestConfiguration ......

  • On subsequent calls will use NextPollConfigurationToken returned by previous api call
  • NextConfigurationToken is stored internally in middleware
  • Note that fetchData object keys have changed
 key: {
  ApplicationIdentifier: '...',
  ConfigurationProfileIdentifier: '...',
  EnvironmentIdentifier: '...'
 }

@willfarrell I run into case where i'm not sure how it should be handled.
When calling GetLatestConfigurationCommand it may return null value for config if it hasn't change last poll . Its problematic since middy already removed configuration from cache.

You can see this specific case in failing test It should keep previous configuration value if getLatestConfiguration returns null configuration

How to handle this? It could be kept in internal middleware cache in the same way configurationTokens are in this PR but not sure if that's good apporach.

TODO

  • change @aws-sdk/client-appconfig to @aws-sdk/client-appconfig-data and update middleware logic
  • update skipped tests
  • store configuration token in middleware cache
  • uninstall @aws-sdk/client-appconfig
  • update index.d.ts, index.test.-d.ts
  • Move StartConfigurationSessionCommand to cold start part of lambda
  • Add test for when mime type is not application/json
  • Add test for when StartConfigurationSessionCommand fails
  • Run it against real AWS account.
    • feature flag configuration
    • freeform configuration - Appconfig hosted configuration
    • freeform configuration - ssm
  • add test for when fetching multiple paramters

@willfarrell
Copy link
Member

Thanks for putting this together.

Calls start session configuration once per lambda initialization.

It would make sense to request this as part (StartConfigurationSessionCommand) during the cold start (before precache). This should allow you to combine fetchLatestConfiguration and fetch together and simplify the logic.

Note that fetchData object keys have changed

Because the options will need changing, this will have to be a breaking change and wait for v5. I hope to have an alpha out in the early summer.

When calling GetLatestConfigurationCommand it may return null value for config if it hasn't change last poll . Its problematic since middy already removed configuration from cache.

Storing the previous value as a fallback when the response is null is fine.

@mju-spyrosoft
Copy link
Contributor Author

mju-spyrosoft commented Mar 14, 2023

It would make sense to request this as part (StartConfigurationSessionCommand) during the cold start (before precache). This should allow you to combine fetchLatestConfiguration and fetch together and simplify the logic.

Sorry not sure if i get it. I can move StartConfigurationSessionCommand to be part of cold start but this would mean that appconfig client creation needs to be part of cold start as well, right?

From what im seeing in all middlewares AWS client are initialized with await createClient(options, request) in before unless they are passed into middleware or are created by prefetch

function startConfigurationSession() {
    for (const internalKey of Object.keys(options.fetchData)) {
      client
      .send(
        new StartConfigurationSessionCommand(options.fetchData[internalKey])
      )
      // put config tokens into token cache
  }

//Cold start stuff
  let prefetch, client
  if (canPrefetch(options)) {
    client = createPrefetchClient(options)
    prefetch = processCache(options, fetch)
  }

  if (!client) {
    client = await createClient(options, request) //No request here. 
  }
  startConfigurationSession()

@willfarrell willfarrell changed the base branch from main to feature/appconfig March 14, 2023 00:59
@willfarrell
Copy link
Member

Ah yes, it can't be included always during the cold start because if X-Ray is attached it will break. Super annoying. Don't worry about it. If you can finish off the typings I can merge it in.

Thanks for you help on this.

@mju-spyrosoft
Copy link
Contributor Author

mju-spyrosoft commented Mar 17, 2023

@willfarrell I think this is almost ready for review. I need to read last time through code and see if workflows are passing. Will try to find time for it today's as soon as possible

@willfarrell
Copy link
Member

Haven't forgotten about this, just been busy.

@mju-spyrosoft mju-spyrosoft marked this pull request as ready for review March 20, 2023 21:30
@mju-spyrosoft
Copy link
Contributor Author

mju-spyrosoft commented Mar 20, 2023

No problem at all. I moved it for ready to review, updated todos in PR description to better reflect changes.

Copy link
Contributor

@naorpeled naorpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mju-spyrosoft mju-spyrosoft changed the title fix(appconfig): #1009 rewrite to not use deprecated appconfig getConfiguration command WIP fix(appconfig): #1009 rewrite to not use deprecated appconfig getConfiguration command Mar 21, 2023
@willfarrell willfarrell deleted the branch middyjs:release/5.0 March 25, 2023 21:40
@willfarrell
Copy link
Member

Didn't mean to close this, give me a few

@willfarrell willfarrell reopened this Mar 25, 2023
@willfarrell willfarrell changed the base branch from feature/appconfig to release/5.0 March 25, 2023 21:41
@willfarrell willfarrell merged commit 58acca6 into middyjs:release/5.0 Mar 25, 2023
mergify bot referenced this pull request in SvenKirschbaum/share.kirschbaum.cloud Nov 17, 2023
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@middy/core](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fcore/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fcore/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fcore/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fcore/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fcore/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/error-logger](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2ferror-logger/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2ferror-logger/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2ferror-logger/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2ferror-logger/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2ferror-logger/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-content-negotiation](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-content-negotiation/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-content-negotiation/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-content-negotiation/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-content-negotiation/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-content-negotiation/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-error-handler](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-error-handler/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-error-handler/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-header-normalizer](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-header-normalizer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-header-normalizer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-json-body-parser](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-json-body-parser/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-json-body-parser/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-json-body-parser/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-json-body-parser/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-json-body-parser/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-response-serializer](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-response-serializer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-response-serializer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/validator](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fvalidator/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fvalidator/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fvalidator/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fvalidator/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fvalidator/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>middyjs/middy (@&#8203;middy/core)</summary>

### [`v5.0.2`](https://togithub.com/middyjs/middy/releases/tag/5.0.2)

[Compare Source](https://togithub.com/middyjs/middy/compare/5.0.1...5.0.2)

##### What's Changed

-   Validation error cause typo by [@&#8203;stepansib](https://togithub.com/stepansib) in [https://github.com/middyjs/middy/pull/1138](https://togithub.com/middyjs/middy/pull/1138)
    -   Update similar typo in other files

##### New Contributors

-   [@&#8203;stepansib](https://togithub.com/stepansib) made their first contribution in [https://github.com/middyjs/middy/pull/1138](https://togithub.com/middyjs/middy/pull/1138)

**Full Changelog**: middyjs/middy@5.0.1...5.0.2

### [`v5.0.1`](https://togithub.com/middyjs/middy/releases/tag/5.0.1)

[Compare Source](https://togithub.com/middyjs/middy/compare/5.0.0...5.0.1)

#### What's Changed

-   ci: Add in missing types file [@&#8203;lbevilacqua](https://togithub.com/lbevilacqua) [https://github.com/middyjs/middy/issues/1136](https://togithub.com/middyjs/middy/issues/1136)
-   chore(website): Update website-publish.yml by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1135](https://togithub.com/middyjs/middy/pull/1135)

**Full Changelog**: middyjs/middy@5.0.0...5.0.1

### [`v5.0.0`](https://togithub.com/middyjs/middy/releases/tag/5.0.0)

[Compare Source](https://togithub.com/middyjs/middy/compare/4.7.0...5.0.0)

For full details and upgrade guide see https://middy.js.org/docs/upgrade/4-5

#### Notable changes

-   Middy no longer support Common JS modules.
-   Deprecate Node.js v16.x.
-   Add support for Node.js v20.x.
-   Update to use TypeScript v5 along with a refactor to most packages
-   Update all errors to be consistent `new Error('message', { cause: { package:'@&#8203;middy/***', data:*** } })`
-   If using multiple `http-*-body-parsers` on the same endpoint you'll need to set `{ disableContentTypeError: true }`

#### What's Changed

-   fix(appconfig): [#&#8203;1009](https://togithub.com/middyjs/middy/issues/1009) rewrite to not use deprecated appconfig getConfiguration command by [@&#8203;mju-spyrosoft](https://togithub.com/mju-spyrosoft) in [https://github.com/middyjs/middy/pull/1029](https://togithub.com/middyjs/middy/pull/1029)
-   Green CI for 5.0 by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1090](https://togithub.com/middyjs/middy/pull/1090)
-   feat(json-body-parser): allow specifying versioned APIGW events by [@&#8203;naorpeled](https://togithub.com/naorpeled) in [https://github.com/middyjs/middy/pull/1100](https://togithub.com/middyjs/middy/pull/1100)
-   feat(typescript): getInternal type safety + other type improvements by [@&#8203;m-radzikowski](https://togithub.com/m-radzikowski) in [https://github.com/middyjs/middy/pull/1093](https://togithub.com/middyjs/middy/pull/1093)
-   Fix typo by [@&#8203;michael-k](https://togithub.com/michael-k) in [https://github.com/middyjs/middy/pull/1110](https://togithub.com/middyjs/middy/pull/1110)
-   docs: add Powertools idempotency + fix typo by [@&#8203;dreamorosi](https://togithub.com/dreamorosi) in [https://github.com/middyjs/middy/pull/1115](https://togithub.com/middyjs/middy/pull/1115)
-   fix(http-error-handler): non http errors will always be handled  by [@&#8203;qoomon](https://togithub.com/qoomon) in [https://github.com/middyjs/middy/pull/1117](https://togithub.com/middyjs/middy/pull/1117)
-   feat: add `@iress/middy-http-path-router` to third-party middleware docs by [@&#8203;RodneyMarsh](https://togithub.com/RodneyMarsh) in [https://github.com/middyjs/middy/pull/1124](https://togithub.com/middyjs/middy/pull/1124)
-   fix(website): extra padding on mobile by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1126](https://togithub.com/middyjs/middy/pull/1126)
-   Feat: improve TS docs, mention Middeware-first, Handler-last pattern by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1130](https://togithub.com/middyjs/middy/pull/1130)
-   Update website to docusaurus3 by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1129](https://togithub.com/middyjs/middy/pull/1129)
-   fix(middlewares/http-json-body-parser): narrow body type to string by [@&#8203;naorpeled](https://togithub.com/naorpeled) in [https://github.com/middyjs/middy/pull/1131](https://togithub.com/middyjs/middy/pull/1131)
-   fix: don't throw error for non http event by [@&#8203;robertbeal](https://togithub.com/robertbeal) in [https://github.com/middyjs/middy/pull/1133](https://togithub.com/middyjs/middy/pull/1133)

#### New Contributors

-   [@&#8203;mju-spyrosoft](https://togithub.com/mju-spyrosoft) made their first contribution in [https://github.com/middyjs/middy/pull/1029](https://togithub.com/middyjs/middy/pull/1029)
-   [@&#8203;michael-k](https://togithub.com/michael-k) made their first contribution in [https://github.com/middyjs/middy/pull/1110](https://togithub.com/middyjs/middy/pull/1110)
-   [@&#8203;qoomon](https://togithub.com/qoomon) made their first contribution in [https://github.com/middyjs/middy/pull/1117](https://togithub.com/middyjs/middy/pull/1117)
-   [@&#8203;RodneyMarsh](https://togithub.com/RodneyMarsh) made their first contribution in [https://github.com/middyjs/middy/pull/1124](https://togithub.com/middyjs/middy/pull/1124)
-   [@&#8203;robertbeal](https://togithub.com/robertbeal) made their first contribution in [https://github.com/middyjs/middy/pull/1133](https://togithub.com/middyjs/middy/pull/1133)

Big tanks to everyone who made this release possible!

**Full Changelog**: middyjs/middy@4.7.0...5.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/SvenKirschbaum/share.kirschbaum.cloud).
mergify bot referenced this pull request in SvenKirschbaum/aws-utils Nov 17, 2023
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@middy/core](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fcore/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fcore/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fcore/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fcore/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fcore/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/error-logger](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2ferror-logger/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2ferror-logger/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2ferror-logger/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2ferror-logger/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2ferror-logger/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-error-handler](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-error-handler/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-error-handler/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-error-handler/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-header-normalizer](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-header-normalizer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-header-normalizer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-header-normalizer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@middy/http-response-serializer](https://middy.js.org) ([source](https://togithub.com/middyjs/middy)) | [`4.7.0` -> `5.0.2`](https://renovatebot.com/diffs/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@middy%2fhttp-response-serializer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@middy%2fhttp-response-serializer/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@middy%2fhttp-response-serializer/4.7.0/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>middyjs/middy (@&#8203;middy/core)</summary>

### [`v5.0.2`](https://togithub.com/middyjs/middy/releases/tag/5.0.2)

[Compare Source](https://togithub.com/middyjs/middy/compare/5.0.1...5.0.2)

##### What's Changed

-   Validation error cause typo by [@&#8203;stepansib](https://togithub.com/stepansib) in [https://github.com/middyjs/middy/pull/1138](https://togithub.com/middyjs/middy/pull/1138)
    -   Update similar typo in other files

##### New Contributors

-   [@&#8203;stepansib](https://togithub.com/stepansib) made their first contribution in [https://github.com/middyjs/middy/pull/1138](https://togithub.com/middyjs/middy/pull/1138)

**Full Changelog**: middyjs/middy@5.0.1...5.0.2

### [`v5.0.1`](https://togithub.com/middyjs/middy/releases/tag/5.0.1)

[Compare Source](https://togithub.com/middyjs/middy/compare/5.0.0...5.0.1)

#### What's Changed

-   ci: Add in missing types file [@&#8203;lbevilacqua](https://togithub.com/lbevilacqua) [https://github.com/middyjs/middy/issues/1136](https://togithub.com/middyjs/middy/issues/1136)
-   chore(website): Update website-publish.yml by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1135](https://togithub.com/middyjs/middy/pull/1135)

**Full Changelog**: middyjs/middy@5.0.0...5.0.1

### [`v5.0.0`](https://togithub.com/middyjs/middy/releases/tag/5.0.0)

[Compare Source](https://togithub.com/middyjs/middy/compare/4.7.0...5.0.0)

For full details and upgrade guide see https://middy.js.org/docs/upgrade/4-5

#### Notable changes

-   Middy no longer support Common JS modules.
-   Deprecate Node.js v16.x.
-   Add support for Node.js v20.x.
-   Update to use TypeScript v5 along with a refactor to most packages
-   Update all errors to be consistent `new Error('message', { cause: { package:'@&#8203;middy/***', data:*** } })`
-   If using multiple `http-*-body-parsers` on the same endpoint you'll need to set `{ disableContentTypeError: true }`

#### What's Changed

-   fix(appconfig): [#&#8203;1009](https://togithub.com/middyjs/middy/issues/1009) rewrite to not use deprecated appconfig getConfiguration command by [@&#8203;mju-spyrosoft](https://togithub.com/mju-spyrosoft) in [https://github.com/middyjs/middy/pull/1029](https://togithub.com/middyjs/middy/pull/1029)
-   Green CI for 5.0 by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1090](https://togithub.com/middyjs/middy/pull/1090)
-   feat(json-body-parser): allow specifying versioned APIGW events by [@&#8203;naorpeled](https://togithub.com/naorpeled) in [https://github.com/middyjs/middy/pull/1100](https://togithub.com/middyjs/middy/pull/1100)
-   feat(typescript): getInternal type safety + other type improvements by [@&#8203;m-radzikowski](https://togithub.com/m-radzikowski) in [https://github.com/middyjs/middy/pull/1093](https://togithub.com/middyjs/middy/pull/1093)
-   Fix typo by [@&#8203;michael-k](https://togithub.com/michael-k) in [https://github.com/middyjs/middy/pull/1110](https://togithub.com/middyjs/middy/pull/1110)
-   docs: add Powertools idempotency + fix typo by [@&#8203;dreamorosi](https://togithub.com/dreamorosi) in [https://github.com/middyjs/middy/pull/1115](https://togithub.com/middyjs/middy/pull/1115)
-   fix(http-error-handler): non http errors will always be handled  by [@&#8203;qoomon](https://togithub.com/qoomon) in [https://github.com/middyjs/middy/pull/1117](https://togithub.com/middyjs/middy/pull/1117)
-   feat: add `@iress/middy-http-path-router` to third-party middleware docs by [@&#8203;RodneyMarsh](https://togithub.com/RodneyMarsh) in [https://github.com/middyjs/middy/pull/1124](https://togithub.com/middyjs/middy/pull/1124)
-   fix(website): extra padding on mobile by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1126](https://togithub.com/middyjs/middy/pull/1126)
-   Feat: improve TS docs, mention Middeware-first, Handler-last pattern by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1130](https://togithub.com/middyjs/middy/pull/1130)
-   Update website to docusaurus3 by [@&#8203;lmammino](https://togithub.com/lmammino) in [https://github.com/middyjs/middy/pull/1129](https://togithub.com/middyjs/middy/pull/1129)
-   fix(middlewares/http-json-body-parser): narrow body type to string by [@&#8203;naorpeled](https://togithub.com/naorpeled) in [https://github.com/middyjs/middy/pull/1131](https://togithub.com/middyjs/middy/pull/1131)
-   fix: don't throw error for non http event by [@&#8203;robertbeal](https://togithub.com/robertbeal) in [https://github.com/middyjs/middy/pull/1133](https://togithub.com/middyjs/middy/pull/1133)

#### New Contributors

-   [@&#8203;mju-spyrosoft](https://togithub.com/mju-spyrosoft) made their first contribution in [https://github.com/middyjs/middy/pull/1029](https://togithub.com/middyjs/middy/pull/1029)
-   [@&#8203;michael-k](https://togithub.com/michael-k) made their first contribution in [https://github.com/middyjs/middy/pull/1110](https://togithub.com/middyjs/middy/pull/1110)
-   [@&#8203;qoomon](https://togithub.com/qoomon) made their first contribution in [https://github.com/middyjs/middy/pull/1117](https://togithub.com/middyjs/middy/pull/1117)
-   [@&#8203;RodneyMarsh](https://togithub.com/RodneyMarsh) made their first contribution in [https://github.com/middyjs/middy/pull/1124](https://togithub.com/middyjs/middy/pull/1124)
-   [@&#8203;robertbeal](https://togithub.com/robertbeal) made their first contribution in [https://github.com/middyjs/middy/pull/1133](https://togithub.com/middyjs/middy/pull/1133)

Big tanks to everyone who made this release possible!

**Full Changelog**: middyjs/middy@4.7.0...5.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/SvenKirschbaum/aws-utils).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants