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(server): allow async bypass function for proxying #2696

Merged
merged 1 commit into from
Aug 17, 2020
Merged

feat(server): allow async bypass function for proxying #2696

merged 1 commit into from
Aug 17, 2020

Conversation

gromo
Copy link

@gromo gromo commented Aug 6, 2020

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes

Motivation / Use-Case

Currently result of bypass function is used immediately and there is no way to make it asynchronous. This update allows returning Promise from bypass function in proxy.

It can be useful for downloading content from original source and "patching" it, instead of storing the whole response.

Breaking Changes

No

Additional Info

@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

Merging #2696 into v4 will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##               v4    #2696   +/-   ##
=======================================
  Coverage   92.85%   92.85%           
=======================================
  Files          37       37           
  Lines        1316     1316           
  Branches      354      354           
=======================================
  Hits         1222     1222           
  Misses         89       89           
  Partials        5        5           
Impacted Files Coverage Δ
lib/Server.js 95.98% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bbd36f...ca7c749. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiroppy
Copy link
Member

hiroppy commented Aug 17, 2020

Thanks

@hiroppy hiroppy merged commit a2907a8 into webpack:v4 Aug 17, 2020
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.

3 participants