Comparing version 0.4.2 to 0.5.0
@@ -185,8 +185,2 @@ | ||
// Content of nested scopes within a freeform should be stored under "value." | ||
if (stackScope && stackScope.flags.indexOf('+') > -1 && flags.indexOf('.') > -1) { | ||
if (scopeType === '[') parsedScopeKey = 'value'; | ||
else if (scopeType === '{') scope = scope.value = {}; | ||
} | ||
var stackScopeItem = { | ||
@@ -199,3 +193,8 @@ array: null, | ||
}; | ||
// Content of nested scopes within a freeform should be stored under "value." | ||
var isNestedFreeform = stackScope && stackScope.flags.indexOf('+') > -1 && flags.indexOf('.') > -1; | ||
if (scopeType == '[') { | ||
if (isNestedFreeform) parsedScopeKey = 'value' | ||
stackScopeItem.array = keyScope[parsedScopeKey] = []; | ||
@@ -212,2 +211,4 @@ if (flags.indexOf('+') > -1) stackScopeItem.arrayType = 'freeform'; | ||
if (nesting) { | ||
if (isNestedFreeform) scope = scope.value = {}; | ||
else scope = keyScope[parsedScopeKey] = keyScope = {}; | ||
stack.push(stackScopeItem); | ||
@@ -214,0 +215,0 @@ } else { |
{ | ||
"name": "archieml", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"description": "JavaScript parser for the Archie Markup Language (ArchieML)", | ||
@@ -30,3 +30,3 @@ "homepage": "http://archieml.org", | ||
"type": "git", | ||
"url" : "http://github.com/newsdev/archieml-js.git" | ||
"url": "http://github.com/newsdev/archieml-js.git" | ||
}, | ||
@@ -33,0 +33,0 @@ "main": "archieml.js", |
@@ -1,2 +0,2 @@ | ||
# archieml | ||
# ArchieML | ||
@@ -7,3 +7,3 @@ Parse Archie Markup Language (ArchieML) documents into JavaScript objects. | ||
The current version is `v0.4.2`. | ||
The current version is `v0.5.0`. | ||
@@ -73,6 +73,7 @@ ## Installation | ||
A full shared test suite is included from the [archieml.org](https://github.com/newsdev/archieml.org) repository, under `/test`. After running `npm install`, run `nodeunit` to execute the tests. | ||
A full shared test suite is included from the [archieml.org](https://github.com/newsdev/archieml.org) repository, under `/test`. After running `npm install`, initialize the shared test submodules (`git submodule init && git submodule update`) and `npm run test` to execute the tests. | ||
## Changelog | ||
* `0.5.0` - Added support for implicit object nesting. | ||
* `0.4.2` - Fixes bug #19. | ||
@@ -79,0 +80,0 @@ * `0.4.1` - Fixes bug #21. |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
86
1
26055
8
468
2