Skip to content

feat: async pathRewrite#397

Merged
chimurai merged 8 commits into
chimurai:masterfrom
rsethc:master
Feb 14, 2020
Merged

feat: async pathRewrite#397
chimurai merged 8 commits into
chimurai:masterfrom
rsethc:master

Conversation

@rsethc

@rsethc rsethc commented Feb 13, 2020

Copy link
Copy Markdown
Contributor

Related issue: #374

@ghost

ghost commented Feb 13, 2020

Copy link
Copy Markdown

DeepCode's analysis on #478d9b found:

  • 0 critical issues. ⚠️ 0 warnings and 1 minor issue. ✔️ 0 issues were fixed.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@coveralls

coveralls commented Feb 13, 2020

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 87.778% when pulling 478d9bb on rsethc:master into 483911a on chimurai:master.

@rsethc
rsethc requested a review from chimurai February 13, 2020 21:54
@chimurai

chimurai commented Feb 13, 2020

Copy link
Copy Markdown
Owner

Nice. Looks good.

The following needs to be in place before this PR can be accepted:

  • Updated documentation README.md
  • unit test(s) for pathRewriter
  • unit test types.spec.ts (testing for the async syntax)

You can have a look at:
Similar PR, but for async router: https://github.com/chimurai/http-proxy-middleware/pull/379/files

Unit tests for path rewriter:
https://github.com/chimurai/http-proxy-middleware/blob/master/test/unit/path-rewriter.spec.ts

Types test:
https://github.com/chimurai/http-proxy-middleware/blob/master/test/types.spec.ts
example of async router: https://github.com/chimurai/http-proxy-middleware/blob/master/test/types.spec.ts#L74

@rsethc

rsethc commented Feb 13, 2020

Copy link
Copy Markdown
Contributor Author

Alright, I'll take a look at solving these requirements. Thanks

@rsethc

rsethc commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

I think this is ready to have another look. One change I made by accident affected the yarn.lock file, let me know if it's preferable to add a commit that undoes that.

@chimurai

Copy link
Copy Markdown
Owner

Yes, please undo the changes to yarn.lock

I'll checkout the PR to do some additional testing.

@chimurai chimurai changed the title Allow the path rewriter function to be async. feat: async pathRewrite Feb 14, 2020
@chimurai
chimurai merged commit 7c2c31f into chimurai:master Feb 14, 2020
@chimurai

Copy link
Copy Markdown
Owner

Thanks!

Published a new beta version

You can install it with:
npm install http-proxy-middleware@beta or npm install http-proxy-middleware@0.21.0-beta.3

Let me know if everything still works. I'll publish a final shortly after confirmation.

@rsethc

rsethc commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

Thanks, I'll try out this version and let you know if anything goes wrong.

@rsethc

rsethc commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

The "http-proxy-middleware@0.21.0-beta.3" seems to work as expected in what I'm working on.

@chimurai

Copy link
Copy Markdown
Owner

published final version: http-proxy-middleware@0.21.0

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.

Handle async pathRewrite function

3 participants