Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit f1f87e2

Browse files
committed
Merge pull request #95 from buglabs/disables-coercion-add-travis-ci
Disables coercion and adds Travis CI
2 parents 8448c66 + b5138ea commit f1f87e2

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sudo: required
2+
language: node_js
3+
env:
4+
- CXX="g++-4.8"
5+
6+
node_js:
7+
- "0.8"
8+
- "0.10"
9+
- "0.12"
10+
- "iojs"
11+
- "iojs-v2"
12+
- "iojs-v1"
13+
14+
addons:
15+
apt:
16+
sources:
17+
- ubuntu-toolchain-r-test
18+
packages:
19+
- g++-4.8
20+
- gcc-4.8
21+
22+
before_install:
23+
# npm shipped with Node.js 0.8 doesn't support carret so let's update it
24+
- if [ "$TRAVIS_NODE_VERSION" == "0.8" ]; then npm install -g npm; fi

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Simple XML2JSON Parser
22
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/buglabs/node-xml2json?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
[![Build Status](https://travis-ci.org/buglabs/node-xml2json.svg?branch=master)](https://travis-ci.org/buglabs/node-xml2json)
34

45
It does not parse the following elements:
56

@@ -41,7 +42,7 @@ Default values:
4142
var options = {
4243
object: false,
4344
reversible: false,
44-
coerce: true,
45+
coerce: false,
4546
sanitize: true,
4647
trim: true,
4748
arrayNotation: false

lib/xml2json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ module.exports = function(xml, _options) {
144144
var schema = {
145145
object: joi.boolean().default(false),
146146
reversible: joi.boolean().default(false),
147-
coerce: joi.alternatives([joi.boolean(), joi.object()]).default(true),
147+
coerce: joi.alternatives([joi.boolean(), joi.object()]).default(false),
148148
sanitize: joi.boolean().default(true),
149149
trim: joi.boolean().default(true),
150150
arrayNotation: joi.boolean().default(false)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xml2json",
3-
"version": "0.8.1",
3+
"version": "0.9.0",
44
"description": "Converts xml to json and vice-versa, using node-expat.",
55
"repository": "git://github.com/buglabs/node-xml2json.git",
66
"license": "MIT",

0 commit comments

Comments
 (0)