Skip to content

Commit 8d076dd

Browse files
chore: add update notes
Signed-off-by: Henry Gressmann <[email protected]>
1 parent 9dc8716 commit 8d076dd

File tree

7 files changed

+59
-40
lines changed

7 files changed

+59
-40
lines changed

CHANGELOG.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,27 @@ The format is roughly based on the output of `git-cliff` and this project adhere
1616
Since this is not a library, this changelog focuses on the changes that are relevant to the end-users. For a detailed list of changes, see the commit history, which adheres to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). New releases are created automatically when a new tag is pushed (Commit message: chore(release): vX.X.X).
1717
-->
1818

19-
## [Unreleased]
19+
<!-- ## [Unreleased] -->
2020

21-
- Liwan has been relicensed under the terms of the Apache-2.0 license
22-
- Updated dependencies (DuckDb 1.2)
23-
- Updated list of referrer spammers, useragents
21+
## [v1.2.0] - 2025-05-16
22+
23+
- Liwan has been relicensed under the terms of the **Apache-2.0** license (this also applies to all previous versions)
24+
- Updated to the latest version of DuckDB (1.2)
25+
- Updated list of referrer spammers, user-agents and site icons
2426
- Ellipsis for long URLs in the UI
25-
- Fixed arm64 container images
2627
- Overall performance improvements and memory usage optimizations
2728

28-
## v1.1.0 - 2024-12-28
29+
## [v1.1.1] - 2025-05-15
30+
31+
- Force duckdb to always checkpoint the database after shutting down. This is required for upgrading to the latest version of duckdb in liwan 1.2, which has issues loading the old checkpoint files when using musl libc.
32+
33+
## [v1.1.0] - 2024-12-28
2934

3035
- Improved query caching to prevent unnecessary database queries
3136
- Added Country Code to Google Referrer URLs
3237
- Improved Multi-User Support (Non-admin users can now be granted access to specific projects)
3338

34-
## v1.0.0 - 2024-12-06
39+
## [v1.0.0] - 2024-12-06
3540

3641
### 🚀 Features
3742

@@ -53,13 +58,13 @@ Since this is not a library, this changelog focuses on the changes that are rele
5358
- Removed Sessions and Average Views per Session metrics. They were not accurate and were removed to avoid confusion.
5459
- Added more tests & improved API performance ([`95d95d0`](https://github.com/explodingcamera/liwan/commit/95d95d0f4670d20a6fa4fc6a7f4b17e4b1854391))
5560

56-
## **Liwan v0.1.1** - 2024-09-24
61+
## [v0.1.1] - 2024-09-24
5762

5863
### ⚡ Performance
5964

6065
- **Database indexes**: Removed unnecessary indexes to improve performance and reduce disk usage ([`6191a72`](https://github.com/explodingcamera/liwan/commit/6191a72f08e8659237bc6c22139bde94432f66bb))
6166

62-
## **Liwan v0.1.0** - 2024-09-18
67+
## [v0.1.0] - 2024-09-18
6368

6469
This is the first full release of the Liwan! 🎉
6570
All essential features for web analytics are now available, including:

Cargo.lock

Lines changed: 33 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name="liwan"
33
version="1.2.0"
44
edition="2024"
5-
rust-version="1.86"
5+
rust-version="1.87"
66
repository="https://github.com/explodingcamera/liwan"
77
license="Apache-2.0"
88
publish=false

src/app/core/geoip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)]
22

33
use std::collections::HashMap;
4-
use std::io::{self, ErrorKind};
4+
use std::io::{self};
55
use std::net::IpAddr;
66
use std::path::{Path, PathBuf};
77
use std::sync::Arc;
@@ -208,7 +208,7 @@ async fn download_maxmind_db(edition: &str, account_id: &str, license_key: &str)
208208

209209
let client = reqwest::Client::new();
210210
let response = client.get(url).basic_auth(account_id, Some(license_key)).send().await?.error_for_status()?;
211-
let stream = response.bytes_stream().map(|b| b.map_err(|e| io::Error::new(ErrorKind::Other, e)));
211+
let stream = response.bytes_stream().map(|b| b.map_err(io::Error::other));
212212
let stream = StreamReader::new(stream);
213213
let stream = async_compression::tokio::bufread::GzipDecoder::new(stream);
214214
let mut archive = Archive::new(stream);

src/app/db.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ pub(super) fn init_duckdb(
2929
}
3030
}
3131

32-
let conn = DuckdbConnectionManager::file_with_flags(path, flags)?;
32+
let conn = DuckdbConnectionManager::file_with_flags(path, flags).map_err(|e| {
33+
tracing::warn!("Failed to create DuckDB connection. If you've just upgraded to Liwan 1.2, please downgrade to version 1.1.1 first, start and stop the server, and then upgrade to 1.2 again.");
34+
eyre::eyre!("Failed to create DuckDB connection: {}", e)
35+
})?;
36+
3337
let pool = r2d2::Pool::new(conn)?;
3438
{
3539
let conn = pool.get()?;

src/utils/useragent.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn parse(header: &str) -> UserAgent {
2626
let client = PARSER.parse(header);
2727
let uap = UserAgent {
2828
device_family: client.device.family.to_string(),
29-
os_family: client.os.family.replace("Mac OS X", "macOS").replace("Other", "Unknown").into(),
29+
os_family: client.os.family.replace("Mac OS X", "macOS").replace("Other", "Unknown"),
3030
ua_family: client.user_agent.family.to_string(),
3131
};
3232

@@ -43,7 +43,7 @@ impl UserAgent {
4343
let client = PARSER.parse(header);
4444
let uap = UserAgent {
4545
device_family: client.device.family.to_string(),
46-
os_family: client.os.family.replace("Mac OS X", "macOS").replace("Other", "Unknown").into(),
46+
os_family: client.os.family.replace("Mac OS X", "macOS").replace("Other", "Unknown"),
4747
ua_family: client.user_agent.family.to_string(),
4848
};
4949

src/web/webext.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fmt::Display, marker::PhantomData};
1+
#![allow(clippy::result_large_err)]
22

33
use poem::http::{Method, StatusCode, header};
44
use poem::web::Json;
@@ -7,6 +7,7 @@ use poem_openapi::{ApiResponse, Object};
77
use rust_embed::RustEmbed;
88
use serde::Serialize;
99
use serde_json::json;
10+
use std::{fmt::Display, marker::PhantomData};
1011

1112
pub async fn catch_error(err: poem::Error) -> impl IntoResponse {
1213
Json(json!({ "status": "error", "message": err.to_string(), "code": err.status().as_u16()}))

0 commit comments

Comments
 (0)