Comparing version 0.5.0 to 0.5.1
0.5.1 / 2016-10-21 | ||
================== | ||
* fixed . bug | ||
* updated mocha | ||
0.5.0 / 2016-10-19 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -68,7 +68,7 @@ 'use strict'; | ||
oldPath.push(originalKey); | ||
unset(memo, oldPath.join('.')); | ||
unset(memo, oldPath); | ||
// and now we can set the evaluated key: | ||
const path = this.path.slice(0, this.path.length - 1); | ||
path.push(evaluatedKey); | ||
set(memo, path.join('.'), evaluatedValue); | ||
set(memo, path, evaluatedValue); | ||
} | ||
@@ -75,0 +75,0 @@ return memo; |
{ | ||
"name": "varson", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "", | ||
@@ -30,4 +30,4 @@ "main": "index.js", | ||
"eslint-plugin-import": "^1.14.0", | ||
"mocha": "^2.3.3" | ||
"mocha": "^3.1.2" | ||
} | ||
} |
@@ -319,2 +319,19 @@ /* global describe, it */ | ||
it('should allow . in key or value (failed before)', () => { | ||
const result = varson({ | ||
blah: 'yep', | ||
'./test': { | ||
'./debug': './true', | ||
'{{blah}}': 123 | ||
} | ||
}); | ||
expect(result).to.deep.equal({ | ||
blah: 'yep', | ||
'./test': { | ||
'./debug': './true', | ||
yep: 123 | ||
} | ||
}); | ||
}); | ||
it('should allow to change {{ }} to { }', () => { | ||
@@ -321,0 +338,0 @@ const origSettings = varson.settings; |
13158
470