Skip to content

Releases: middyjs/middy

3.2.1

21 Aug 16:41
b4169ec
Compare
Choose a tag to compare

What's Changed

  • Update http-response-serializer default option to defaultContentType by @harish-lifex in #885
  • Improve typings for security-headers middleware by @otahontas in #888

New Contributors

Full Changelog: 3.2.0...3.2.1

3.2.0

13 Aug 04:07
ac46270
Compare
Choose a tag to compare

What's Changed

TypeScript

  • feat: self-composing UseFN (multiple middleware) by @vicary in #883

New Contributors

Full Changelog: 3.1.1...3.2.0

3.1.1

04 Aug 21:21
d53fc91
Compare
Choose a tag to compare

What's Changed

TypeScript

Docs

  • Change GitHub link in documentation from docusaurus to middy by @AlessandroVol23 in #875
  • [docs][@middy/validator] Add missing type "object" by @zvictor in #879
  • update website's validator middleware docs by @ElMarmos in #882

New Contributors

Full Changelog: 3.1.0...3.1.1

3.1.0

21 Jun 15:24
d5284fd
Compare
Choose a tag to compare

What's Changed

  • fix: export route and method for middy http router by @mihilmy in #851
  • fix(type): add handler in the MiddyfiedHandler by @lucduong in #854
  • fixed typo in documentation by @domengabrovsek in #855
  • feat: improve ws-router types by @Puppo in #856
  • docs: fix ws-router documentation by @Puppo in #858
  • docs: improvement by @Puppo in #860
  • feat: improve s3 object response options by @Puppo in #859
  • docs: remove payloadFormatVersion option in @middy/http-event-normalizer by @Puppo in #863
  • fix filename and mimetype by @nick-zh in #865
  • Fix TS Error in httpRouterHandler & wsRouterHandler by @vinceniko in #861
  • Packages now use export notation supported by TypeScript 4.7+ @Puppo
  • @middy/event-normalizer now faster and supports wrapNumbers option for dynamodb events @willfarrell
  • @middy/validator uses fast-uri for uriResolver by default @willfarrell

New Contributors

Full Changelog: 3.0.4...3.1.0

3.0.4

04 Jun 21:43
3e9bc83
Compare
Choose a tag to compare

What's Changed

  • docs: fix handler typo by @gaston-flores in #842
  • fix(http-error-handler): type error in 'logger' option by @tzkz in #845
  • fix(http-response-serializer): type typo by @aisamu in #846
  • fix(http-response-serializer): add type for full-response serializers by @aisamu in #847
  • docs: aws-sdk exclusion while bundling @ifeltsweet #844

New Contributors

Full Changelog: 3.0.3...3.0.4

3.0.3

17 May 02:39
ea9e5e8
Compare
Choose a tag to compare

What's Changed

  • New website using Docosaurus by @lmammino in #806
  • feat(packages/http-router): adding typings and tests by @A-ndy-git in #840
  • Fix transpiler error where it was mapping export default to exports.default for CommonJS. require('@middy/core') should now work as expected
  • Improved treeshaking for `http-urlencod-body-parser

New Contributors

Full Changelog: 3.0.2...3.0.3

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.