All notable changes to this project are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

3.0.0-rc.1 — 2026-05-22

Release candidate for the upcoming 3.0.0 release. API is considered stable; please report any issues before the final release.

Added

Changed

  • Breaking: Minimum Elixir version bumped from ~> 1.12 to ~> 1.15.
  • Breaking: The library no longer ships a config/config.exs. Defaults remain unchanged and can still be overridden via the consuming application's config — see the README.
  • Nanoid.Configuration.default_alphabet_length/0 is now computed from the precomputed grapheme list rather than via String.length/1.
  • ex_doc dev dependency bumped to ~> 0.34; the redundant direct earmark dependency was removed.

Deprecated

  • The positional-argument functions Nanoid.generate/1,2, Nanoid.generate_non_secure/1,2, Nanoid.Secure.generate/1,2 and Nanoid.NonSecure.generate/1,2 — use the generate_with/1 / generate_non_secure_with/1 variants. The deprecated functions still work and preserve their previous "fall back to defaults on invalid input" behaviour so existing call sites are not broken at runtime.
  • The arity-0 functions (Nanoid.generate/0, Nanoid.generate_non_secure/0 and their submodule counterparts) are not deprecated: they remain the quick-access shortcut for the all-defaults case.

Removed

  • Dead unreachable clauses in Nanoid.Secure (do_generate/5 fallback, generator/3 fallback, calculate_mask/1 fallback, calculate_step/3 fallback, random_bytes/1 fallback) and in Nanoid.NonSecure (generator/2 fallback).
  • Direct earmark dependency.
  • config/config.exs from the library itself.

Fixed

  • @spec for Nanoid.generate_non_secure/2 corrected from binary() | any() (effectively any()) to binary() | list().

  • Travis CI badge removed from the README; license link updated to point at the actual LICENSE file.

2.1.0

Previous release; see git history for details.