Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TooTallNate/plist.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 806c35e79ad1326da22ced98bc9c721ff570af84
Choose a base ref
...
head repository: TooTallNate/plist.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 276c65742b138de3a80fa2a5e80bf74352e1a2a3
Choose a head ref
Loading
Showing with 16,947 additions and 26,352 deletions.
  1. +1 −1 .npmignore
  2. +14 −24 .travis.yml
  3. +67 −5 History.md
  4. +1 −1 LICENSE
  5. +1 −2 Makefile
  6. +62 −27 README.md
  7. +1,913 −11,643 dist/plist-build.js
  8. +2,998 −1,962 dist/plist-parse.js
  9. +4,873 −12,402 dist/plist.js
  10. +13 −0 index.js
  11. +4 −3 lib/build.js
  12. +0 −49 lib/node.js
  13. +96 −81 lib/parse.js
  14. +0 −23 lib/plist.js
  15. +6,704 −0 package-lock.json
  16. +13 −10 package.json
  17. +14 −1 test/build.js
  18. +173 −118 test/parse.js
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.npmignore
.DS_Store
tests/
test/
38 changes: 14 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
dist: xenial
os: linux
language: node_js
node_js:
- '0.10'
- '0.11'
- '6'
- '7'
- '8'
- '9'

env:
global:
- secure: xlLmWO7akYQjmDgrv6/b/ZMGILF8FReD+k6A/u8pYRD2JW29hhwvRwIQGcKp9+zmJdn4i5M4D1/qJkCeI3pdhAYBDHvzHOHSEwLJz1ESB2Crv6fa69CtpIufQkWvIxmZoU49tCaLpMBaIroGihJ4DAXdIVOIz6Ur9vXLDhGsE4c=
- secure: aQ46RdxL10xR5ZJJTMUKdH5k4tdrzgZ87nlwHC+pTr6bfRw3UKYC+6Rm7yQpg9wq0Io9O9dYCP007gQGSWstbjr1+jXNu/ubtNG+q5cpWBQZZZ013VHh9QJTf1MnetsZxbv8Yhrjg590s6vruT0oqesOnB2CizO/BsKxnY37Nos=
matrix:
- secure: R4tCAipsC0KdBPin8+rWedqptn0RXksLM20yZ0w8En0hhaglWCiIxA5uKt/6njXp9Q8FEKkVOyWF+yjq74jB6+KUu0dSK30pbmaAHhlXsL5kTWmY9vd7rxwcn1Hdf1sW15NqRX4hvWuIC32cA7vDr+58VPyum+A+yvPJICvgIlw=
- secure: sfEwCcmUrfFPIRPV8UwdJymRZ8YY20fuJiAlWfOUQSOccNGWB4RbUsD+iyc9XW5qB1kdOqxVkvZ0sKrYo3Uc4k8mhar7+yhP04hfNj4CWAigG3rtTugbar9kSQjwi/yEaTrb4kdP8HRYs5yjrEX/CGwjm3iHGOSyUw5du0PQfbk=

jobs:
include:
- node_js: '0.10'
- node_js: '8'
env: BROWSER_NAME=chrome BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=chrome BROWSER_VERSION=29
- node_js: '0.10'
- node_js: '8'
env: BROWSER_NAME=firefox BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=opera BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=7
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=6
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=5
- node_js: '0.10'
- node_js: '8'
env: BROWSER_NAME=ie BROWSER_VERSION=11
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=10
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=9
72 changes: 67 additions & 5 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,73 @@
3.0.2 / 2021-03-25
==================
* update xmldom to 0.5.0 to patch critical vulnerability (Mike Reinstein)
* update saucelab credentials to point at mreinstein's saucelabs account (Mike Reinstein)
* remove a bunch of test versions from the matrix because they weren't working in zuul + sauce (Mike Reinstein)


3.0.1 / 2018-03-21
==================
* avoid using Buffer constructor nodejs/node#19079


3.0.0 / 2018-03-18
==================
* [[`cb0d8f1bc6`]](https://github.com/TooTallNate/plist.js/commit/cb0d8f1bc60dee423f8fc2cfcac427452dfaddb0) update Makefile, rebuild dist/ (Mike Reinstein)
* [[`9dfeffe73f`]](https://github.com/TooTallNate/plist.js/commit/9dfeffe73fdb447ac5a87ee364a1472975f12adf) remove unsupported browser versions from travis (Mike Reinstein)
* [[`c962bfe1ea`]](https://github.com/TooTallNate/plist.js/commit/c962bfe1ea04dd87966250253d33738bceecab61) update module deps, remove support for node < 6 (Mike Reinstein)


2.1.0 / 2017-05-04
==================

* [[`e4f06669bb`]](https://github.com/TooTallNate/plist.js/commit/e4f06669bb51d2e65654df7c39aab52bc3bf4e8a) - update license (extend copyright term) (Mike Reinstein)
* [[`edc6e41035`]](https://github.com/TooTallNate/plist.js/commit/edc6e4103546b1d7518a577e7c202c305a8abec0) - update module deps (Mike Reinstein)
* [[`85d11c48ef`](https://github.com/TooTallNate/plist.js/commit/85d11c48eff02312cbdd67f46fd8e74b0d372ca1)] - Harden test-cases and implementation to align with other implementations (Björn Brauer)
* [[`7619537eaa`]](https://github.com/TooTallNate/plist.js/commit/7619537eaa9e3e5a80829e759c004d2e017a07d2) review feedback: early returns and constants for nodeTypes (Björn Brauer)


2.0.1 / 2016-08-16
==================

* [[`de136c8388`](https://github.com/TooTallNate/plist/commit/de136c8388)] - bad npm release… (Nathan Rajlich)


2.0.0 / 2016-08-16
==================

* [[`90deef5d43`](https://github.com/TooTallNate/plist/commit/90deef5d43)] - remove deprecated functions (Nathan Rajlich)
* [[`d475cd8ce9`](https://github.com/TooTallNate/plist/commit/d475cd8ce9)] - Added travis ci support for node 6 (Amila Welihinda)
* [[`04c8ee7646`](https://github.com/TooTallNate/plist/commit/04c8ee7646)] - update dependencies (Mitchell Hentges)
* [[`97c02b3f05`](https://github.com/TooTallNate/plist/commit/97c02b3f05)] - **travis**: add `sudo: false` and test more node versions (Nathan Rajlich)
* [[`54c821ec29`](https://github.com/TooTallNate/plist/commit/54c821ec29)] - #71 - fixed and added test (Andrew Goldis)
* [[`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)
* [[`f360d7d685`](https://github.com/TooTallNate/plist/commit/f360d7d685)] - #66 - fixed empty keys and added tests (Andrew Goldis)
* [[`421c7f26e9`](https://github.com/TooTallNate/plist/commit/421c7f26e9)] - #66 - fixed empty key (Andrew Goldis)
* [[`a88aa4dca7`](https://github.com/TooTallNate/plist/commit/a88aa4dca7)] - add verbose examples (mrzmyr)


1.2.0 / 2015-11-10
==================

* package: update "browserify" to v12.0.1
* package: update "zuul" to v3.7.2
* package: update "xmlbuilder" to v4.0.0
* package: update "util-deprecate" to v1.0.2
* package: update "mocha" to v2.3.3
* package: update "base64-js" to v0.0.8
* build: omit undefined values
* travis: add node 4.0 and 4.1 to test matrix


1.1.0 / 2014-08-27
==================

* package: update "browserify" to v5.10.1
* package: update "zuul" to v1.10.2
* README: add "Sauce Test Status" build badge
* travis: use new "plistjs" sauce credentials
* travis: set up zuul saucelabs automated testing
* package: update "browserify" to v5.10.1
* package: update "zuul" to v1.10.2
* README: add "Sauce Test Status" build badge
* travis: use new "plistjs" sauce credentials
* travis: set up zuul saucelabs automated testing


1.0.1 / 2014-06-25
==================
@@ -18,6 +79,7 @@
* README: update examples to use preferred API
* package: add "browser" keyword


1.0.0 / 2014-05-20
==================

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(The MIT License)

Copyright (c) 2010-2014 Nathan Rajlich <nathan@tootallnate.net>
Copyright (c) 2010-2017 Nathan Rajlich <nathan@tootallnate.net>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -38,8 +38,7 @@ dist/plist-parse.js: node_modules lib/parse.js dist
dist/plist.js: node_modules lib/*.js dist
@$(BROWSERIFY) \
--standalone plist \
--ignore lib/node.js \
lib/plist.js > $@
index.js > $@

node_modules: package.json
@NODE_ENV= $(NPM) install
89 changes: 62 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -69,8 +69,34 @@ Parsing a plist from string payload:
``` javascript
var plist = require('plist');

var obj = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(obj); // Hello World!
var xml =
'<?xml version="1.0" encoding="UTF-8"?>' +
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' +
'<plist version="1.0">' +
'<key>metadata</key>' +
'<dict>' +
'<key>bundle-identifier</key>' +
'<string>com.company.app</string>' +
'<key>bundle-version</key>' +
'<string>0.1.1</string>' +
'<key>kind</key>' +
'<string>software</string>' +
'<key>title</key>' +
'<string>AppName</string>' +
'</dict>' +
'</plist>';

console.log(plist.parse(xml));

// [
// "metadata",
// {
// "bundle-identifier": "com.company.app",
// "bundle-version": "0.1.1",
// "kind": "software",
// "title": "AppName"
// }
// ]
```

### Building
@@ -81,33 +107,42 @@ that complies with the plist DTD:
``` javascript
var plist = require('plist');

console.log(plist.build({ foo: 'bar' }));
var json = [
"metadata",
{
"bundle-identifier": "com.company.app",
"bundle-version": "0.1.1",
"kind": "software",
"title": "AppName"
}
];

console.log(plist.build(json));

// <?xml version="1.0" encoding="UTF-8"?>
// <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
// <plist version="1.0">
// <key>metadata</key>
// <dict>
// <key>bundle-identifier</key>
// <string>com.company.app</string>
// <key>bundle-version</key>
// <string>0.1.1</string>
// <key>kind</key>
// <string>software</string>
// <key>title</key>
// <string>AppName</string>
// </dict>
// </plist>
```

## Cross Platform Testing Credits

Much thanks to Sauce Labs for providing free resources that enable cross-browser testing on this project!

[![Testing Powered By SauceLabs](https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-red.png?sanitize=true "Testing Powered By SauceLabs")](https://saucelabs.com)


## License

(The MIT License)

Copyright (c) 2010-2014 Nathan Rajlich <nathan@tootallnate.net>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
[(The MIT License)](LICENSE)
Loading