Comparing version 2.0.0 to 2.0.1
@@ -0,11 +1,17 @@ | ||
2.0.1 - Feb 23 2014 | ||
=================== | ||
### Bug Fixes | ||
* Fix incorrect messaging in array type errors | ||
* Fix missing error when overwriting key with table array | ||
2.0.0 - Feb 23 2014 | ||
=================== | ||
Features | ||
-------- | ||
### Features | ||
* Add support for [version 0.2 of the TOML spec](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) ([#9](https://github.com/BinaryMuse/toml-node/issues/9)) | ||
Internals | ||
--------- | ||
### Internals | ||
@@ -17,4 +23,3 @@ * Upgrade to PEG.js v0.8 and rewrite compiler; parser is now considerably faster (from ~7000ms to ~1000ms to parse `example.toml` 1000 times on Node.js v0.10) | ||
Bug Fixes | ||
--------- | ||
### Bug Fixes | ||
@@ -26,4 +31,3 @@ * Fix support for empty arrays | ||
Bug Fixes | ||
--------- | ||
### Bug Fixes | ||
@@ -36,4 +40,3 @@ * Fix typo in array type error message | ||
Bug Fixes | ||
--------- | ||
### Bug Fixes | ||
@@ -45,4 +48,3 @@ * Fix errors on lines that contain only whitespace ([#7](https://github.com/BinaryMuse/toml-node/issues/7)) | ||
Internals | ||
--------- | ||
### Internals | ||
@@ -49,0 +51,0 @@ * Remove old code remaining from the remove streaming API |
@@ -62,3 +62,3 @@ function compile(nodes) { | ||
if (assignedPaths.indexOf(path) > -1) { | ||
genError("Cannot redefine existing table '" + path + "'.", line, column); | ||
genError("Cannot redefine existing key '" + path + "'.", line, column); | ||
} | ||
@@ -76,2 +76,3 @@ assignedPaths.push(path); | ||
if (assignedPaths.indexOf(path) === -1) assignedPaths.push(path); | ||
assignedPaths.push(path); | ||
context = deepRef(data, path, []); | ||
@@ -84,2 +85,4 @@ currentPath = path; | ||
context = newObj; | ||
} else { | ||
genError("Cannot redefine existing key '" + path + "'.", line, column); | ||
} | ||
@@ -125,3 +128,3 @@ } | ||
genError("Cannot add value of type " + node.type + " to array of type " + | ||
node.type + ".", node.line, node.column); | ||
firstType + ".", node.line, node.column); | ||
} | ||
@@ -128,0 +131,0 @@ } |
{ | ||
"name": "toml", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "TOML parser for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,7 @@ TOML Parser for Node.js | ||
TOML Spec Support | ||
----------------- | ||
toml-node supports version 0.2.0 the TOML spec as specified by [mojombo/toml@v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) | ||
Installation | ||
@@ -63,7 +68,2 @@ ------------ | ||
TOML Spec Support | ||
----------------- | ||
toml-node supports version 0.2.0 the TOML spec as specified by [mojombo/toml@v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) | ||
Building & Testing | ||
@@ -70,0 +70,0 @@ ------------------ |
@@ -176,2 +176,10 @@ var toml = require('../'); | ||
exports.testErrorOnKeyOverrideWithArrayTable = function(test) { | ||
test.throws(function() { | ||
var str = "[a]\nb = 1\n[[a]]\nc = 2"; | ||
toml.parse(str); | ||
}); | ||
test.done() | ||
}; | ||
exports.testErrorOnKeyReplace = function(test) { | ||
@@ -178,0 +186,0 @@ test.throws(function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
84564
2404
0