nitro
nitro copied to clipboard
fix(aws-lambda): fix normalizeIncomingHeaders
π Linked issue
resolve #333
β Type of change
- [ ] π Documentation (updates to the documentation or readme)
- [x] π Bug fix (a non-breaking change that fixes an issue)
- [ ] π Enhancement (improving an existing functionality like performance)
- [ ] β¨ New feature (a non-breaking change that adds functionality)
- [ ] β οΈ Breaking change (fix or feature that would cause existing functionality to change)
π Description
Hi this PR aims to fix the normalizeIncomingHeaders
function from the aws-lambda preset. Some of us might test the build through aws API Gateway service which don't send any headers by default (null). The changes are just making the headers
param possibly undefined and send an empty object to Object.entries
if headers
is null or undefined
π Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Codecov Report
Merging #418 (76133e8) into main (801bc28) will increase coverage by
0.25%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #418 +/- ##
==========================================
+ Coverage 55.96% 56.21% +0.25%
==========================================
Files 54 54
Lines 3472 3467 -5
Branches 364 366 +2
==========================================
+ Hits 1943 1949 +6
+ Misses 1178 1165 -13
- Partials 351 353 +2
Impacted Files | Coverage Ξ | |
---|---|---|
src/rollup/plugins/handlers.ts | 61.90% <ΓΈ> (+22.61%) |
:arrow_up: |
src/nitro.ts | 79.22% <0.00%> (-6.08%) |
:arrow_down: |
src/imports.ts | 89.47% <0.00%> (-5.77%) |
:arrow_down: |
src/presets/netlify.ts | 24.41% <0.00%> (-3.76%) |
:arrow_down: |
src/dirs.ts | 44.44% <0.00%> (ΓΈ) |
|
src/utils/index.ts | 24.34% <0.00%> (ΓΈ) |
|
src/prerender.ts | 67.34% <0.00%> (+0.91%) |
:arrow_up: |
src/options.ts | 86.91% <0.00%> (+0.97%) |
:arrow_up: |
src/scan.ts | 43.02% <0.00%> (+3.54%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Thanks