Skip to content

feat: normalize route options and shortcuts - #583

Merged
pi0 merged 7 commits into
mainfrom
refactor/normalize-rules
Oct 15, 2022
Merged

feat: normalize route options and shortcuts#583
pi0 merged 7 commits into
mainfrom
refactor/normalize-rules

Conversation

@pi0

@pi0pi0 commented Oct 15, 2022

Copy link
Copy Markdown
Member

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

Comment threadsrc/options.ts Outdated
Co-authored-by: Daniel Roe <daniel@roe.dev>
@codecov

codecovBot commented Oct 15, 2022

Copy link
Copy Markdown

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 FilesCoverage Δ
src/options.ts85.07% <83.72%> (-0.33%)⬇️
src/presets/netlify.ts53.67% <92.30%> (-2.67%)⬇️
src/presets/vercel.ts64.46% <94.11%> (-3.72%)⬇️
src/types/nitro.ts100.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.

@pi0pi0 changed the title refactor: normalize cors route options to header optionsrefactor: normalize route options before passing to runtimeOct 15, 2022
@pi0pi0 changed the title refactor: normalize route options before passing to runtimerefactor: normalize route options and shortcutsOct 15, 2022
@pi0pi0 changed the title refactor: normalize route options and shortcutsfeat: normalize route options and shortcutsOct 15, 2022
@pi0
pi0 merged commit 3b7dc3f into mainOct 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 freeto 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

@pi0@danielroe