Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump memoize-one from 5.1.1 to 6.0.0 #559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 13, 2022

Bumps memoize-one from 5.1.1 to 6.0.0.

Release notes

Sourced from memoize-one's releases.

6.0.0

At a glance

🧹 New .clear() function to remove the current memoization cache 🏋️‍♀️ Stronger types 🥰 Improved documentation

This release is a major, but there are no behaviour or API changes. The major is to reflect that some of the TypeScript types have been tightened which might cause some peoples TypeScript builds to break.

PSA: memoize-one will soon™️ be dropping ie11 support More details

New: Cache releasing with .clear() 🧹

A .clear() property is now added to memoized functions to allow you to clear it's memoization cache

This is helpful if you want to:

  • Release memory
  • Allow the underlying function to be called again without having to change arguments
import memoizeOne from 'memoize-one';
function add(a: number, b: number): number {
return a + b;
}
const memoizedAdd = memoizeOne(add);
// first call - not memoized
const first = memoizedAdd(1, 2);
// second call - cache hit (underlying function not called)
const second = memoizedAdd(1, 2);
// 👋 clearing memoization cache
memoizedAdd.clear();
// third call - not memoized (cache was cleared)
const third = memoizedAdd(1, 2);

Improved: memoized function type

There are no API changes to memoize-one, this is merely a typing improvement

Our previous type for a memoized function was simple:

Previous

... (truncated)

Commits
  • d5acc53 v6.0.0
  • deec8be Merge pull request #124 from alexreardon/refresh
  • e5a4d8b adding tests for casting the type of a memoized function
  • d8246db updating copy in readme
  • 994ef04 updating perf benchmark as lodash only uses the first argument as the key
  • cd46d47 removing temp type:module
  • 18b689f updating results
  • 4c5409b formatting results
  • ce0c6bf outputting results to markdown tables
  • 3e75de0 moving to node 16
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from chenrui333 as a code owner June 13, 2022 17:04
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jun 13, 2022
@stale
Copy link

stale bot commented Sep 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 21, 2022
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/memoize-one-6.0.0 branch from dd910b4 to b67c349 Compare November 21, 2022 11:07
Bumps [memoize-one](https://github.com/alexreardon/memoize-one) from 5.1.1 to 6.0.0.
- [Release notes](https://github.com/alexreardon/memoize-one/releases)
- [Commits](alexreardon/memoize-one@v5.1.1...v6.0.0)

---
updated-dependencies:
- dependency-name: memoize-one
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/memoize-one-6.0.0 branch from b67c349 to c7d06d7 Compare November 23, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants