designsystemsinternational / mechanic

Mechanic is a framework to build assets built on web code.
https://mechanic.design
MIT License
243 stars 11 forks source link

fix: add property sorting for storage hashing #154

Closed fdoflorenzano closed 1 year ago

fdoflorenzano commented 1 year ago

The tweak introduced here is adding key sorting to the key hash generation for input storage. Since the hash is computed from a string representation of a copy of the inputs export object, the order of the keys become important to generate the hash. This made the updated setup (introduced in https://github.com/designsystemsinternational/mechanic/pull/140) create a new storage even when changing the order of keys in the input, or even keys inside the values for inputs, which should (I think) preserve the storage for that definition.

netlify[bot] commented 1 year ago

Deploy Preview for dsi-logo-maker ready!

Name Link
Latest commit 47ca1663ed426001d7264af9bccbf85611e8fbbf
Latest deploy log https://app.netlify.com/sites/dsi-logo-maker/deploys/632a17f1bfe3f30008a1ff5c
Deploy Preview https://deploy-preview-154--dsi-logo-maker.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.