Closed EduardoSimon closed 4 years ago
Yes, it's up to you to handle breaking version changes.
Okay, any tips on that?
It really depends on how you use it. If the values can be regenerated, .clear()
is fine. Otherwise, you need to migrate over the data to the new structure.
I have a similar package that supports migrations: https://github.com/sindresorhus/conf#migrations
Hi, I'd like to congratulate you for the amazing work you've done with this package. It's been great. However, I've got a problem when I update the default configuration in the ConfigStore declaration and release it to npm. Users who have an older version of my package don't get their local config-store delete under ~/.config/configstore. Should I do this in the bootstrap of my package and save the version in the config itself? If the version is older do something like config.clear().
Thanks in advance