@shaclmate/shacl-ast 4.0.37 → 4.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/generated.js CHANGED
@@ -111,14 +111,16 @@ function $identityValidationFunction(_schema, value) {
111
111
  const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
112
112
  function $monkeyPatchObject(obj, methods) {
113
113
  if (methods.toJson &&
114
- !globalThis.Object.prototype.hasOwnProperty.call(obj, "toJSON")) {
114
+ (!globalThis.Object.prototype.hasOwnProperty.call(obj, "toJSON") ||
115
+ typeof obj.toJSON === "function")) {
115
116
  const toJsonMethod = methods.toJson;
116
117
  obj.toJSON = function (_key) {
117
118
  return toJsonMethod(this);
118
119
  };
119
120
  }
120
121
  if (methods.$toString &&
121
- !globalThis.Object.prototype.hasOwnProperty.call(obj, "toString")) {
122
+ (!globalThis.Object.prototype.hasOwnProperty.call(obj, "toString") ||
123
+ typeof obj.toJSON === "function")) {
122
124
  const toStringMethod = methods.$toString;
123
125
  obj.toString = function () {
124
126
  return toStringMethod(this);
package/package.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "@rdfjs/term-map": "~2.0.2",
5
5
  "@rdfjs/term-set": "~2.0.3",
6
6
  "@rdfjs/types": "~2.0.1",
7
- "@rdfx/data-factory": "0.0.13",
8
- "@rdfx/resource": "0.0.13",
9
- "@rdfx/string": "0.0.13",
7
+ "@rdfx/data-factory": "0.0.18",
8
+ "@rdfx/resource": "0.0.18",
9
+ "@rdfx/string": "0.0.18",
10
10
  "@tpluscode/rdf-ns-builders": "~4.3.0",
11
11
  "@types/rdfjs__dataset": "~2.0.7",
12
12
  "@types/rdfjs__term-map": "~2.0.10",
@@ -44,5 +44,5 @@
44
44
  },
45
45
  "type": "module",
46
46
  "types": "./dist/index.d.ts",
47
- "version": "4.0.37"
47
+ "version": "4.0.38"
48
48
  }