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(aws-lambda): fix normalizeIncomingHeaders #418

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

huang-julien
Copy link
Contributor

πŸ”— Linked issue

resolve #333

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #418 (76133e8) into main (801bc28) will increase coverage by 0.25%.
The diff coverage is n/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%) ⬆️
src/nitro.ts 79.22% <0.00%> (-6.08%) ⬇️
src/imports.ts 89.47% <0.00%> (-5.77%) ⬇️
src/presets/netlify.ts 24.41% <0.00%> (-3.76%) ⬇️
src/dirs.ts 44.44% <0.00%> (ΓΈ)
src/utils/index.ts 24.34% <0.00%> (ΓΈ)
src/prerender.ts 67.34% <0.00%> (+0.91%) ⬆️
src/options.ts 86.91% <0.00%> (+0.97%) ⬆️
src/scan.ts 43.02% <0.00%> (+3.54%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danielroe danielroe requested a review from pi0 August 23, 2022 14:48
@pi0 pi0 merged commit 75fbb23 into unjs:main Aug 24, 2022
@pi0
Copy link
Member

pi0 commented Aug 24, 2022

Thanks

WinterYukky pushed a commit to WinterYukky/nitro that referenced this pull request Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-lambda Cannot convert undefined or null to object
3 participants