moddle-xml
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -26,15 +26,18 @@ 'use strict'; | ||
jshint: { | ||
src: [ | ||
['<%=config.sources %>'] | ||
], | ||
gruntfile: [ | ||
'Gruntfile.js' | ||
], | ||
options: { | ||
jshintrc: true | ||
eslint: { | ||
check: { | ||
src: [ | ||
'{lib,test}/**/*.js' | ||
] | ||
}, | ||
fix: { | ||
src: [ | ||
'{lib,test}/**/*.js' | ||
], | ||
options: { | ||
fix: true | ||
} | ||
} | ||
}, | ||
mochaTest: { | ||
@@ -64,4 +67,5 @@ test: { | ||
grunt.registerTask('auto-test', [ 'test', 'watch:test' ]); | ||
grunt.registerTask('lint', [ 'eslint:check' ]); | ||
grunt.registerTask('default', [ 'jshint', 'test' ]); | ||
grunt.registerTask('default', [ 'lint', 'test' ]); | ||
}; |
@@ -620,3 +620,3 @@ 'use strict'; | ||
for (i = 0; !!(r = references[i]); i++) { | ||
for (i = 0; (r = references[i]); i++) { | ||
var element = r.element; | ||
@@ -623,0 +623,0 @@ var reference = elementsById[r.id]; |
@@ -22,2 +22,14 @@ 'use strict'; | ||
function inherits(ctor, superCtor) { | ||
ctor.super_ = superCtor; | ||
ctor.prototype = Object.create(superCtor.prototype, { | ||
constructor: { | ||
value: ctor, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
} | ||
function nsName(ns) { | ||
@@ -171,3 +183,3 @@ if (isString(ns)) { | ||
ValueSerializer.prototype = new BodySerializer(); | ||
inherits(ValueSerializer, BodySerializer); | ||
@@ -183,3 +195,3 @@ ValueSerializer.prototype.serializeTo = function(writer) { | ||
writer | ||
.append( '</' + nsName(this.ns) + '>') | ||
.append('</' + nsName(this.ns) + '>') | ||
.appendNewLine(); | ||
@@ -541,4 +553,4 @@ }; | ||
ElementSerializer.prototype.serializeTo = function(writer) { | ||
var hasBody = this.body.length, | ||
indent = !(this.body.length === 1 && this.body[0] instanceof BodySerializer); | ||
var firstBody = this.body[0], | ||
indent = firstBody && firstBody.constructor !== BodySerializer; | ||
@@ -551,5 +563,5 @@ writer | ||
writer.append(hasBody ? '>' : ' />'); | ||
writer.append(firstBody ? '>' : ' />'); | ||
if (hasBody) { | ||
if (firstBody) { | ||
@@ -585,3 +597,3 @@ if (indent) { | ||
TypeSerializer.prototype = new ElementSerializer(); | ||
inherits(TypeSerializer, ElementSerializer); | ||
@@ -588,0 +600,0 @@ TypeSerializer.prototype.build = function(element) { |
{ | ||
"name": "moddle-xml", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "XML import/export for documents described with moddle", | ||
@@ -44,7 +44,9 @@ "directories": { | ||
"chai": "^1.10.0", | ||
"eslint": "^3.19.0", | ||
"eslint-plugin-mocha": "^4.11.0", | ||
"grunt": "~0.4.2", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-contrib-connect": "~0.6.0", | ||
"grunt-contrib-jshint": "~0.7.2", | ||
"grunt-contrib-watch": "~0.5.0", | ||
"grunt-eslint": "^19.0.0", | ||
"grunt-mocha-test": "^0.12.4", | ||
@@ -51,0 +53,0 @@ "grunt-release": "^0.7.0", |
# moddle-xml | ||
[![Build Status](https://travis-ci.org/bpmn-io/moddle-xml.svg)](https://travis-ci.org/bpmn-io/moddle-xml) | ||
[![Build Status](https://travis-ci.org/bpmn-io/moddle-xml.svg?branch=master)](https://travis-ci.org/bpmn-io/moddle-xml) | ||
@@ -97,2 +97,2 @@ Read and write XML documents described with [moddle](https://github.com/bpmn-io/moddle). | ||
MIT | ||
MIT |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
98
0
41298
12
11
1186
1