This release significantly expands the RNG uniform API across all language implementations with comprehensive type-specific random number generation methods, and migrates the TypeScript toolchain from npm to pnpm.

Breaking Changes

  • All languages: Removed uniformBoolWithProb/uniform_bool_with_prob methods — Bernoulli distribution belongs in a dedicated distributions module
  • Rust: uniform_int renamed to uniform_i64 (deprecated alias available)
  • C#: UniformInt renamed to UniformInt64 (deprecated alias available)
  • Go: UniformInt deprecated in favor of UniformInt64

Features

  • Rng uniform API expansion (all languages):
    • uniform_range/UniformRange/uniformRange — generate floats in a specified [min, max) range
    • uniform_bool/UniformBool/uniformBool — generate random booleans with P(true) = 0.5
    • 32-bit float methods: uniform_f32/UniformSingle/UniformFloat32/uniformFloat32
    • Comprehensive integer type coverage:
      • Rust: uniform_i64/i32/i16/i8/isize and uniform_u64/u32/u16/u8/usize
      • C#: UniformInt64/Int32/Int16/Int8 and UniformUInt64/UInt32/UInt16/Byte
      • Go: UniformInt64/Int32/Int16/Int8/IntN and UniformUint64/Uint32/Uint16/Uint8/UintN
      • Kotlin: uniformLong/Int/Short/Byte and uniformULong/UInt/UShort/UByte
      • TypeScript/Python/R: uniformRange and uniformBool

Bug Fixes

  • CI: Fixed TypeScript job to use pnpm caching after npm→pnpm migration

Internal

  • TypeScript: Migrated from npm to pnpm
  • Rust: Replaced deprecated uniform_int with uniform_i64 in examples and tests
  • Go: Removed unused math import
  • Tests: Added cross-language reference test data for uniform_bool, uniform_f32, uniform_i32, and uniform_range

Full Changelog: https://github.com/AndreyAkinshin/pragmastat/compare/v5.1.0...v5.2.0