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

terriajs-schema

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terriajs-schema - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

package.json
{
"name": "terriajs-schema",
"version": "0.4.0",
"version": "0.4.1",
"description": "JSON schema for TerriaJS.",

@@ -5,0 +5,0 @@ "main": "validateSchema.js",

@@ -20,2 +20,7 @@ "use strict";

function validate(filenames) {
function isUsefulError(error) {
// Now the delicate art of trying to guess which errors are meaningful and which are just spam.
// We suppress "meta-errors", assuming that a useful error is deeper in the tree.
return ['allOf','anyOf','not','oneOf'].indexOf(error.name) === -1;
}
var processed = 0, errors = 0, pad = ' ';

@@ -26,9 +31,9 @@ return when.map(when.map(filenames, readFile), function(fileContent, i) {

console.error('FAILED: ' + filenames[i] + ':' );
result.errors.forEach(function(error) {
// Now the delicate art of trying to guess which errors are meaningful and which are just spam.
// We suppress "meta-errors", assuming that a useful error is deeper in the tree.
if (['allOf','anyOf','not','oneOf'].indexOf(error.name) === -1) {
console.error(pad + error.name + ' ' + error.stack);
console.error(pad + ' Value: ' + JSON.stringify(error.instance).slice(0,160));
}
var shownErrors = result.errors.filter(isUsefulError);
if (!shownErrors.length) {
shownErrors = result.errors;
}
shownErrors.forEach(function(error) {
console.error(pad + error.name + ' ' + error.stack);
console.error(pad + ' Value: ' + JSON.stringify(error.instance).slice(0,160));
});

@@ -85,3 +90,2 @@ errors ++;

argv.version = argv.version || defaultVersion;
schemaPath = argv.schemadir || path.join(schemaBasePath, argv.version);
if (argv.terriajsdir) {

@@ -96,2 +100,3 @@ try {

}
schemaPath = argv.schemadir || path.join(schemaBasePath, argv.version);
argv.quiet || process.stdout.write('Loading schema: ' + path.join(schemaPath, '/Catalog.json ... '));

@@ -98,0 +103,0 @@ return loadNextSchema('Catalog.json').then(function() {

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