From 6ad7313b2691c862730cf4007e315bfddd0ae398 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Tue, 26 Mar 2024 10:22:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=91=B7=20Make=20issue=20access=20chec?= =?UTF-8?q?k=20valid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check_issues_access.yml | 31 ++++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check_issues_access.yml b/.github/workflows/check_issues_access.yml index 584a1d5c2..98cc49803 100644 --- a/.github/workflows/check_issues_access.yml +++ b/.github/workflows/check_issues_access.yml @@ -3,29 +3,36 @@ name: Check issues access on: issues: - types: [ opened, reopened ] + types: [ opened, reopened, edited ] jobs: verify_access: runs-on: ubuntu-latest if: ${{ join(github.event.issue.labels) == '' || contains(github.event.issue.labels.*.name, 'infra')}} steps: - - uses: actions-cool/check-user-permission@v2 - id: checkIfUserHasWriteAccess + - uses: actions-cool/check-user-permission@v2.2.1 + id: checkUser with: require: 'write' - - name: Close issues if no access - if: steps.checkIfUserHasWriteAccess.outputs.check-result == false - uses: actions-cool/issues-helper@v2.1.2 - with: - actions: 'close-issue' - issue-number: ${{ github.event.issue.number }} - name: Write comment - if: steps.checkIfUserHasWriteAccess.outputs.check-result == false - uses: actions-cool/issues-helper@v2.1.2 + if: steps.checkUser.outputs.require-result == 'false' + uses: actions-cool/issues-helper@v3.6.0 with: actions: 'create-comment' issue-number: ${{ github.event.issue.number }} body: | - @${{ github.event.issue.user.login }} Infra and blank issues are only available for moderators. You're apperantly using the wrong issue template. + @${{ github.event.issue.user.login }} Infra and blank issues are only available for moderators. You're apparently using the wrong issue template. > Infra 和空白 issue 仅供管理人员使用,请选择其他 issue 模板创建 issue。 + - name: Close issue + if: steps.checkUser.outputs.require-result == 'false' + uses: actions-cool/issues-helper@v3.6.0 + with: + actions: 'close-issue' + issue-number: ${{ github.event.issue.number }} + - name: Lock issue + if: steps.checkUser.outputs.require-result == 'false' + uses: actions-cool/issues-helper@v3.6.0 + with: + actions: 'lock-issue' + issue-number: ${{ github.event.issue.number }} + lock-reason: 'off-topic' From 5fdf910b91dd4aa93398775e94dc54f43b214f94 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Tue, 26 Mar 2024 10:28:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=A7=20Depends=20`dio=5Ftest`=20fro?= =?UTF-8?q?m=20`any`=20source=20(#2160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let Melos decide where it should be overridden. Signed-off-by: Alex Li --- dio/pubspec.yaml | 8 ++++++-- dio_test/LICENSE | 21 +++++++++++++++++++++ dio_test/README.md | 27 +++++++++++++++++++++++++++ dio_test/pubspec.yaml | 9 ++++++--- plugins/http2_adapter/pubspec.yaml | 10 +++++++--- 5 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 dio_test/LICENSE create mode 100644 dio_test/README.md diff --git a/dio/pubspec.yaml b/dio/pubspec.yaml index 130533422..1eedacd38 100644 --- a/dio/pubspec.yaml +++ b/dio/pubspec.yaml @@ -28,9 +28,13 @@ dependencies: dev_dependencies: lints: any test: ^1.5.1 + build_runner: any coverage: ^1.0.3 crypto: ^3.0.2 mockito: ^5.2.0 - build_runner: any + + # Shared test package. dio_test: - path: ../dio_test + git: + url: https://github.com/cfug/dio + path: dio_test diff --git a/dio_test/LICENSE b/dio_test/LICENSE new file mode 100644 index 000000000..133bc0721 --- /dev/null +++ b/dio_test/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 The CFUG Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dio_test/README.md b/dio_test/README.md new file mode 100644 index 000000000..96446bdc0 --- /dev/null +++ b/dio_test/README.md @@ -0,0 +1,27 @@ +# Dio shared test package + +The package gathered shared tests between Dio's packages, +such as `dio` and `http2_adapter`. + +The package was meant to not be published to pub.dev. +To use the package in tests, make the library depend like this: + +```yaml +dev_dependencies: + # Shared test package. + dio_test: + git: + url: https://github.com/cfug/dio + path: dio_test +``` + +Then, use `dependency_overrides` or `pubspec_overrides.yaml` +to override the package to a local path or somewhere else. + +## Copyright & License + +The project is authored by +[Chinese Flutter User Group (@cfug)](https://github.com/cfug) +since 2024. + +The project consents [the MIT license](LICENSE). diff --git a/dio_test/pubspec.yaml b/dio_test/pubspec.yaml index ac3cdc8a6..67ab9b5eb 100644 --- a/dio_test/pubspec.yaml +++ b/dio_test/pubspec.yaml @@ -1,12 +1,15 @@ name: dio_test version: 1.0.0 - publish_to: none +homepage: https://github.com/cfug/dio +repository: https://github.com/cfug/dio/blob/main/dio_test +issue_tracker: https://github.com/cfug/dio/issues environment: sdk: '>=2.15.0 <4.0.0' dependencies: - dio: - path: ../dio + dio: any + +dev_dependencies: test: ^1.5.1 diff --git a/plugins/http2_adapter/pubspec.yaml b/plugins/http2_adapter/pubspec.yaml index a5451711b..037b05eee 100644 --- a/plugins/http2_adapter/pubspec.yaml +++ b/plugins/http2_adapter/pubspec.yaml @@ -15,14 +15,18 @@ environment: sdk: ">=3.0.0 <4.0.0" dependencies: + dio: ^5.2.0 http2: ^2.1.0 meta: ^1.9.1 - dio: ^5.2.0 dev_dependencies: - crypto: ^3.0.2 lints: any test: ^1.16.4 + crypto: ^3.0.2 path: ^1.8.0 + + # Shared test package. dio_test: - path: ../../dio_test + git: + url: https://github.com/cfug/dio + path: dio_test From 9c51b1e8a5c81eda107d5f1f4224029a1eb7ee08 Mon Sep 17 00:00:00 2001 From: cfug-dev <47591151+cfug-dev@users.noreply.github.com> Date: Tue, 26 Mar 2024 02:30:29 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=96=20http2=5Fadapter=20v2.5.1=20T?= =?UTF-8?q?riggered=20by=20@AlexV525=20on=20https://github.com/cfug/dio/is?= =?UTF-8?q?sues/1633#issuecomment-2019272962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/http2_adapter/CHANGELOG.md | 4 ++++ plugins/http2_adapter/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/http2_adapter/CHANGELOG.md b/plugins/http2_adapter/CHANGELOG.md index eda9545b1..bb2d4ad01 100644 --- a/plugins/http2_adapter/CHANGELOG.md +++ b/plugins/http2_adapter/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +*None.* + +## 2.5.1 + - Wrap `SocketException` in `DioExceptionType.connectionError` instead of `DioExceptionType.unknown`. diff --git a/plugins/http2_adapter/pubspec.yaml b/plugins/http2_adapter/pubspec.yaml index 037b05eee..c60c6a786 100644 --- a/plugins/http2_adapter/pubspec.yaml +++ b/plugins/http2_adapter/pubspec.yaml @@ -1,5 +1,5 @@ name: dio_http2_adapter -version: 2.5.0 +version: 2.5.1 description: An adapter that combines HTTP/2 and dio. Supports reusing connections, header compression, etc. topics: From 94cd530d7323790c30d053e2107f3121bd74356d Mon Sep 17 00:00:00 2001 From: cfug-dev <47591151+cfug-dev@users.noreply.github.com> Date: Tue, 26 Mar 2024 02:30:39 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=96=20dio=20v5.4.2=20Triggered=20b?= =?UTF-8?q?y=20@AlexV525=20on=20https://github.com/cfug/dio/issues/1633#is?= =?UTF-8?q?suecomment-2019272962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/CHANGELOG.md | 4 ++++ dio/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index de1f93155..eaaea9dee 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -5,6 +5,10 @@ See the [Migration Guide][] for the complete breaking changes list.** ## Unreleased +*None.* + +## 5.4.2 + - Fix `receiveTimeout` throws exception after the request has been cancelled. - Catch sync/async exceptions in interceptors' handlers. - Throws precise `StateError` for handler's duplicated calls. diff --git a/dio/pubspec.yaml b/dio/pubspec.yaml index 1eedacd38..bc80664b4 100644 --- a/dio/pubspec.yaml +++ b/dio/pubspec.yaml @@ -1,5 +1,5 @@ name: dio -version: 5.4.1 +version: 5.4.2 description: | A powerful HTTP networking package,