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

rdf-validate-shacl

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-validate-shacl - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

2

package.json
{
"name": "rdf-validate-shacl",
"version": "0.5.5",
"version": "0.5.6",
"description": "RDF SHACL validator",

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

@@ -7,2 +7,3 @@ import clownface from 'clownface'

const error = debug('validation-enging::error')
const defaultMaxNodeChecks = 50

@@ -14,2 +15,3 @@ class ValidationEngine {

this.maxErrors = options.maxErrors
this.maxNodeChecks = options.maxNodeChecks === undefined ? defaultMaxNodeChecks : options.maxNodeChecks
this.initReport()

@@ -23,3 +25,3 @@ this.recordErrorsLevel = 0

clone() {
return new ValidationEngine(this.context, { maxErrors: this.maxErrors })
return new ValidationEngine(this.context, { maxErrors: this.maxErrors, maxNodeChecks: this.maxNodeChecks })
}

@@ -29,2 +31,3 @@

const { rdf, sh } = this.context.ns
this.nodeCheckCounters = {}

@@ -74,2 +77,14 @@ this.reportPointer = clownface({

if (this.maxNodeChecks > 0) {
// check how many times we have already tested this focusNode against this shape
const id = JSON.stringify([focusNode, shape.shapeNode])
const nodeCheckCounter = this.nodeCheckCounters[id] === undefined ? 0 : this.nodeCheckCounters[id]
if (nodeCheckCounter > this.maxNodeChecks) {
// max node checks reached, so bail out
return false
}
// increment check counter for given focusNode/shape pair
this.nodeCheckCounters[id] = nodeCheckCounter + 1
}
const valueNodes = shape.getValueNodes(focusNode, dataGraph)

@@ -76,0 +91,0 @@ let errorFound = false

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