Releases: Sv443-Network/UserUtils
Releases · Sv443-Network/UserUtils
v10.0.6
Immutable
release. Only release title and notes can be modified.
Patch Changes
- 85540a2: Updated to CoreUtils v3.0.5
v10.0.5
Immutable
release. Only release title and notes can be modified.
v10.0.4
Immutable
release. Only release title and notes can be modified.
v10.0.3
Immutable
release. Only release title and notes can be modified.
v10.0.2
Immutable
release. Only release title and notes can be modified.
v10.0.1
Immutable
release. Only release title and notes can be modified.
v10.0.0
Immutable
release. Only release title and notes can be modified.
Major Changes
-
905881a: Moved a majority of the general-purpose code to the
@sv443-network/coreutilspackage.
The features are still accessible in this library in the same way, but some of them needed to be modified so they were more generic and consistent with the new package's codebase.
Refer to the CoreUtils documentation for more information.Breaking Changes
- Renamed
index.<ext>files indist/toUserUtils.<ext>
If you're specifying the URL to the bundle, make sure to replace theindexin the file name withUserUtils.- Turned
index.global.jsinto an actual full-fledged UMD bundle atUserUtils.umd.js(where previously it would only declare a global variable).
- Turned
- Reworked
DataStoreclass- The constructor now needs an
engineproperty that is an instance of aDataStoreEngine - Encoding using
deflate-rawwill now be enabled by default.
If you're not using theencodeDataanddecodeDataprops, setcompressionFormat: nullto explicitly disable compression. - The properties
encodeDataanddecodeDataare now a tuple of a string format identifier (likegzip,deflate-raw,base64, etc.) and the respective function that used to be the only value of those properties. - Added
DataStoreEngineclass with three implementations available out-of-the-box;FileStorageEngine,BrowserStorageEngineandGMStorageEngine, for Node/Deno and two kinds of browser environments, respectively.
Userscripts need to use either theGMStorageEngineorBrowserStorageEnginedepending on whether they want to use GreaseMonkey storage (only accessible to the userscript) or standard browser storage (accessible by the website's scripts).
Userscripts migrating from UserUtils v9 DataStores should use theGMStorageEngineto preserve all stored data. - Added shorthand property
compressionFormatas an alternative to the propertiesencodeDataanddecodeData. - (The global key
__ds_fmt_verwill now contain a global version number for DataStore-internal format integrity, stored via the given engine.)
- The constructor now needs an
- Renamed functions
- Renamed
ab2str()toabtoa()andstr2ab()toatoab()to matchbtoa()andatob() - Renamed
purifyObj()topureObj()
- Renamed
- Renamed
-
422da75: Increased library target to ES2018. Any build systems or environments that do not support ES2018 or newer might not be able to just include the pre-built library bundles as they are and could need a transpilation step to downlevel the code to an older ECMAScript version.
Minor Changes
- 49e359f: Added
GMStorageEngine, aDataStoreengine for GreaseMonkey environments that stores data in GM storage.