This library is versioned based on Semantic Versioning (SemVer).
The scope of what is covered by the version number excludes:
- error messages; the text of the messages can change, unless specifically documented.
- create a release branch
- update the changelog below
- update version and copyright-years in
./LICENSE.md
(bottom) and./src/uuid.lua
(in doc-comments header) - create a new rockspec and update the version inside the new rockspec:
cp uuid-dev-1.rockspec ./rockspecs/uuid-X.Y.Z-1.rockspec
- test: run
make test
andmake lint
- clean and render the docs: run
make clean
andmake docs
- commit the changes as
release X.Y.Z
- push the commit, and create a release PR
- after merging tag the release commit with
X.Y.Z
- upload to LuaRocks:
luarocks upload ./rockspecs/uuid-X.Y.Z-1.rockspec --api-key=ABCDEFGH
- test the newly created rock:
luarocks install uuid
- BREAKING: no default rng will be picked anymore, one must be set explicitly, see
set_rng
- BREAKING: calling on the module table
uuid()
will now callv4()
instead ofnew()
which means it no longer supports thehwaddr
parameter - Change:
new
function with thehwaddr
parameter is deprecated, will be removed later - Change:
randomseed
has moved torng.math_randomseed
, alias will be removed later - Change:
seed
has moved torng.seed
, alias will be removed later - Feat: new
rng
module with multiplerng
s available - Feat: new
set_rng
function to set therng
to use - Feat: the
rng.seed
function has a new parameteruserinput
that allows the user to specify additional input for seeding the Lua rng (eg. pass in a mac address). - Feat: new
rng.luasystem
rng that uses LuaSystem for random number generation (Posix + Windows) - Feat: new
rng.urandom
rng that uses /dev/urandom for random number generation (Posix, no Windows) - Feat: new
rng.win_ffi
rng that uses the ffi for random number generation (Windows, no Posix) - Feat: new
rng.math_random
rng that replaces the old rng used, based on Lua'smath.random
function. - Feat: improved seeding, using LuaSystem, win-ffi, or /dev/urandom if available. If not, the fallback now uses
more inputs (including a user provided one, eg. a mac address) and calculates a SHA1 used as seed.
Also support for the Lua 5.4
randomseed()
implementation
- Fix: set proper type for UUIDv4 type
- Feat: improve seeding for OpenResty
- Doc: fix link in readme
- Bugfix; 0-hex was displayed as "" instead of "00", making some uuids too short
- Bugfix; math.randomseed() overflow caused bad seeding
- initial version