New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-xml-validator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-xml-validator - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test/test_xml_validator.js

13

Gruntfile.js

@@ -23,3 +23,3 @@ /*

jshintrc: '.jshintrc',
},
}
},

@@ -29,4 +29,7 @@

xml_validator: {
default: {
src: [ 'test/fixtures/example_ok.xml', 'test/fixtures/example_fail.xml' ]
valid: {
src: [ 'test/fixtures/example_ok.xml' ]
},
invalid: {
src: [ 'test/fixtures/example_fail.xml' ]
}

@@ -37,3 +40,3 @@ },

nodeunit: {
tests: ['test/*_test.js'],
tests: ['test/test_*.js'],
},

@@ -52,3 +55,3 @@

// plugin's task(s), then test the result.
grunt.registerTask('test', ['xml_validator', 'nodeunit']);
grunt.registerTask('test', ['nodeunit']);

@@ -55,0 +58,0 @@ // By default, lint and run all tests.

{
"name": "grunt-xml-validator",
"description": "Grunt plugin to validate XML files",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/kajyr/grunt-xml-validator",

@@ -25,3 +25,3 @@ "author": {

"engines": {
"node": ">= 0.8.0"
"node": ">= 0.10.0"
},

@@ -44,4 +44,4 @@ "scripts": {

"dependencies": {
"libxmljs": "^0.8.1"
"xmldom": "0.1.19"
}
}

@@ -36,2 +36,4 @@ # grunt-xml-validator

## Release History
2014.03.29 - let's give it a try :)
1.1.0 - Removed libxmljs due to incompatibility with Windows. Moved to xmldom.
1.0.0 - let's give it a try :)

@@ -13,9 +13,6 @@ /*

// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
grunt.registerMultiTask('xml_validator', 'Grunt plugin to validate XML files', function() {
// Merge task-specific and/or target-specific options with these defaults.
var libxmljs = require("libxmljs");
var DOMParser = require('xmldom').DOMParser;
var valid = 0;

@@ -28,10 +25,10 @@ var fail = false;

try {
var xmlDoc = libxmljs.parseXml(xml);
valid++;
grunt.verbose.ok(f, 'valid');
} catch(e) {
grunt.log.error(f + ' not valid');
fail = true;
}
var doc = new DOMParser({
locator:{},
errorHandler: function(level, msg) {
fail = true
}
}).parseFromString(xml,'text/xml');
});

@@ -42,3 +39,3 @@

} else {
grunt.log.ok( valid, ' files valid');
grunt.log.ok('Files valid');
}

@@ -45,0 +42,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc