Skip to content

Releases: middyjs/middy

3.0.2

13 May 20:16
983649b
Compare
Choose a tag to compare

What's Changed

  • fix: Add missing fields to Option typescript type by @aldex32 in #831

New Contributors

Full Changelog: 3.0.1...3.0.2

3.0.1

13 May 01:46
797455e
Compare
Choose a tag to compare

What's Changed

  • Updated dependencies

Full Changelog: 3.0.0...3.0.1

3.0.0

13 May 01:00
e09a3a5
Compare
Choose a tag to compare

Checkout UPGRADE.md to see what are the main breaking changes and how to migrate to this new version if coming from 2.x.

Version 3.x of Middy no longer supports Node.js versions 12.x. You are highly encouraged to move to Node.js 16.x.
With the Node.js version change all packages are now ECMAScript Modules along side CommonJS Modules.

Notable changes

  • New WebSocket middlewares
  • HTTP & WebSocket Routers!
  • Better error handling
  • Timeout error handling
  • Errors now use { cause } for better context

Additions

  • New middleware (http-content-encoding, http-router, service-discovery, ws-json-body-parser, ws-response, ws-router)
  • core
    • Added .handler() method to allow easier understanding of the execution cycle
    • lambdaHandler can now be passed an AbortController signal
    • internal events can now be monitored using Proxy
  • util
    • getInternal error now includes cause set to an array of Errors
    • Catch when X-Ray is applied outside of handler invocation scope

Breaking Changes

  • core
    • The order onError being called is now reversed to match after
      • If you only use @middy/* middlewares no change should be required
      • If you have custom error handling middleware or other custom middleware that return response, additional testing is high recommended
    • Deprecate applyMiddleware() and __middlewares
  • util
    • normalizeHttpResponse now takes request and mutates response
    • getCache will return {} instead of undefined when not found
  • Deprecated setToEnv option from all middleware
  • Will now throw error if not an http event in http-event-normalizer
  • Change default charset from binary/latin1 to utf-8 within http-multipart-body-parser
  • Renamed default option to defaultContentType to improve maintainability in http-response-serializer
  • Deprecate expectCt in http-security-headers
  • sqs-partial-batch-failure completely rewritten
  • Renamed default option to defaultContentType http-response-serializer
  • normalizeHttpResponse now takes request and mutates response
  • Change where errors are stored, from request.error.details to request.error.cause in validator

Removed

  • s3-key-normalizer in favour of event-normalizer
  • sqs-json-body-parser in favour of event-normalizer

Maintenance

  • Better error reporting when dealing with Promise arrays

Full Changelog: 2.5.7...3.0.0

2.5.7

25 Jan 01:34
3983c4b
Compare
Choose a tag to compare

Fix publishing transpiling error in 2.5.6. Thanks to @maximepichou and @rreubenreyes for reporting.

2.5.5

16 Jan 18:29
b84840e
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.5.4...2.5.5

2.5.6

18 Jan 18:53
bb910c8
Compare
Choose a tag to compare

What's Changed

fix: add types for non-callback use case #788 @markcarroll

Full Changelog: 2.5.5...2.5.6

2.5.4

20 Dec 06:14
a4134a5
Compare
Choose a tag to compare

What's Changed

  • docs: fix typo by @nitinrathi in #752
  • Add middy-event-loop-tracer, middy-console-logger and middy-invocation plugins into README by @serkan-ozal in #753
  • Move middy-event-loop-tracer, middy-console-logger and middy-invocation middlewares into Version 2.x section in README by @serkan-ozal in #754
  • Add middy-profiler middleware into community middlewares section in README by @serkan-ozal in #755
  • Pass TContext to the onError handler definition by @jbialobr in #761
  • feat/types/remove-aws-xray-sdk-deps by @J4YF7O in #749

New Contributors

Full Changelog: 2.5.3...2.5.4

2.5.3

05 Nov 15:28
690884d
Compare
Choose a tag to compare

What's Changed

  • Fix the return value of PluginHookPromise type by @omer-to in #735
  • http-json-body-parser: Add rawBody to event by @domdomegg in #741

New Contributors

Full Changelog: 2.5.2...2.5.3

2.5.2

12 Oct 16:09
a2bb757
Compare
Choose a tag to compare

Bug Fixes

  • #725 Chunk deleteMessageBatch requests @garnertb
  • #723 http-cors not supporting API Gateway v2 @ellucianBret
  • #733 Add missing parameter for requestEnd as it is called with request object @omer-to

2.5.1

10 Aug 11:42
df18e5e
Compare
Choose a tag to compare