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

Merge main into 6.0.0 #1951

Merged
merged 62 commits into from
Sep 8, 2023
Merged

Merge main into 6.0.0 #1951

merged 62 commits into from
Sep 8, 2023

Conversation

kuhnroyal
Copy link
Member

Merge main into 6.0.0

kuhnroyal and others added 30 commits May 20, 2023 18:34
Resolves cfug#1843.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [ ] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

Apparently, the previous tips are not obvious enough.

---------

Signed-off-by: Alex Li <[email protected]>
)

* revert mockito version and mocks

This PR just reverts some recent changes to mocks which are not
supported on Dart 2.15 and cause some CI tests to fail.
The test failures have gone unnoticed due to all the noise around
httpbin not working.

When merging this change to the 6.0.0 branch, we need to make sure to
skip this.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package
<!-- Write down your pull request descriptions. -->

Part of cfug#1835 

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [ ] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->

---------

Co-authored-by: Jonas Uekötter <[email protected]>
Fixes cfug#1845

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
Migrate the release action from `v1` to `v2`.

Signed-off-by: Alex Li <[email protected]>
I've been trying to set connectionTimeout and receiveTimeout for my http
requests on chrome, and it didn't seem to be working. After further
investigation, it seems like the request was actually being canceled
after the timeout passed, but after the cancellation nothing happened
(the request was still blocked and the completer wasn't called).

So I found out xhr has a onTimeout method, I used it and raised the
required exception and now it works just fine.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

---------

Signed-off-by: morhaviv <[email protected]>
Signed-off-by: Alex Li <[email protected]>
Signed-off-by: Peter Leibiger <[email protected]>
The deprecation message was providing a wrong hint.

Signed-off-by: Cristian Zazo <[email protected]>
A previous change to improve the performance of binary uploads
accidentally broke the functionality of uploading `List<int>` json
bodies.
Fixes cfug#1858
Signed-off-by: busslina <[email protected]>
Co-authored-by: Jonas Uekötter <[email protected]>
* restore base64 comparison in upload tests - httpbun has base64 data
now implemented
* add tests for async SocketException being thrown in the IO adapter
Resolves cfug#1880.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

---------

Signed-off-by: Alex Li <[email protected]>
…ith path (cfug#1873)

This PR ensures consistent handling of "/" when concatenating the
baseUrl with the path.
Previously, if the baseUrl had a trailing "/" or the path had a leading
"/", the resulting URL would contain duplicate slashes.
To address this issue, the algorithm has been modified to insert only a
single "/" regardless of whether the baseUrl has a trailing slash or the
path has a leading slash. This improvement enhance the reliability and
correctness of the concatenation process, providing a more robust
solution.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

---------

Signed-off-by: Jonas Uekötter <[email protected]>
Co-authored-by: Jonas Uekötter <[email protected]>
…fug#1874)

Resolves cfug#1834.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package
- Add restoration capability to MultipartFile
- Add tests to ensure MultipartFile is not changed during cloning, it
just gets a new instance that can be consumed by FormData

Possible next steps: Create method in FormData to make it
recoverable/clonable as well.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

---------

Signed-off-by: Gabriel Araujo <[email protected]>
Signed-off-by: Peter Leibiger <[email protected]>
Co-authored-by: Peter Leibiger <[email protected]>
…ain request will never success. (cfug#1896)

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

`_ConnectionManager._connect` may throw SocketException when call `await
initFuture`,if it occurs, even if the network is restored, subsequent
requests with the same domain will still obtain the cached initFuture,
and it will still fail

---------

Co-authored-by: Alex Li <[email protected]>
cfug-dev and others added 14 commits August 3, 2023 02:40
<!-- Write down your pull request descriptions. -->

- Change `SocketException on request` to be platform-independent.
- Improve the readability of `SocketException on response`.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->

Co-authored-by: Flop <[email protected]>
<!-- Write down your pull request descriptions. -->

- Optimize the `SyncTransformer.transformResponse` method and it‘s test.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
<!-- Write down your pull request descriptions. -->

- Fix typos.
- Replace the less common "asynchronized" with the more common
"asynchronous" to make the analyzer happy.
- Replace non-breaking spaces (NBSP) with a regular space.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
<!-- Write down your pull request descriptions. -->

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

fixing cfug#1911

<!-- Provide more context and info about the PR. -->
<!-- Write down your pull request descriptions. -->

- Improve tests.
- Improve usage example for `Dio.download`.
- Remove unused code.
- Fix typo in `example/lib/download_with_trunks`.
- Replace the broken resource:
http://download.dcloud.net.cn/HBuilder.9.0.2.macosx_64.dmg.
- Disable the compression to assure the value of `total` argument of
`onReceiveProgress` is not `-1` in `example/lib/download`.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->

There was no warning previously due to the default `dynamic` parameter
type.
Removes the accidentally added `options` argument for `Options.compose`
by 75cf916.

Resolves cfug#1934.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

---------

Signed-off-by: Alex Li <[email protected]>
<!-- Write down your pull request descriptions. -->



### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
<!-- Write down your pull request descriptions. -->
Test for cfug#1938

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
Add send time out and receive time for http2

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

Http2Adapter only implements connect timeout,the
`RequestOptions.sendTimeout` and `RequestOptions.receiveTimeout` not
work.

---------

Signed-off-by: sunhapper <[email protected]>
Co-authored-by: Alex Li <[email protected]>
@kuhnroyal kuhnroyal added the infra label Sep 4, 2023
@kuhnroyal kuhnroyal requested a review from a team as a code owner September 4, 2023 15:44
@kuhnroyal kuhnroyal self-assigned this Sep 4, 2023
@AlexV525
Copy link
Member

AlexV525 commented Sep 5, 2023

I'm curious: You have permission for branches, why do we create the PR instead? 😄

@kuhnroyal
Copy link
Member Author

Because I usually mess up the merges as you can see :D

@kuhnroyal
Copy link
Member Author

The failing tests seem to be unrelated.

@kuhnroyal
Copy link
Member Author

Hmm we don't actually want to squash this right... ?

@AlexV525 AlexV525 merged commit e8301d9 into cfug:6.0.0 Sep 8, 2023
29 of 31 checks passed
@AlexV525
Copy link
Member

AlexV525 commented Sep 8, 2023

Yeah and sorry for the delay I was busy participating in our I/O Connect event.

@kuhnroyal
Copy link
Member Author

But now you squashed it :D

@kuhnroyal kuhnroyal deleted the merge/main-into-6 branch September 8, 2023 11:01
@AlexV525
Copy link
Member

AlexV525 commented Sep 8, 2023

Ehh, did I? It should be a merge commit

@kuhnroyal
Copy link
Member Author

Ah right, sorry

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.