Skip to content

Commit 0bc121a

Browse files
committed
v2.7.0
1 parent 3f7de1c commit 0bc121a

6 files changed

Lines changed: 39 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
otp: '27'
4141
- elixir: '1.18'
4242
otp: '28'
43+
# Elixir 1.19 RC (testing support)
44+
- elixir: '1.19.0-rc.1'
45+
otp: '26'
46+
- elixir: '1.19.0-rc.1'
47+
otp: '27'
48+
- elixir: '1.19.0-rc.1'
49+
otp: '28'
4350
steps:
4451
- uses: actions/checkout@v4
4552
- uses: erlef/setup-beam@v1

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## v2.7.0 (2025-10-18)
4+
5+
### Added
6+
- Support for Elixir 1.19
7+
- Added `:word_safe32` as new preferred atom for word-safe character set
8+
9+
### Changed
10+
- Fixed preferred_cli_env deprecation warning by moving to cli/0 function
11+
12+
### Deprecated
13+
- `:wordSafe32` atom is deprecated in favor of `:word_safe32`
14+
315
## v2.6.0 (2025-09-05)
416

517
### Add
@@ -20,7 +32,8 @@
2032
### Changes
2133

2234
- Refactored internal ERE/ETE calculations to use centralized `Puid.Chars.metrics/1` function
23-
35+
- Increased predefined charsets from 20 to 31 (11 new charsets added)
36+
- Added `:word_safe32` as the preferred name for `:wordSafe32` (backwards compatible)
2437
## v2.5.0 (2025-09-01)
2538

2639
### Add
@@ -83,7 +96,7 @@
8396

8497
- :base16
8598
- :crockford32
86-
- :wordSafe32
99+
- :word_safe32 (also accessible as :wordSafe32 for backwards compatibility)
87100

88101
### Minor
89102

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ iex> SafeId.info()
214214
| :safe64 | 64 | 6.0 | 1.0 | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-\_ |
215215
| :symbol | 28 | 4.81 | 0.89 | !#$%&()\*+,-./:;<=>?@\[\]^\_{\|}~ |
216216
| :url_safe | 66 | 6.04 | 0.63 | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.\_~ |
217-
| :wordSafe32 | 32 | 5.0 | 1.0 | 23456789CFGHJMPQRVWXcfghjmpqrvwx |
217+
| :word_safe32 | 32 | 5.0 | 1.0 | 23456789CFGHJMPQRVWXcfghjmpqrvwx |
218218
| :z_base32 | 32 | 5.0 | 1.0 | ybndrfg8ejkmcpqxot1uwisza345h769 |
219219

220220

@@ -241,8 +241,8 @@ Note: The [Metrics](#metrics) section explains ERE and ETE.
241241
| :safe32 | Alpha and numbers picked to reduce chance of English words |
242242
| :safe64 | https://datatracker.ietf.org/doc/html/rfc4648#section-5 |
243243
| :url_safe | https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 |
244-
| :wordSafe32 | Alpha and numbers picked to reduce chance of English words |
245-
| :z_base32 | Zookos Base32 |
244+
| :word_safe32 | Alpha and numbers picked to reduce chance of English words |
245+
| :z_base32 | Zooko's Base32 |
246246

247247
#### Custom
248248

@@ -342,4 +342,4 @@ The `bench/puid_ere_len.exs` script outputs a markdown table comparing the numbe
342342
| safe32 | 65.0 | 13 | | 100.0 | 20 | | 130.0 | 26 |
343343
| safe64 | 66.0 | 11 | | 96.0 | 16 | | 132.0 | 22 |
344344
| symbol | 67.3 | 14 | | 96.15 | 20 | | 129.8 | 27 |
345-
| wordSafe32 | 65.0 | 13 | | 100.0 | 20 | | 130.0 | 26 |
345+
| word_safe32 | 65.0 | 13 | | 100.0 | 20 | | 130.0 | 26 |

lib/puid/chars.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ defmodule Puid.Chars do
242242
```
243243
bits per character: `6.02`
244244
245-
### :wordSafe32
245+
### :word_safe32
246246
Strings that don't look like English words
247247
```none
248248
23456789CFGHJMPQRVWXcfghjmpqrvwx
@@ -389,7 +389,9 @@ defmodule Puid.Chars do
389389
end
390390

391391
def charlist!(:url_safe), do: charlist!(:alphanum) ++ ~c"-._~"
392-
def charlist!(:wordSafe32), do: ~c"23456789CFGHJMPQRVWXcfghjmpqrvwx"
392+
def charlist!(:word_safe32), do: ~c"23456789CFGHJMPQRVWXcfghjmpqrvwx"
393+
# Backwards compatibility alias
394+
def charlist!(:wordSafe32), do: charlist!(:word_safe32)
393395
def charlist!(:z_base32), do: ~c"ybndrfg8ejkmcpqxot1uwisza345h769"
394396

395397
def charlist!(charlist) when is_atom(charlist),

lib/puid/decoder/ascii.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# SOFTWARE.
2222

2323
defmodule Puid.Decoder.ASCII do
24+
@moduledoc false
2425
import Puid.Util
2526

2627
defmacro __using__(opts) do

mix.exs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Puid.MixProject do
44
def project do
55
[
66
app: :puid,
7-
version: "2.6.0",
7+
version: "2.7.0",
88
elixir: "~> 1.15",
99
start_permanent: Mix.env() == :prod,
1010
description: description(),
@@ -22,8 +22,13 @@ defmodule Puid.MixProject do
2222
],
2323
dialyzer: [
2424
flags: [:unmatched_returns, :error_handling, :underspecs]
25-
],
26-
preferred_cli_env: [
25+
]
26+
]
27+
end
28+
29+
def cli do
30+
[
31+
preferred_envs: [
2732
docs: :dev,
2833
dialyzer: :dev,
2934
credo: :dev,

0 commit comments

Comments
 (0)