6.5 KiB
6.5 KiB
micro-memoize CHANGELOG
4.1.3
4.1.2
- Republish of #102
4.1.1 (Bad version - do not use)
- #102 - avoid publishing development-only files for less
node_modulesbloat
4.1.0
Enhancements
- Types now have direct exports instead of requiring the
MicroMemoizenamespace. That namespace has been labeled as deprecated, and will be removed in the next major version change in favor of the direct type exports.
Bugfixes
- #97 -
srcfiles included in publish, and referenced from*.d.tsfiles mjs/*d.tsfiles renamed tomjs/*.d.mtsto align with NodeJS standard- #101 - fixed benchmark using
memincorrectly for complex object parameters or multiple parameter calls
4.0.15
- #99 -
mjsimport does not have typings surfaced
4.0.14
- Republish of #87
4.0.13 (Bad version - do not use)
4.0.12
- #84 - Fix inferred typing of memoized function
- #85 - Follow-up on #84, further improving inferred typing via pass-throughs.
4.0.11
- Fix #79 - Sourcemaps referencing incorrect hierarchy
4.0.10
- Fix #76 -
noUncheckedIndexedAccesssupport on TS 4.1+
4.0.9
- Update npm search keywords and documentation
4.0.8
- Improve typings to support
strictmode in TypeScript
4.0.7
- Create more targeted
getKeyIndexhelpers for more speed in each key situation
4.0.6
- Use standard
theninterface (.then(onFulfilled, onRejected)) instead of ES spec (.then(onFulfilled).catch(onRejected)) for broader support
4.0.5
- Fix failure when
getKeyIndexis used and no keys are in the cache
4.0.4
- Use
.pop()to cap cache tomaxSizewhen possible (slight performance improvement)
4.0.3
- Namespace types under
MicroMemoizenamespace (which is how it was for4.0.0, but it got lost)
4.0.2
- Make Cache class consumable in types
4.0.1
- Fix types for consumption
4.0.0
- Update to use
Cacheclass instead of plain object (~10% performance improvement)
Breaking changes
memoized.cacheSnapshothas been deprecated in favor ofmemoized.cache.snapshot- Memoizing an already-memoized function no longer returns the function passed (now composes, see Composition)
Enhancements
- You can now compose memoized functions with their options (see Composition)
3.0.2
- Fix types declarations to ensure signature of
fnpassed is retained - Throw an error when the first parameter passed is not a function
3.0.1
- Fix types declaration for
Optionsto allow custom keys / indices
3.0.0
- Rewrite in TypeScript
- Use
rollupfor builds of all packages
BREAKING CHANGES
- CommonJS
requires no longer require.default - Types contract is much stricter
- Utility methods are no longer deep-linkable
- Not technically exposed in the API, but was relied upon by other libraries)
2.1.2
- Fix issue where
isMatchingKeywas not being used with promise updater - Remove requirement of
Object.assignexisting globally - Add common use-case static handlers for up to 3 arguments, falling back to pre-existing dynamic handlers for more (faster comparison / argument cloning)
2.1.1
- Upgrade to babel 7
- Add
"sideEffects": falsefor better tree-shaking with webpack
2.1.0
- Add ESM support for NodeJS with separate
.mjsextension exports
2.0.4
- Fix issue with recursive calls to memoized function created discrepancy between
keysandvaluesin cache
2.0.3
- More TypeScript typings (thanks again @rtorr)
2.0.2
- Fix TypeScript typings (thanks @rtorr)
2.0.1
- Fix TypeScript typings (thanks @Crecket)
2.0.0
- Add
isMatchingKeymethod to provide match test on entire key vs iterative equality
BREAKING CHANGES
- The return value from
transformKeymust be anArray(would previously coalesce it for you)
NEW FEATURES
isMatchingKeywill matching on entire key vsisEqual, which does an iterative comparison of arguments in order- Add
sizeproperty tocache
1.8.1
- Fix
getKeyIndexbeing passed asmemoizefor promises
1.8.0
- Include the memoized function itself as the third parameter to
onCacheAdd,onCacheChange, andonCacheHitfirings
1.7.0
- Fire
onCacheHitandonCacheChangewhen promise functions successfully resolve
1.6.3
- Replace native
sliceusages withcloneArrayutility
1.6.2
- Convert
distfiles to be built usingrollupinstead of webpack
1.6.1
- Optimize
slicecalls for key storage (performance)
1.6.0
- Add
onCacheAddoption - Pass through unused properties in
optionsfor higher-order memoization library usage
1.5.0
- Add
onCacheHitoption
1.4.0
- Add
optionsas second parameter toonCacheChanged
1.3.2
- Make additional properties (
cache,cacheSnapshot,isMemoized,options) configurable for higher-order memoization library usage
1.3.1
- Only reorder keys when matching cache entry is not first key
1.3.0
- Add
onCacheChangeoption
1.2.0
- Add
isPromiseoption - Add typings for Flowtype and TypeScript
1.1.0
- Add
transformKeyoption
1.0.1
- Delay argument-to-key generation until stored as new cache value (speed improvement of ~35%)
1.0.0
- Initial release