-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update dependency memoize-one to v6 #6832
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/GCkPrekZDXW9pErcvw5zFBYSmKZE |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0312861:
|
d367eb0
to
0312861
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/alexreardon/memoize-one/releases/tag/v6.0.0
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.
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* Update dependency @testing-library/dom to ^8.10.1 (#6817) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Lock file maintenance (#6810) * Lock file maintenance * resolve type errors * revert mdx bump to resolve vercel build errors * conflict resolution Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: gwyneplaine <cc.lee@live.com.au> * Update dependency @graphql-tools/schema to ^8.3.0 (#6815) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update nextjs monorepo to v12 (major) (#6835) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> Co-authored-by: mitchellhamilton <mitchell@hamil.town> * Update dependency @manypkg/cli to ^0.19.0 (#6859) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency @testing-library/dom to ^8.10.1 (#6817) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update typescript-eslint monorepo to ^5.2.0 (#6829) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency memoize-one to v6 (#6832) Co-authored-by: Renovate Bot <bot@renovateapp.com> * add CHANGESET * Lock file maintenance (#6810) * Lock file maintenance * resolve type errors * revert mdx bump to resolve vercel build errors * conflict resolution Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: gwyneplaine <cc.lee@live.com.au> * Update dependency @graphql-tools/schema to ^8.3.0 (#6815) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency @emotion/cache to v11.5.0 (#6827) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update Node.js to v16 (#6830) * Update Node.js to v16 * bump workflows to Node 16 Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> * Update nextjs monorepo to v12 (major) (#6835) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> Co-authored-by: mitchellhamilton <mitchell@hamil.town> * Update dependency @manypkg/cli to ^0.19.0 (#6859) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency mime to ^2.6.0 (#6879) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency @testing-library/jest-dom to ^5.15.0 (#6873) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update patch dependencies (#6857) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency stripe to ^8.186.0 (#6821) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency graphql to ^15.7.2 (#6860) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency react-select to ^5.2.0 (#6874) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update typescript-eslint monorepo to ^5.3.0 (#6861) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Lock file maintenance (#6852) * Lock file maintenance * resolve type errors * resolve build issues Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: gwyneplaine <cc.lee@live.com.au> * Update prisma monorepo to v3.4.0 (minor) (#6876) * Update prisma monorepo to v3.4.0 * update prisma version in tests * changeset Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: gwyneplaine <cc.lee@live.com.au> * Update dependency @changesets/cli to ^2.18.0 (#6900) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency mime to v3 (#6903) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update Apollo GraphQL packages (#6899) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> Co-authored-by: mitchellhamilton <mitchell@hamil.town>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
This PR contains the following updates:
^5.2.1
->^6.0.0
Release Notes
alexreardon/memoize-one
v6.0.0
Compare Source
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. Themajor
is to reflect that some of theTypeScript
types have been tightened which might cause some peoplesTypeScript
builds to break.New: Cache releasing with
.clear()
🧹A
.clear()
property is now added to memoized functions to allow you to clear it's memoization cacheThis is helpful if you want to:
Improved: memoized function
type
Our previous
type
for a memoized function was simple:Previous
A memoized function claimed to be the same type (
ResultFn
) as the original function. This was not true, asmemoize-one
does not copy of any existing object properties on the original function (TFunc
)Updated
A memoized function returns the same callable signature as the original function (
TFunc
→ wasResultFn
), but it makes it clear that no function object properties on the original function (TFunc
) are being carried forward. The memoized function also now includes a.clear()
function object propertyIf you want to continue to use the old types where the memoized function is the same type as the function being memoized, you can achieve this by casting the type of your memoized function:
Improved: equality function
type
Previous
Current
This looks a little scary, but it is pretty neat! It means that you can dramatically improve the type safety of your custom equality functions if you want to.
If you are not using a custom equality function
No changes for you!
If you are using a custom equality function
Most people will not be impacted!
This type tightening allows you to be a lot stricter with the shape of your functions passed in as equality functions. If you are using generic equality functions such as
lodash.isequal
their types are loose and there is nothing you will need to do. But if you want to write more efficient and typesafe equality functions, you are in for a treat.An example of what things looked like in 5.x
→ You can play with this example on codesandbox.io
The same example in 6.x
→ You can play with this example on codesandbox.io
Improved: Documentation
.clear()
.length
propertyInternal code health
TypeScript@4.4.3
devDependencies
Thanks ❤️
Thanks so much to the following people who helped make this release possible:
Catch you next time,
Configuration
📅 Schedule: "before 7am on Tuesday,before 7am on Wednesday" in timezone Australia/Sydney.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by WhiteSource Renovate. View repository job log here.