conf icon indicating copy to clipboard operation
conf copied to clipboard

[BUG] Assigning `conf.store` overrides applied migrations

Open ixrock opened this issue 5 years ago • 3 comments

package.json "conf": "^7.0.1",

Example:

import Config from "conf"

const config = new Config({
 migrations: {
    "2.0.0": store => store.set("lastSeenVersion", "2.0.0")
  }
})
config.store = {newData: "blabla"} // this will destroy marked migration in __internal__

ixrock avatar Jul 05 '20 19:07 ixrock

// @rafaelramalho19 In case you have time/interest in looking into this. If not, no worries.

sindresorhus avatar Jul 05 '20 19:07 sindresorhus

Was this resolved? Seems tricky.

willium avatar Jan 11 '21 09:01 willium

If anyone wants to work on this, see the initial attempt and feedback in: https://github.com/sindresorhus/conf/pull/137

sindresorhus avatar Jun 03 '21 19:06 sindresorhus