Releases: middyjs/middy
Releases · middyjs/middy
3.2.1
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
- @harish-lifex made their first contribution in #885
- @otahontas made their first contribution in #888
Full Changelog: 3.2.0...3.2.1
3.2.0
3.1.1
What's Changed
- Add in
module
to package.json files @willfarrell - performance improvements @willfarrell
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
- @shaikatz made their first contribution in #868
- @AlessandroVol23 made their first contribution in #875
- @zvictor made their first contribution in #879
- @ElMarmos made their first contribution in #882
Full Changelog: 3.1.0...3.1.1
3.1.0
What's Changed
- fix: export route and method for middy http router by @mihilmy in #851
- fix(type): add
handler
in theMiddyfiedHandler
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
foruriResolver
by default @willfarrell
New Contributors
- @mihilmy made their first contribution in #851
- @lucduong made their first contribution in #854
- @domengabrovsek made their first contribution in #855
- @Puppo made their first contribution in #856
- @nick-zh made their first contribution in #865
- @vinceniko made their first contribution in #861
Full Changelog: 3.0.4...3.1.0
3.0.4
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
- @gaston-flores made their first contribution in #842
- @tzkz made their first contribution in #845
- @aisamu made their first contribution in #846
- @ifeltsweet made their first contribution in #844
Full Changelog: 3.0.3...3.0.4
3.0.3
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
toexports.default
for CommonJS.require('@middy/core')
should now work as expected - Improved treeshaking for `http-urlencod-body-parser
New Contributors
- @A-ndy-git made their first contribution in #840
Full Changelog: 3.0.2...3.0.3
3.0.2
3.0.1
3.0.0
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
- Added
util
getInternal
error now includescause
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 matchafter
- 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
- If you only use
- Deprecate
applyMiddleware()
and__middlewares
- The order
util
normalizeHttpResponse
now takesrequest
and mutates responsegetCache
will return{}
instead ofundefined
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
toutf-8
withinhttp-multipart-body-parser
- Renamed
default
option todefaultContentType
to improve maintainability inhttp-response-serializer
- Deprecate
expectCt
inhttp-security-headers
sqs-partial-batch-failure
completely rewritten- Renamed
default
option todefaultContentType
http-response-serializer
normalizeHttpResponse
now takesrequest
and mutates response- Change where errors are stored, from
request.error.details
torequest.error.cause
invalidator
Removed
s3-key-normalizer
in favour ofevent-normalizer
sqs-json-body-parser
in favour ofevent-normalizer
Maintenance
- Better error reporting when dealing with Promise arrays
Full Changelog: 2.5.7...3.0.0
2.5.7
Fix publishing transpiling error in 2.5.6
. Thanks to @maximepichou and @rreubenreyes for reporting.