plist 1.0.1 → 2.0.1

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/.travis.yml CHANGED
@@ -1,4 +1,43 @@
1
+ sudo: false
2
+
1
3
  language: node_js
4
+
2
5
  node_js:
3
- - "0.10"
4
- - "0.11"
6
+ - '0.10'
7
+ - '0.12'
8
+ - '1'
9
+ - '2'
10
+ - '3'
11
+ - '4'
12
+ - '5'
13
+ - '6'
14
+
15
+ env:
16
+ global:
17
+ - secure: xlLmWO7akYQjmDgrv6/b/ZMGILF8FReD+k6A/u8pYRD2JW29hhwvRwIQGcKp9+zmJdn4i5M4D1/qJkCeI3pdhAYBDHvzHOHSEwLJz1ESB2Crv6fa69CtpIufQkWvIxmZoU49tCaLpMBaIroGihJ4DAXdIVOIz6Ur9vXLDhGsE4c=
18
+ - secure: aQ46RdxL10xR5ZJJTMUKdH5k4tdrzgZ87nlwHC+pTr6bfRw3UKYC+6Rm7yQpg9wq0Io9O9dYCP007gQGSWstbjr1+jXNu/ubtNG+q5cpWBQZZZ013VHh9QJTf1MnetsZxbv8Yhrjg590s6vruT0oqesOnB2CizO/BsKxnY37Nos=
19
+
20
+ matrix:
21
+ include:
22
+ - node_js: '0.10'
23
+ env: BROWSER_NAME=chrome BROWSER_VERSION=latest
24
+ - node_js: '0.10'
25
+ env: BROWSER_NAME=chrome BROWSER_VERSION=29
26
+ - node_js: '0.10'
27
+ env: BROWSER_NAME=firefox BROWSER_VERSION=latest
28
+ - node_js: '0.10'
29
+ env: BROWSER_NAME=opera BROWSER_VERSION=latest
30
+ - node_js: '0.10'
31
+ env: BROWSER_NAME=safari BROWSER_VERSION=latest
32
+ - node_js: '0.10'
33
+ env: BROWSER_NAME=safari BROWSER_VERSION=7
34
+ - node_js: '0.10'
35
+ env: BROWSER_NAME=safari BROWSER_VERSION=6
36
+ - node_js: '0.10'
37
+ env: BROWSER_NAME=safari BROWSER_VERSION=5
38
+ - node_js: '0.10'
39
+ env: BROWSER_NAME=ie BROWSER_VERSION=11
40
+ - node_js: '0.10'
41
+ env: BROWSER_NAME=ie BROWSER_VERSION=10
42
+ - node_js: '0.10'
43
+ env: BROWSER_NAME=ie BROWSER_VERSION=9
package/History.md CHANGED
@@ -1,3 +1,41 @@
1
+ 2.0.1 / 2016-08-16
2
+ ==================
3
+
4
+ * [[`de136c8388`](https://github.com/TooTallNate/plist/commit/de136c8388)] - bad npm release… (Nathan Rajlich)
5
+
6
+ 2.0.0 / 2016-08-16
7
+ ==================
8
+
9
+ * [[`90deef5d43`](https://github.com/TooTallNate/plist/commit/90deef5d43)] - remove deprecated functions (Nathan Rajlich)
10
+ * [[`d475cd8ce9`](https://github.com/TooTallNate/plist/commit/d475cd8ce9)] - Added travis ci support for node 6 (Amila Welihinda)
11
+ * [[`04c8ee7646`](https://github.com/TooTallNate/plist/commit/04c8ee7646)] - update dependencies (Mitchell Hentges)
12
+ * [[`97c02b3f05`](https://github.com/TooTallNate/plist/commit/97c02b3f05)] - **travis**: add `sudo: false` and test more node versions (Nathan Rajlich)
13
+ * [[`54c821ec29`](https://github.com/TooTallNate/plist/commit/54c821ec29)] - #71 - fixed and added test (Andrew Goldis)
14
+ * [[`4afb7c5079`](https://github.com/TooTallNate/plist/commit/4afb7c5079)] - fix `Cannot read property 'nodeValue' of undefined exception` that is thrown when a `<key></key>` construct appears in plist (Chris Kinsman)
15
+ * [[`f360d7d685`](https://github.com/TooTallNate/plist/commit/f360d7d685)] - #66 - fixed empty keys and added tests (Andrew Goldis)
16
+ * [[`421c7f26e9`](https://github.com/TooTallNate/plist/commit/421c7f26e9)] - #66 - fixed empty key (Andrew Goldis)
17
+ * [[`a88aa4dca7`](https://github.com/TooTallNate/plist/commit/a88aa4dca7)] - add verbose examples (mrzmyr)
18
+
19
+ 1.2.0 / 2015-11-10
20
+ ==================
21
+
22
+ * package: update "browserify" to v12.0.1
23
+ * package: update "zuul" to v3.7.2
24
+ * package: update "xmlbuilder" to v4.0.0
25
+ * package: update "util-deprecate" to v1.0.2
26
+ * package: update "mocha" to v2.3.3
27
+ * package: update "base64-js" to v0.0.8
28
+ * build: omit undefined values
29
+ * travis: add node 4.0 and 4.1 to test matrix
30
+
31
+ 1.1.0 / 2014-08-27
32
+ ==================
33
+
34
+ * package: update "browserify" to v5.10.1
35
+ * package: update "zuul" to v1.10.2
36
+ * README: add "Sauce Test Status" build badge
37
+ * travis: use new "plistjs" sauce credentials
38
+ * travis: set up zuul saucelabs automated testing
1
39
 
2
40
  1.0.1 / 2014-06-25
3
41
  ==================
package/Makefile CHANGED
@@ -10,6 +10,10 @@ BIN := $(THIS_DIR)/node_modules/.bin
10
10
  NODE ?= node
11
11
  NPM ?= $(NODE) $(shell which npm)
12
12
  BROWSERIFY ?= $(NODE) $(BIN)/browserify
13
+ MOCHA ?= $(NODE) $(BIN)/mocha
14
+ ZUUL ?= $(NODE) $(BIN)/zuul
15
+
16
+ REPORTER ?= spec
13
17
 
14
18
  all: dist/plist.js dist/plist-build.js dist/plist-parse.js
15
19
 
@@ -41,4 +45,32 @@ node_modules: package.json
41
45
  @NODE_ENV= $(NPM) install
42
46
  @touch node_modules
43
47
 
44
- .PHONY: all install clean
48
+ test:
49
+ @if [ "x$(BROWSER_NAME)" = "x" ]; then \
50
+ $(MAKE) test-node; \
51
+ else \
52
+ $(MAKE) test-zuul; \
53
+ fi
54
+
55
+ test-node:
56
+ @$(MOCHA) \
57
+ --reporter $(REPORTER) \
58
+ test/*.js
59
+
60
+ test-zuul:
61
+ @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \
62
+ $(ZUUL) \
63
+ --ui mocha-bdd \
64
+ --browser-name $(BROWSER_NAME) \
65
+ --browser-version $(BROWSER_VERSION) \
66
+ test/*.js; \
67
+ else \
68
+ $(ZUUL) \
69
+ --ui mocha-bdd \
70
+ --browser-name $(BROWSER_NAME) \
71
+ --browser-version $(BROWSER_VERSION) \
72
+ --browser-platform "$(BROWSER_PLATFORM)" \
73
+ test/*.js; \
74
+ fi
75
+
76
+ .PHONY: all install clean test test-node test-zuul
package/README.md CHANGED
@@ -2,6 +2,8 @@ plist.js
2
2
  ========
3
3
  ### Mac OS X Plist parser/builder for Node.js and browsers
4
4
 
5
+ [![Sauce Test Status](https://saucelabs.com/browser-matrix/plistjs.svg)](https://saucelabs.com/u/plistjs)
6
+
5
7
  [![Build Status](https://travis-ci.org/TooTallNate/plist.js.svg?branch=master)](https://travis-ci.org/TooTallNate/plist.js)
6
8
 
7
9
  Provides facilities for reading and writing Mac OS X Plist (property list)
@@ -15,7 +17,7 @@ and vice-versa.
15
17
 
16
18
  ## Usage
17
19
 
18
- ### Node.JS
20
+ ### Node.js
19
21
 
20
22
  Install using `npm`:
21
23
 
@@ -67,8 +69,34 @@ Parsing a plist from string payload:
67
69
  ``` javascript
68
70
  var plist = require('plist');
69
71
 
70
- var obj = plist.parse('<plist><string>Hello World!</string></plist>');
71
- console.log(obj); // Hello World!
72
+ var xml =
73
+ '<?xml version="1.0" encoding="UTF-8"?>' +
74
+ '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' +
75
+ '<plist version="1.0">' +
76
+ '<key>metadata</key>' +
77
+ '<dict>' +
78
+ '<key>bundle-identifier</key>' +
79
+ '<string>com.company.app</string>' +
80
+ '<key>bundle-version</key>' +
81
+ '<string>0.1.1</string>' +
82
+ '<key>kind</key>' +
83
+ '<string>software</string>' +
84
+ '<key>title</key>' +
85
+ '<string>AppName</string>' +
86
+ '</dict>' +
87
+ '</plist>';
88
+
89
+ console.log(plist.parse(xml));
90
+
91
+ // [
92
+ // "metadata",
93
+ // {
94
+ // "bundle-identifier": "com.company.app",
95
+ // "bundle-version": "0.1.1",
96
+ // "kind": "software",
97
+ // "title": "AppName"
98
+ // }
99
+ // ]
72
100
  ```
73
101
 
74
102
  ### Building
@@ -79,10 +107,35 @@ that complies with the plist DTD:
79
107
  ``` javascript
80
108
  var plist = require('plist');
81
109
 
82
- console.log(plist.build({ foo: 'bar' }));
110
+ var json = [
111
+ "metadata",
112
+ {
113
+ "bundle-identifier": "com.company.app",
114
+ "bundle-version": "0.1.1",
115
+ "kind": "software",
116
+ "title": "AppName"
117
+ }
118
+ ];
119
+
120
+ console.log(plist.build(json));
121
+
122
+ // <?xml version="1.0" encoding="UTF-8"?>
123
+ // <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
124
+ // <plist version="1.0">
125
+ // <key>metadata</key>
126
+ // <dict>
127
+ // <key>bundle-identifier</key>
128
+ // <string>com.company.app</string>
129
+ // <key>bundle-version</key>
130
+ // <string>0.1.1</string>
131
+ // <key>kind</key>
132
+ // <string>software</string>
133
+ // <key>title</key>
134
+ // <string>AppName</string>
135
+ // </dict>
136
+ // </plist>
83
137
  ```
84
138
 
85
-
86
139
  ## License
87
140
 
88
141
  (The MIT License)