Releases: stevegeek/encoded_id
Releases · stevegeek/encoded_id
1.1.0
1.0.0
First stable release!
Important!!: :sqids are not compatible with :hashids, DO NOT CHANGE FROM ONE TO THE OTHER AFTER GOING LIVE.
Fixed (Rails integration)
Ensure finder methods correctly override their ActiveRecord counterparts
Warn when ActiveRecord integration used in model that doesn't use id as primary key
v1.0.0.rc7
1.0.0.rc7
Breaking changes
ReversibleIdnow no longer downcases the encodedid input string by default on decode, ie thedecodeoptiondowncaseis nowfalse. This can be configured via the Rails configurationdowncase_on_decodeoption. In a future release thedowncaseoption will be removed.- The default encoding engine is now
:sqidsto reflect the official "deprecated" status ofHashids (see https://sqids.org/faq#why-hashids) - Ruby < 3.2 support dropped. The minimum supported Ruby version is now 3.2.0
Encodersclasses no longer exposeencode_hexanddecode_hexas they worked differently to the similarly named methods on ReversibleId- Rails generator now needs you to specify which encoding algorithm you are using
Added (Rails integration)
encoded_id_optionsclass method to overrideencoded_idconfiguration on a model by model basis- Blocklist application "modes". User can decide if the blocklist checks should be applied in situations
where very long encoded IDs are likely and hence block word collisions are undesirably likely.
Changed
- Blocklists are now pre-filtered to the encoder alphabet to avoid testing words which cannot be created by that alphabet anyway.
- Updates to inline RBS type signatures
- Documentation updates
1.0.0.rc6
v1.0.0.rc6 1.0.0.rc6
v1.0.0.rc5
encoded_idnow uses its own implementation ofhashidswhich is more efficient and has a smaller memory footprint. This massively reduces the GC churn in high-throughput applications. This is an implementation based on the originalhashidsgem but with many optimisations and improvements. Functionally it is identical to the originalhashidsgem.
1.0.0.rc4
[1.0.0.rc4] - 2024-04-29
- Add an optional
max_inputs_per_idargument toReversibleId, thanks to @avcwisesa - The option
split_with:can also now be set to nil to disable splitting of the encoded ID string
v1.0.0.rc3
- Add an optional
max_lengthargument toReversibleId, thanks to @jugglebird - Alphabet validations to prevent whitespace and null chars
- Add
Alphabet#to_a,Alphabet#to_s,Alphabet#sizeand a customAlphabet#inspect - Fixes to input validations
- hashids are case-sensitive, as are
Alphabets, howeverReversibleIdwas alwaysdowncaseing the encodedid input string on decode. A new option has been added todecodeanddecode_hex,downcase, which defaults totrue. Thus, the default behaviour is unchanged, but you can opt out to allow mixed case encodedid decode. Note: In V2 this will default tofalse.