-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(cache): Store cache with sorted object keys #17607
fix(cache): Store cache with sorted object keys #17607
Conversation
I've chosen |
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.
Ill just note that the prCahce
issue is unrelated to the sorting problem of objects, although this sorting issue was also observed, so this is very welcome.
By looking at the source code for sortObject
it seems that it does sort arrays as well.
Otherwise, code LGTM.
EDIT: This indeed doesnt sort Arrays if no comparator function is provided.
🎉 This PR is included in version 32.190.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
Deep sort objects keys before
JSON.stringify
. This should help to avoid unnecessary disk writes of the essentially same data. Arrays are left unsorted as it may be unsafe.Context
prCache
within repo cache is written while being out of date #17603Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: