Skip to content

Commit 358dc0e

Browse files
authored
WhoAmI 1.5.0 Release (#94)
1 parent d6ee13e commit 358dc0e

31 files changed

+1748
-980
lines changed

.github/workflows/ci.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
toolchain: ${{ matrix.tc }}
1818
components: rustfmt, clippy
1919
override: true
20+
- run: cargo update
2021
- run: cargo fmt --check
2122
- run: cargo clippy -- -D warnings
2223
checks-cross-compile:
@@ -43,6 +44,7 @@ jobs:
4344
target: ${{ matrix.cc }}
4445
components: clippy
4546
override: true
47+
- run: cargo update
4648
- run: cargo clippy --all-features --target=${{ matrix.cc }} -- -D warnings
4749
checks-cross-compile-ios:
4850
runs-on: ${{ matrix.os }}
@@ -77,12 +79,8 @@ jobs:
7779
target: ${{ matrix.cc }}
7880
components: clippy
7981
override: true
80-
- run: cargo update -p bumpalo --precise 3.4.0
81-
- run: cargo update -p web-sys --precise 0.3.55
82-
- run: cargo update -p js-sys --precise 0.3.55
83-
- run: cargo update -p wasm-bindgen --precise 0.2.78
84-
- run: cargo update -p log --precise 0.4.17
8582
- run: cargo clippy --all-features --target=${{ matrix.cc }} -- -D warnings
83+
- run: cargo update
8684
- run: cargo clippy --no-default-features --target=${{ matrix.cc }} -- -D warnings
8785
- run: RUSTFLAGS="--cfg target_os=\"daku\"" cargo clippy --target=${{ matrix.cc }} -- -D warnings
8886
test:
@@ -111,6 +109,7 @@ jobs:
111109
profile: minimal
112110
toolchain: ${{ matrix.tc }}
113111
override: true
112+
- run: cargo update
114113
- run: cargo test --all --all-features --target=x86_64-apple-darwin
115114
cross-compile:
116115
runs-on: ${{ matrix.os }}
@@ -165,6 +164,7 @@ jobs:
165164
toolchain: ${{ matrix.tc }}
166165
target: ${{ matrix.cc }}
167166
override: true
167+
- run: cargo update
168168
- run: cargo build --all-features --target=${{ matrix.cc }}
169169
cross-compile-wasm:
170170
runs-on: ${{ matrix.os }}
@@ -181,14 +181,8 @@ jobs:
181181
toolchain: ${{ matrix.tc }}
182182
target: ${{ matrix.cc }}
183183
override: true
184-
- run: cargo update -p bumpalo --precise 3.4.0
185-
- run: cargo update -p web-sys --precise 0.3.55
186-
- run: cargo update -p js-sys --precise 0.3.55
187-
- run: cargo update -p wasm-bindgen --precise 0.2.78
188-
- run: cargo update -p log --precise 0.4.17
189-
- run: cargo update -p quote --precise 1.0.30
190-
- run: cargo update -p proc-macro2 --precise 1.0.63
191184
- run: cargo build --all-features --target=${{ matrix.cc }}
185+
- run: cargo update
192186
- run: cargo build --no-default-features --target=${{ matrix.cc }}
193187
- run: RUSTFLAGS="--cfg target_os=\"daku\"" cargo build --target=${{ matrix.cc }}
194188
cross-compile-illumos:
@@ -206,6 +200,7 @@ jobs:
206200
toolchain: ${{ matrix.tc }}
207201
target: ${{ matrix.cc }}
208202
override: true
203+
- run: cargo update
209204
- run: cargo build --all-features --target=${{ matrix.cc }}
210205
cross-compile-redox:
211206
runs-on: ${{ matrix.os }}
@@ -222,4 +217,5 @@ jobs:
222217
toolchain: ${{ matrix.tc }}
223218
target: ${{ matrix.cc }}
224219
override: true
220+
- run: cargo update
225221
- run: cargo build --all-features --target=${{ matrix.cc }}

.gitignore

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
**/target/
2-
**/*.rs.bk
3-
Cargo.lock
4-
/ignore/
5-
/a.out
1+
/**/build/
2+
/**/target/
63
/**/*.swp
7-
/build/
4+
/**/*.rs.bk

CHANGELOG.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog], and this project adheres to
55
[Semantic Versioning].
66

7-
## [1.5.0] - UNRELEASED
7+
## [1.5.0] - 2024-03-03
88

99
### Added
1010

@@ -19,27 +19,40 @@ The format is based on [Keep a Changelog], and this project adheres to
1919
- `whoami::fallible::realname_os()`
2020
- `whoami::fallible::username()`
2121
- `whoami::fallible::username_os()`
22+
- `whoami::Language`
23+
- `whoami::Country`
2224
- `whoami::langs()`
23-
- `Language`
24-
- `Country`
25+
- `whoami::fallible::account()`
26+
- `whoami::fallible::account_os()`
27+
- `whoami::DesktopEnv::is_gtk()`
28+
- `whoami::DesktopEnv::is_kde()`
2529

2630
### Removed
2731

2832
- Generated device names that infer casing based on the hostname when the
2933
device name is not available - now returns the hostname unchanged
34+
- Partial (potentially unsound) support for Android, iOS, watchOS, tvOS,
35+
Fuchsia, Haiku, Solaris, and a few others. These targets now use the "fake"
36+
implementation.
3037

3138
### Changed
3239

3340
- Deprecated `whoami::distro_os()`
3441
- Deprecated `whoami::hostname()`
3542
- Deprecated `whoami::hostname_os()`
3643
- Deprecated `whoami::lang()`
44+
- illumos and Redox are no longer untested targets
45+
- Documented that illumos and Redox have a higher MSRV (Rust 1.65) than other
46+
targets
47+
- Display implementation on `Platform::Illumos` now displays in lowercase:
48+
illumos
3749

3850
### Fixed
3951

4052
- Removed some unnecessary allocations
4153
- Rare and nearly impossible cases of undefined behavior
4254
- Better handling of UTF-8 non-conformant strings
55+
- Multiple instances of undefined behavior on illumos
4356

4457
## [1.4.1] - 2023-06-25
4558

@@ -51,7 +64,7 @@ The format is based on [Keep a Changelog], and this project adheres to
5164

5265
### Added
5366

54-
- Support for Illumos
67+
- Support for illumos
5568

5669
## [1.3.0] - 2022-12-28
5770

@@ -63,7 +76,7 @@ The format is based on [Keep a Changelog], and this project adheres to
6376
architecture
6477
- `Arch::width()` method which returns the address width of a CPU architecture
6578
- *`web`* feature (enabled by default). Disabling this feature allows you to
66-
use wasm32-unknown-unknown with whoami outside of the browser with a mock
79+
use wasm32-unknown-unknown with whoami outside of the browser with a fake
6780
implementation.
6881
- Officially support compiling to WASI or Daku WebAssembly platforms;
6982
functionality not supported yet.

Cargo.lock

+166
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "whoami"
3-
version = "1.5.0-pre.0"
3+
version = "1.5.0"
44
edition = "2018"
55
license = "Apache-2.0 OR BSL-1.0 OR MIT"
66
documentation = "https://docs.rs/whoami"
7-
homepage = "https://github.com/ardaku/whoami/blob/stable/CHANGELOG.md"
7+
homepage = "https://github.com/ardaku/whoami/blob/v1/CHANGELOG.md"
88
repository = "https://github.com/ardaku/whoami"
99
readme = "README.md"
1010
description = "Retrieve the current user and environment."
@@ -17,33 +17,30 @@ categories = [
1717
"value-formatting",
1818
]
1919
include = [
20-
"LICENSE_APACHE",
21-
"LICENSE_BOOST",
22-
"LICENSE_MIT",
23-
"README.md",
24-
"src/*",
20+
"/LICENSE_APACHE",
21+
"/LICENSE_BOOST",
22+
"/LICENSE_MIT",
23+
"/README.md",
24+
"/src/*",
2525
]
2626
rust-version = "1.40"
2727

28-
# Target specific dependencies for redox
28+
# Target specific dependency for redox
2929
[target.'cfg(all(target_os = "redox", not(target_arch = "wasm32")))'.dependencies.redox_syscall]
3030
version = "0.4"
3131

32-
# Target specific dependencies for wasite
32+
# Target specific dependency for wasite
3333
[target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dependencies.wasite]
3434
version = "0.1"
3535

36-
# Target-specific dependency for wasm-bindgen
36+
# Target-specific dependency for web browser
3737
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(target_os = "daku")))'.dependencies.web-sys]
3838
version = "0.3"
3939
features = ["Navigator", "Document", "Window", "Location"]
4040
optional = true
41-
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(target_os = "daku")))'.dependencies.wasm-bindgen]
42-
version = "0.2"
43-
optional = true
4441

4542
[features]
4643
default = ["web"]
4744
# Enabling this feature indicates that the wasm32-unknown-unknown target should
4845
# be assumed to be in a web environment where it can call DOM APIs.
49-
web = ["web-sys", "wasm-bindgen"]
46+
web = ["web-sys"]

0 commit comments

Comments
 (0)