Skip to content

v3.1.1

Latest

Choose a tag to compare

@maxh213 maxh213 released this 13 Sep 21:50
· 1 commit to main since this release

Changed

  • Updated locked dependencies to their latest compatible versions: gleam_stdlib 1.0.3 -> 1.0.5, qcheck 1.0.4 -> 1.0.5 (pulling in prng 6.0.0 and exception 2.1.1). The consumer-facing gleam_stdlib >= 0.44.0 constraint is unchanged and was re-verified (the library builds and its non-property tests pass at exactly 0.44.0 on both targets)
  • Corrected the Gleam compiler constraint in gleam.toml from >= 1.0.0 to >= 1.3.0: the code uses language features introduced in Gleam 1.3.0, so gleam publish rejected the old range
  • Raised the gleeunit dev-dependency floor to 1.0.1: gleeunit 1.0.0's JavaScript assertions import an inspect export that current Gleam compilers no longer generate, so the JS test run crashed at load time

Technical Notes

  • CI now tests Gleam 1.14.0 (oldest verified) and 1.18.1 (latest); GitHub Actions bumped to actions/checkout@v7, actions/setup-node@v7, actions/configure-pages@v6 and actions/upload-pages-artifact@v5
  • The full suite was verified on OTP 27.1.2, 28 and 29 (Erlang target) and Node 22 (JavaScript target) with both matrix Gleam versions

Also includes 3.1.0 (never published to Hex)

Added

  • glugify/anchor: GitHub-compatible heading anchors implementing the exact github-slugger algorithm — anchor.to_anchor("Hello, _World_!") -> "hello-_world_", with an Anchorer for github-slugger's duplicate counting (intro, intro-1, ...) and maintaining_case variants. Validated against the github-slugger test fixtures on both targets (the synthetic Unicode-category sweep fixtures that keep post-Unicode-7.0 characters are omitted — OTP <= 27 ships Unicode 7.0 regex tables, so they test the engine version, not the algorithm). Implemented with per-target FFI (re with Unicode properties on Erlang, Unicode property escapes in JavaScript)
  • The live playground is now published via GitHub Pages and linked from the Hex package page; it gained controls for locale, decamelize and HTML entity decoding

Fixed

  • Playground toggles now work with the mouse: the switch track painted over the invisible checkbox and swallowed clicks, so the boolean options could only be toggled via keyboard. The switches are now proper labels and the decorative layers pass clicks through
  • Stop words with an empty separator no longer destroy content: with with_separator("") and stop words configured, the slug was split into single graphemes and every letter matching a stop word was deleted ("banana the test" with stop words ["a", "the"] became "bnnthetest"). Stop words are now filtered while whitespace still marks the word boundaries, so the same input correctly yields "bananatest"
  • Uppercase non-ASCII ignore graphemes survive lowercasing: with_ignore(["Ü"]) kept "Ü" through transliteration but the default lowercase pass turned it into "ü", which then failed the ignore check and was stripped from the slug entirely. Ignored graphemes are now also matched by their lowercased form when lowercase is enabled ("Ü test" -> "ü-test")

Changed

  • Removed dead code from the published package: internal/optimized_processors.gleam (an unused alternative implementation of the processing pipeline) and glugify_ffi.mjs (an unused JavaScript FFI timing helper). Neither was reachable from the public API
  • Corrected the with_trim documentation: it controls trimming of leading/trailing separators on the final slug; input whitespace is always trimmed
  • Documented that ignore entries must be single graphemes and how they interact with lowercase
  • Added gleam = ">= 1.0.0" to gleam.toml

Technical Notes

  • The transliteration tables in internal/char_maps.gleam are now code-generated from TSV data files (dev/char_data/) via dev/tools/generate_char_maps.py, in preparation for much larger tables (CJK pinyin). The generated output is unchanged
  • CI now tests a Gleam version matrix (1.14.0 and 1.17.0, both verified) and runs an extra job against the newest allowed versions of all dependencies

🤖 Generated with Claude Code

https://claude.ai/code/session_01WPz3ckpNcnqqt6owUGtPPi