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

feat: normalize route options and shortcuts #583

Merged
merged 7 commits into from
Oct 15, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 15, 2022

Context: #538

By normalizing route options, we can support more shortcuts and also avoid duplicate logic per vendor for native support.

This PR normalizes 3 shortcuts:

Also fixes some issues with netlify and vercel generated rules

src/options.ts Outdated Show resolved Hide resolved
Co-authored-by: Daniel Roe <daniel@roe.dev>
@codecov
Copy link

codecov bot commented Oct 15, 2022

Codecov Report

Merging #583 (014f5e0) into main (d5fa627) will increase coverage by 0.09%.
The diff coverage is 90.52%.

❗ Current head 014f5e0 differs from pull request most recent head dc97adc. Consider uploading reports for the commit dc97adc to get more accurate results

@@            Coverage Diff             @@
##             main     #583      +/-   ##
==========================================
+ Coverage   66.01%   66.11%   +0.09%     
==========================================
  Files          55       55              
  Lines        4061     4099      +38     
  Branches      439      439              
==========================================
+ Hits         2681     2710      +29     
- Misses       1376     1385       +9     
  Partials        4        4              
Impacted Files Coverage Δ
src/options.ts 85.07% <83.72%> (-0.33%) ⬇️
src/presets/netlify.ts 53.67% <92.30%> (-2.67%) ⬇️
src/presets/vercel.ts 64.46% <94.11%> (-3.72%) ⬇️
src/types/nitro.ts 100.00% <100.00%> (ø)

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

@pi0 pi0 changed the title refactor: normalize cors route options to header options refactor: normalize route options before passing to runtime Oct 15, 2022
@pi0 pi0 changed the title refactor: normalize route options before passing to runtime refactor: normalize route options and shortcuts Oct 15, 2022
@pi0 pi0 changed the title refactor: normalize route options and shortcuts feat: normalize route options and shortcuts Oct 15, 2022
@pi0 pi0 merged commit 3b7dc3f into main Oct 15, 2022
@pi0 pi0 deleted the refactor/normalize-rules branch October 15, 2022 16:27
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.

2 participants