Skip to content

Releases: subsoap/defsave

v1.2.6

26 Mar 01:00
815ff18
Compare
Choose a tag to compare

Patch Notes:

  • Replaced JSON-based data serialization with sys.serialize and sys.deserialize functions for improved reliability and performance.
  • Added defsave_ext module with encode_base64 and decode_base64 functions to convert between byte buffers and base64 strings.
  • Introduced defsave.use_serialize variable to enable the new serialization method.

Benefits:

  • Avoids issues with JSON encoding creating null userdata for sparse array elements.
  • Eliminates the "Cannot serialise table: excessively sparse array" error when using highly sparse arrays.
  • Provides a more efficient and robust approach to data serialization and deserialization.

To use the new serialization method, set defsave.use_serialize to true.

Thanks @KorolevSoftware !

v1.2.5

25 Oct 01:44
6198f01
Compare
Choose a tag to compare

Remove old json.lua and use builtin JSON now. When DefSave was first made Defold didn't have a builtin json.encode, but now it does and so it should be used.

Thanks @KorolevSoftware !

v1.2.4

29 Jan 07:47
6ff2016
Compare
Choose a tag to compare

Fixes issues in profile.lua

Via @e1e5en-gd

#17

v1.2.3

31 Oct 12:52
7695b14
Compare
Choose a tag to compare

Ensures booleans are always serialized properly by saving them always as lowercase.

Via @vbif1

#14

v1.2.2

09 Feb 21:17
0b321f4
Compare
Choose a tag to compare

Wraps localStorage calls inside of try/catch on HTML5 so that there is no crash in iframe incognito Chrome

Via @aglitchman

#12

Use localStorage for HTML5 builds

25 Feb 15:52
7098e9d
Compare
Choose a tag to compare

Thanks to @endel

#11

this PR does not solve the issue completely. Even using localStorage on Safari, the storage is cleared automatically unless you manually uncheck "Block All Cookies" in the Safari settings.

v1.2.0

05 Feb 07:50
9deff48
Compare
Choose a tag to compare

The major difference in this release is that get() returns nil when the key value is nil instead of an empty table like it would return before.

Use patterns like the following for initial sets:

self.time_passed = defsave.get("state", "time_passed") or 0

v1.1.0

05 Feb 07:43
Compare
Choose a tag to compare

Safety release! If your project suddenly breaks because of a breaking change switch to this release.

First release!

01 Jul 10:26
Compare
Choose a tag to compare

Will begin to do releases now...

Using semantic versioning https://semver.org/