plist 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/build.js CHANGED
@@ -133,5 +133,8 @@ function walk_obj(next, next_child) {
133
133
  // a typed array
134
134
  next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
135
135
 
136
+ } else if ('Null' === name) {
137
+ next_child.ele('null').txt('');
138
+
136
139
  }
137
140
  }
package/lib/parse.js CHANGED
@@ -129,8 +129,9 @@ function parsePlistXML (node) {
129
129
  counter += 1;
130
130
  }
131
131
  if (counter % 2 === 1) {
132
- throw new Error('Missing value for "' + key + '" while parsing <dict/>');
132
+ new_obj[key] = '';
133
133
  }
134
+
134
135
  return new_obj;
135
136
 
136
137
  } else if (node.nodeName === 'array') {
@@ -212,10 +213,15 @@ function parsePlistXML (node) {
212
213
  )
213
214
  return new Date(node.childNodes[0].nodeValue);
214
215
 
216
+ } else if (node.nodeName === 'null') {
217
+ return null;
218
+
215
219
  } else if (node.nodeName === 'true') {
216
220
  return true;
217
221
 
218
222
  } else if (node.nodeName === 'false') {
219
223
  return false;
224
+ } else {
225
+ throw new Error('Invalid PLIST tag ' + node.nodeName);
220
226
  }
221
227
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "plist",
3
- "description": "Mac OS X Plist parser/builder for Node.js and browsers",
4
- "version": "3.0.5",
3
+ "description": "Apple's property list parser/builder for Node.js and browsers",
4
+ "version": "3.0.6",
5
5
  "author": "Nathan Rajlich <nathan@tootallnate.net>",
6
6
  "contributors": [
7
7
  "Hans Huebner <hans.huebner@gmail.com>",
@@ -26,13 +26,13 @@
26
26
  "main": "index.js",
27
27
  "dependencies": {
28
28
  "base64-js": "^1.5.1",
29
- "xmlbuilder": "^9.0.7"
29
+ "xmlbuilder": "^15.1.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "browserify": "^17.0.0",
33
- "mocha": "^5.2.0",
34
- "multiline": "^1.0.2",
35
- "zuul": "3.10.1"
33
+ "mocha": "^9.2.2",
34
+ "multiline": "^2.0.0",
35
+ "zuul": "3.12.0"
36
36
  },
37
37
  "scripts": {
38
38
  "test": "make test"