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

replace axios with node-fetch #254

Merged
merged 9 commits into from
Nov 1, 2023
Merged

replace axios with node-fetch #254

merged 9 commits into from
Nov 1, 2023

Conversation

shanghaikid
Copy link
Contributor

@shanghaikid shanghaikid commented Oct 27, 2023

in this pr, we are using native fetch to call http request.

and user is able to use their fetch to replace the native fetch function:

    const config = {
      baseURL,
      fetch: nodeFetch,
    };
    const client = new HttpClient(config);
    expect(client.fetch).toEqual(nodeFetch);

shanghaikid and others added 3 commits October 27, 2023 08:27
Signed-off-by: ruiyi.jiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #254 (6d2b768) into main (5d805b9) will decrease coverage by 0.50%.
The diff coverage is 86.92%.

❗ Current head 6d2b768 differs from pull request most recent head 561c460. Consider uploading reports for the commit 561c460 to get more accurate results

@@            Coverage Diff             @@
##             main     #254      +/-   ##
==========================================
- Coverage   95.57%   95.08%   -0.50%     
==========================================
  Files          37       39       +2     
  Lines        1742     1831      +89     
  Branches      453      434      -19     
==========================================
+ Hits         1665     1741      +76     
- Misses         70       87      +17     
+ Partials        7        3       -4     
Files Coverage Δ
milvus/MilvusClient.ts 89.79% <100.00%> (ø)
milvus/const/defaults.ts 100.00% <100.00%> (ø)
milvus/http/Collection.ts 100.00% <100.00%> (ø)
test/tools/index.ts 100.00% <100.00%> (ø)
test/tools/ip.ts 100.00% <100.00%> (ø)
test/http/test.ts 98.27% <98.27%> (ø)
milvus/http/Vector.ts 55.00% <46.15%> (-9.71%) ⬇️
milvus/HttpClient.ts 83.63% <75.67%> (-16.37%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shanghaikid shanghaikid requested a review from nameczz October 28, 2023 07:41
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
milvus/HttpClient.ts Outdated Show resolved Hide resolved
milvus/HttpClient.ts Outdated Show resolved Hide resolved
milvus/HttpClient.ts Outdated Show resolved Hide resolved
- add fetch options for GET/SET
- update reamde

Signed-off-by: ruiyi.jiang <[email protected]>
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nameczz, shanghaikid

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shanghaikid shanghaikid merged commit 0cfbe96 into main Nov 1, 2023
2 checks passed
@shanghaikid shanghaikid deleted the fetch branch November 1, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants