Skip to content

Commit

Permalink
chore: upgrade dio to 5.0.0 (#22)
Browse files Browse the repository at this point in the history
* chore: upgrade dio to 5.0.0

* add to CHANGELOG and bump version in pubspec

* fix tool/generate_code_coverage.sh

* upgrade actions

* add back test randomization

* replace semantic PR tooling
  • Loading branch information
btrautmann authored Feb 16, 2023
1 parent 2302461 commit 4a8b5bc
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/semantic.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.5
- uses: dart-lang/setup-dart@v1.3
- uses: actions/checkout@v3.3.0
- uses: dart-lang/setup-dart@v1.4

- name: Install dependencies
run: dart pub get
Expand All @@ -39,8 +39,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.5
- uses: dart-lang/setup-dart@v1.3
- uses: actions/checkout@v3.3.0
- uses: dart-lang/setup-dart@v1.4

- name: Install dependencies
run: |
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Semantic PR

on: [pull_request]

permissions:
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v4.6.0
with:
types:
feat
fix
docs
style
refactor
test
ci
chore
validateSingleCommit: true
env:
GITHUB_TOKEN: ${{ github.token }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0

- Upgrade `dio` to `5.0.0`

## 0.1.0

- Upgrade `dio` and `test`
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: charlatan
description: A library for configuring and providing fake HTTP responses to your dio HTTP client.
version: 0.1.0
version: 0.2.0
homepage: https://github.com/Betterment/charlatan
repository: https://github.com/Betterment/charlatan

Expand All @@ -9,7 +9,7 @@ environment:

dependencies:
collection: ^1.15.0
dio: ^4.0.4
dio: ^5.0.0
meta: ^1.7.0
uri: ^1.0.0

Expand Down
5 changes: 1 addition & 4 deletions test/charlatan_http_request_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ void main() {
requestOptions: requestOptions,
);

expect(subject.headers, {
...headers,
'content-type': 'application/json; charset=utf-8',
});
expect(subject.headers, {...headers});
});

test('it proxies the query parameters from the request options', () {
Expand Down
2 changes: 1 addition & 1 deletion tool/generate_code_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -o pipefail
dart pub global activate coverage

# Run tests and generate lcov
dart test --test-randomize-ordering-seed=random --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib
dart test --test-randomize-ordering-seed=random --coverage=coverage && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib

0 comments on commit 4a8b5bc

Please sign in to comment.