All notable changes to this project will be documented in this file. This project does its best to adhere to Semantic Versioning.
0.11.0 - 2022-01-02
- Update to TypeScript 4.4
0.10.0 - 2021-06-12
- Update to TypeScript 4.3
0.9.0 - 2020-09-04
- Update to TypeScript 4.0
0.8.0 - 2020-04-20
LocalStorageStore.newTimestampInst()
added optionalkeyParser
parameterLocalStoreByTimestamp.newTimestampInst()
added optionalkeyParser
parameterLocalStorageStore.MAX_ITEM_SIZE_BYTES
is now public- Improve README
LocalStorageStore.newInst()
, use constructor instead
0.7.0 - 2020-04-16
- Added optional
keyGenerator
parameter toLocalStoreByTimestamp.newTimestampInst()
- Cleaned up
UniqueChronologicalKeys
code to better work with timestamp rounding in modern browsers due to fingerprinting concerns and attacks like SpectreuniqueTimestamp()
renameduniqueTimestampBrowser()
- new
uniqueTimestamp()
created that provides the best implementation for the currently detected environment
- Added a unit test to assess the uniqueness of UniqueChronologicalKeys functions.
- Removed
LocalStoreByTimestamp.newInst()
, use constructor instead
0.6.17 - 2019-11-08
- Update to TypeScript 3.7
0.6.16 - 2019-07-04
- Update to TypeScript 3.5
- Marked
ReadOnlyLocalStore.length
,LocalStore.Array.key
, andLocalStore.Var.key
readonly - Fixed
LocalStorageStore
andLocalStorageWrapper
setItem()
to always throw storage error after retry attempts fail
0.6.15 - 2019-05-10
- Removed
package.json
@types/node
dependency - Removed
console.error()
error logging calls since all occurances alsothrow new Error()
, calling code can decide how to log
0.6.14 - 2018-12-29
- Cleanup documentation
- Cleanup
LocalStorageStore.newTimestampInst()
0.6.13 - 2018-12-29
- Renamed
GLOBAL
->global
(Node.js has deprecatedGLOBAL
)
0.6.12 - 2018-12-29
- Adjusted
LocalStoreByTimestamp.newTimestampInst()
to use uniqueTimestamp in the browser and uniqueTimestampNodeJs in Node.js
0.6.11 - 2018-12-29
- Update to TypeScript 3.2
- Update @types dependencies
- Remove
tsconfig.json lib "dom"
option since we're only usingwindow.performance
inUniqueChronologicalKeys
0.6.10 - 2018-10-14
- Update to TypeScript 3.1
- Update dev dependencies and @types
- Enable
tsconfig.json
strict
and fix compile errors - Removed compiled bin tarball in favor of git tags and github releases
0.6.9 - 2018-04-09
- Added release tarball and npm script
build-package
to package.json referencing external process to generate tarball
0.6.8 - 2018-04-02
- Update to TypeScript 2.8
- Update tsconfig.json with
noImplicitReturns: true
andforceConsistentCasingInFileNames: true
0.6.7 - 2018-03-01
- Update to TypeScript 2.7
- Update dependencies: mocha, @types/chai, @types/mocha, @types/node
0.6.6 - 2017-11-17
tsconfig.json
addedstrictNullChecks
,noImplicitAny
, andnoImplicitThis
and setup code to handle null types.
0.6.5 - 2017-08-06
- Update to TypeScript 2.4
0.6.4 - 2017-05-09
- Update to TypeScript 2.3, add tsconfig.json, use @types/ definitions
- Update documentation for easier use with Visual Studio
0.6.3 - 2016-09-17
- Added some (by default) redundant type casts so this library can work with ts-date-times if the built in Date class/methods are setup to return TimestampUtc instead of number
0.6.2 - 2016-06-27
- LocalStorageStore getKeys() bug not returning new array each time it is called, was leaking underlying array that was modified by other LocalStorageStore actions
0.6.1 - 2016-06-01
- Added missing data type and some documentation
- Added some missing optional parameters to the static LocalStoreEntry constructor functions
- LocalStoreEntry constructors weren't saving 'store' references
0.6.0 - 2016-05-28
- LocalStoreEntry with Var, Array, and MapIndividualKeys classes for accessing strongly typed LocalStore key-values
- LocalStorageStore.newTimestampInst();
- Moved the following local-store.d.ts interfaces into a new LocalStore module
- KeyCategorizer
- RemovedItem
- ItemsRemovedEvent
- FullStoreHandler
- ItemsRemovedCallback
- Switched unit tests from qunit to chai and mocha
- Moved test files out of test/local-store/ directory into root of test/ directory
- Removed LocalStorageStore getDefaultInst() and getSessionInst() in favor of newTimestampInst()
0.5.1 - 2016-05-03
- ClearFullStore itemsRemovedCallback changed to not get called when 0 items are removed from a store
- Improved some test cases
0.5.0 - 2016-05-02
LocalStoreByCategory internal handling for full stores, now all category stores are cleared when one is full to ensure enough space is freed. (possible future optimization would be to clear the store that first reported being full first and only clear further stores until enough space is available for the current operation...)
- Clarified GLOBAL type
- Renamed LocalStoreByTimestamp newUniqueTimestampInst() -> newTimestampInst()
- Renamed some private methods
- ClearFullStore itemsRemovedCallback function now returns the string version of removed values
LocalStoreByTimestamp.getDefaultInst() - you really should create your own
- LocalStorageStoreTest issue caused by ClearFullStore itemsRemovedCallback changed to return string values
- LocalStoreWrapper setItem() and removeItem() double stringify/parsing
0.4.0 - 2016-04-26
Renamed the project from ts-local-store-and-more -> ts-local-storage-manager
0.3.0 - 2016-04-24
- MemoryStore validation parameters to limit total size of data in the store or limit the number of items in the store
Extensive refactoring to add support for full store callbacks:
- LocalStoreFromStorage - added constructor and newInst() 'handleFullStore' parameters
- LocalStoreByTimestamp.new*Inst() and LocalStoreByCategory.toStore() - added 'itemsRemovedCallback' parameter to allow for customization of the item removal process when items are removed from a full store
- ClearFullStore - also got a 'itemsRemovedCallback' constructor and newInst() parameter, returns more detailed information about the items removed. the 'logInfo' flag now supports node.js (via GLOBAL.process.hrtime()) as well as browser enviroments when attempting to time the removal process
0.2.0 - 2016-04-23
- A CHANGELOG.md covering all previous releases after being reminded about the need for change logs from http://keepachangelog.com/
- LocalStoreDefault has been split for 'StorageLike' vs 'LocalStore' wrappers:
- local-store/LocalStoreWrapper.ts - a wrapper for another LocalStore instance
- local-store/LocalStoreFromStorage.ts - much of the original LocalStoreDefault code, a validation layer ontop of a StorageLike object
- Refactored BasicCategorizers - no more multi-categorizers, the LocalStoreItemCategorizer interface is now based around keys only, not values, renamed createKeyPrefixCategorizer() -> newPrefixCategorizer() and createKeySuffixCategorizer() -> newSuffixCategorizer()
- ClearFullStore is no longer tied to a specific store, you pass to the store the clearOldItems() method, no more 'Number.parseInt' default extractor, you must provide an extractor function
- LocalStoreByTimestamp renamed property 'timestampKeyGenerator' -> 'keyGenerator'
- Renamed UniqueChronologicalKey -> UniqueChronologicalKeys
LocalStoreDefault - see above, split into new LocalStoreWrapper and LocalStoreFromStorage
0.1.0 - 2016-03-28
Initial code commit, included in /local-store/ directory:
- BasicCategorizers.ts - create prefix and suffix categorizers (categorize keys based on the string prefix/suffix)
- ClearFullStore.ts - clear old chronological keys from a LocalStore
- LocalStoreByCategory.ts - builder and storage for multiple UniqueStore instances managed by one central object
- LocalStoreByTimestamp.ts - a UniqueStore implementation (constructor takes a key generator function and exposes addItem() function which auto-generates a chronological key)
- LocalStoreDefault.ts - a LocalStore implementation which provides additional validation ontop of a StorageLike object
- MemoryStore.ts - A TypeScript in-mem implementation of the lib.d.ts 'Storage' interface (i.e. localStorage)
- UniqueChronologicalKey.ts - static methods for generating chronological keys
- local-store.d.ts - Also includes some helper classes and qunit test cases