Skip to content

Commit 29a6477

Browse files
author
marsavar
committed
feat: v1.0.0
1 parent d13fe15 commit 29a6477

12 files changed

Lines changed: 1417 additions & 747 deletions

File tree

.github/workflows/check-test-and-lint.yaml

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,49 @@ name: Check, Test and Lint
99

1010
jobs:
1111
check:
12-
name: Check
13-
runs-on: ubuntu-latest
12+
name: Check ${{ matrix.os }}, ${{ matrix.rust }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest]
18+
rust: [stable, 1.82.0, nightly]
19+
1420
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions-rs/toolchain@v1
17-
with:
18-
profile: minimal
19-
toolchain: stable
20-
override: true
21-
- uses: actions-rs/cargo@v1
21+
- uses: actions/checkout@v4
22+
- uses: dtolnay/rust-toolchain@master
2223
with:
23-
command: check
24+
toolchain: ${{ matrix.rust }}
25+
- run: cargo check
2426

2527
test:
26-
name: Test Suite
27-
runs-on: ubuntu-latest
28+
name: Test Suite ${{ matrix.os }}, ${{ matrix.rust }}
29+
runs-on: ${{ matrix.os }}
2830
steps:
29-
- uses: actions/checkout@v2
30-
- uses: actions-rs/toolchain@v1
31-
with:
32-
profile: minimal
33-
toolchain: stable
34-
override: true
35-
- uses: actions-rs/cargo@v1
31+
- uses: actions/checkout@v4
32+
- uses: dtolnay/rust-toolchain@master
3633
with:
37-
command: test
34+
toolchain: ${{ matrix.rust }}
35+
- run: cargo test
3836

3937
fmt:
40-
name: Rustfmt
41-
runs-on: ubuntu-latest
38+
name: Rustfmt ${{ matrix.os }}, ${{ matrix.rust }}
39+
runs-on: ${{ matrix.os }}
4240
steps:
43-
- uses: actions/checkout@v2
44-
- uses: actions-rs/toolchain@v1
41+
- uses: actions/checkout@v4
42+
- uses: dtolnay/rust-toolchain@master
4543
with:
46-
profile: minimal
47-
toolchain: stable
48-
override: true
49-
- run: rustup component add rustfmt
50-
- uses: actions-rs/cargo@v1
51-
with:
52-
command: fmt
53-
args: --all -- --check
44+
toolchain: ${{ matrix.rust }}
45+
components: rustfmt
46+
- run: cargo fmt --all -- --check
5447

5548
clippy:
56-
name: Clippy
57-
runs-on: ubuntu-latest
49+
name: Clippy ${{ matrix.os }}, ${{ matrix.rust }}
50+
runs-on: ${{ matrix.os }}
5851
steps:
59-
- uses: actions/checkout@v2
60-
- uses: actions-rs/toolchain@v1
52+
- uses: actions/checkout@v4
53+
- uses: dtolnay/rust-toolchain@master
6154
with:
62-
toolchain: stable
55+
toolchain: ${{ matrix.rust }}
6356
components: clippy
64-
override: true
65-
- uses: actions-rs/clippy-check@v1
66-
with:
67-
token: ${{ secrets.GITHUB_TOKEN }}
68-
args: --all-features
69-
name: Clippy Output
57+
- run: cargo clippy -- -D warnings

.github/workflows/publish-crate.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ on:
33
branches:
44
- main
55
paths:
6-
- 'src/**'
7-
- '**/Cargo.lock'
8-
- '**/Cargo.toml'
9-
6+
- "src/**"
7+
- "**/Cargo.lock"
8+
- "**/Cargo.toml"
9+
1010
name: Publish crate
1111

1212
jobs:
@@ -16,11 +16,10 @@ jobs:
1616
PROJECT_NAME: aletheia
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions-rs/toolchain@v1
19+
- uses: actions/checkout@v4
20+
- uses: dtolnay/rust-toolchain@master
2121
with:
2222
toolchain: stable
23-
override: true
24-
- uses: katyo/publish-crates@v1
23+
- uses: katyo/publish-crates@v2
2524
with:
26-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
25+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55

6+
## [1.0.0] - 2025-07-02
7+
8+
### Changed
9+
- [**BREAKING CHANGE**] `GuardianContentClient` no longer needs to be mutable. To account for this change, requests must be built with the `.build_request()` method to be called on the client. An example can be found in the `README.md` file.
10+
The motivation for this change is to be able to share the client between multiple threads without resorting to synchronisation primitives.
11+
- The client no longer prints to stderr if the Guardian Content API responds with an error. The client now returns an `Error` variant depending on the type of error, so that downstream consumers can deal with the errors as they wish.
12+
- Upgraded several dependencies
13+
14+
### Added
15+
Added MSRV to the project
16+
17+
### Fixed
18+
- The `pages` field in the `SearchResponse` struct is now of type `Option<isize>` (previously `Option<u32>`) to account for the API responding with `-1` when setting the page size to `0` on the client.
19+
20+
621
## [0.1.6] - 2022-12-28
722

823
### Added

0 commit comments

Comments
 (0)