diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index fd160e5..0000000 --- a/.github/semantic.yml +++ /dev/null @@ -1 +0,0 @@ -titleOnly: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92aaa79..64c2d6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: | diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml new file mode 100644 index 0000000..33bcc6e --- /dev/null +++ b/.github/workflows/validate_pr.yml @@ -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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e7d5d..9c0896f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 + +- Upgrade `dio` to `5.0.0` + ## 0.1.0 - Upgrade `dio` and `test` diff --git a/pubspec.yaml b/pubspec.yaml index 4118487..c53c9b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 @@ -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 diff --git a/test/charlatan_http_request_test.dart b/test/charlatan_http_request_test.dart index 0061fd7..4d633b0 100644 --- a/test/charlatan_http_request_test.dart +++ b/test/charlatan_http_request_test.dart @@ -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', () { diff --git a/tool/generate_code_coverage.sh b/tool/generate_code_coverage.sh index 034d9bd..3bebaa9 100755 --- a/tool/generate_code_coverage.sh +++ b/tool/generate_code_coverage.sh @@ -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