krakenjs / confit

Environment-aware configuration.
Other
61 stars 26 forks source link

Confit convert number to string #72

Open Nemek opened 7 years ago

Nemek commented 7 years ago

Hi,

after a change from 2.1.0 to 2.2.1 we found out that somehow a breaking change occured. We have this object in our config.json (kraken)

    "cookies": {
      "expires": 0,
      "secure": false,
      "signed": true
    }

In 2.1.0 after using: config.get('cookies') we received: { expires: 0, secure: false, signed: true }

but in 2.2.1 we got: { expires: '0', secure: false, signed: true }

Please take a look at this issue, unfortunately kraken-js is taking all non-breaking changes from confit and it has impact on our project.

lcalvy commented 7 years ago

Confirmed that it breaks expressjs setting like 'json spaces' giving this kind of json response output du to "0" in place of 0:

{
0"splitDiscussionsByLang": true,
0"hideFooter": false,
0"maxSlidePerChapter": 3,
0"maxSlidePerChapterBattle": 2,
0"maxTyposForSlides": 2,
0"maxShots": 3,
0"maxStars": 2000,
0"badgesLimits": {
00"battle": [
0003,
00010,
00025,
00050
00],
00"coach": [