rdflib 2.2.36 → 2.2.37-4af628a5

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.
@@ -1,12 +1,22 @@
1
1
  /** A set of features that may be supported by a Data Factory */
2
2
 
3
3
  export let Feature = /*#__PURE__*/function (Feature) {
4
+ /** Whether the factory supports termType:Collection terms */
4
5
  Feature["collections"] = "COLLECTIONS";
6
+ /** Whether the factory supports termType:DefaultGraph terms */
5
7
  Feature["defaultGraphType"] = "DEFAULT_GRAPH_TYPE";
8
+ /** Whether the factory supports equals on produced instances */
6
9
  Feature["equalsMethod"] = "EQUALS_METHOD";
10
+ /** Whether the factory can create a unique idempotent identifier for the given term. */
7
11
  Feature["id"] = "ID";
12
+ /**
13
+ * Whether the factory will return the same instance for subsequent calls.
14
+ * This implies `===`, which means methods like `indexOf` can be used.
15
+ */
8
16
  Feature["identity"] = "IDENTITY";
17
+ /** Whether the factory supports mapping ids back to instances (should adhere to the identity setting) */
9
18
  Feature["reversibleId"] = "REVERSIBLE_ID";
19
+ /** Whether the factory supports termType:Variable terms */
10
20
  Feature["variableType"] = "VARIABLE_TYPE";
11
21
  return Feature;
12
22
  }({});
package/esm/serialize.js CHANGED
@@ -3,7 +3,7 @@ import { JSONLDContentType, N3ContentType, N3LegacyContentType, NQuadsAltContent
3
3
  /**
4
4
  * Serialize to the appropriate format
5
5
  */
6
- export default function serialize( /** The graph or nodes that should be serialized */
6
+ export default function serialize(/** The graph or nodes that should be serialized */
7
7
  target, /** The store */
8
8
  kb, base,
9
9
  /**
@@ -6,12 +6,22 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Feature = void 0;
7
7
  /** A set of features that may be supported by a Data Factory */
8
8
  let Feature = exports.Feature = /*#__PURE__*/function (Feature) {
9
+ /** Whether the factory supports termType:Collection terms */
9
10
  Feature["collections"] = "COLLECTIONS";
11
+ /** Whether the factory supports termType:DefaultGraph terms */
10
12
  Feature["defaultGraphType"] = "DEFAULT_GRAPH_TYPE";
13
+ /** Whether the factory supports equals on produced instances */
11
14
  Feature["equalsMethod"] = "EQUALS_METHOD";
15
+ /** Whether the factory can create a unique idempotent identifier for the given term. */
12
16
  Feature["id"] = "ID";
17
+ /**
18
+ * Whether the factory will return the same instance for subsequent calls.
19
+ * This implies `===`, which means methods like `indexOf` can be used.
20
+ */
13
21
  Feature["identity"] = "IDENTITY";
22
+ /** Whether the factory supports mapping ids back to instances (should adhere to the identity setting) */
14
23
  Feature["reversibleId"] = "REVERSIBLE_ID";
24
+ /** Whether the factory supports termType:Variable terms */
15
25
  Feature["variableType"] = "VARIABLE_TYPE";
16
26
  return Feature;
17
27
  }({});
package/lib/literal.d.ts CHANGED
@@ -33,7 +33,7 @@ export default class Literal extends Node implements TFLiteral {
33
33
  * Gets whether two literals are the same
34
34
  * @param other The other statement
35
35
  */
36
- equals(other: Term): boolean;
36
+ equals(other: Term | null | undefined): boolean;
37
37
  /**
38
38
  * The language for the literal
39
39
  * @deprecated use {language} instead
@@ -33,7 +33,7 @@ export default abstract class Node {
33
33
  * Compares whether the two nodes are equal
34
34
  * @param other The other node
35
35
  */
36
- equals(other: Term): boolean;
36
+ equals(other: Term | null | undefined): boolean;
37
37
  /**
38
38
  * Creates a hash for this node
39
39
  * @deprecated use {rdfFactory.id} instead if possible
package/lib/serialize.js CHANGED
@@ -10,7 +10,7 @@ var _types = require("./types");
10
10
  /**
11
11
  * Serialize to the appropriate format
12
12
  */
13
- function serialize( /** The graph or nodes that should be serialized */
13
+ function serialize(/** The graph or nodes that should be serialized */
14
14
  target, /** The store */
15
15
  kb, base,
16
16
  /**
package/lib/tf-types.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface Term {
12
12
  *
13
13
  * Note that the task force spec only allows comparison with other terms
14
14
  */
15
- equals(other: Term): boolean;
15
+ equals(other: Term | null | undefined): boolean;
16
16
  }
17
17
  /**
18
18
  * RDF/JS spec NamedNode
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rdflib",
3
3
  "description": "an RDF library for node.js. Suitable for client and server side.",
4
- "version": "2.2.36",
4
+ "version": "2.2.37-4af628a5",
5
5
  "private": false,
6
6
  "browserslist": [
7
7
  "> 0.5%"
@@ -44,47 +44,47 @@
44
44
  "homepage": "http://github.com/linkeddata/rdflib.js",
45
45
  "bugs": "http://github.com/linkeddata/rdflib.js/issues",
46
46
  "dependencies": {
47
- "@frogcat/ttl2jsonld": "^0.0.9",
47
+ "@babel/runtime": "^7.26.9",
48
+ "@frogcat/ttl2jsonld": "^0.0.10",
49
+ "@rdfjs/types": "^2.0.1",
48
50
  "@xmldom/xmldom": "^0.8.10",
49
- "cross-fetch": "^3.1.8",
50
- "jsonld": "^8.3.2",
51
- "n3": "^1.17.3",
52
- "solid-namespace": "^0.5.3"
51
+ "cross-fetch": "^3.2.0",
52
+ "jsonld": "^8.3.3",
53
+ "n3": "^1.23.1",
54
+ "solid-namespace": "^0.5.4"
53
55
  },
54
56
  "devDependencies": {
55
- "@babel/cli": "^7.24.1",
56
- "@babel/core": "^7.24.4",
57
+ "@babel/cli": "^7.26.4",
58
+ "@babel/core": "^7.26.9",
57
59
  "@babel/plugin-proposal-class-properties": "^7.18.6",
58
- "@babel/plugin-transform-runtime": "^7.24.3",
59
- "@babel/preset-env": "^7.24.4",
60
- "@babel/preset-typescript": "^7.24.1",
61
- "@babel/register": "^7.23.7",
62
- "@babel/runtime": "^7.24.4",
63
- "@types/chai": "^4.3.14",
64
- "@types/dirty-chai": "^2.0.4",
60
+ "@babel/plugin-transform-runtime": "^7.26.9",
61
+ "@babel/preset-env": "^7.26.9",
62
+ "@babel/preset-typescript": "^7.26.0",
63
+ "@babel/register": "^7.25.9",
64
+ "@types/chai": "^4.3.20",
65
+ "@types/dirty-chai": "^2.0.5",
65
66
  "@types/express": "^4.17.21",
66
- "@types/jsonld": "^1.5.13",
67
- "@types/mocha": "^10.0.6",
67
+ "@types/jsonld": "^1.5.15",
68
+ "@types/mocha": "^10.0.10",
68
69
  "@types/sinon-chai": "^3.2.12",
69
- "babel-loader": "^9.1.3",
70
- "chai": "^4.4.1",
70
+ "babel-loader": "^9.2.1",
71
+ "chai": "^4.5.0",
71
72
  "diff": "^5.2.0",
72
73
  "dirty-chai": "^2.0.1",
73
- "eslint": "^8.57.0",
74
+ "eslint": "^9.20.1",
74
75
  "fs-grep": "0.0.5",
75
76
  "locate-path": "^7.2.0",
76
- "mocha": "^10.4.0",
77
- "nock": "^13.5.4",
77
+ "mocha": "^10.8.2",
78
+ "nock": "^13.5.6",
78
79
  "node-fetch": "^3.3.2",
79
80
  "node-polyfill-webpack-plugin": "^2.0.1",
80
- "rdf-js": "^4.0.2",
81
- "sinon": "^15.0.3",
81
+ "sinon": "^15.2.0",
82
82
  "sinon-chai": "^3.7.0",
83
83
  "source-map-loader": "^4.0.2",
84
84
  "ts-node": "^10.9.2",
85
85
  "typedoc": "^0.25.13",
86
86
  "typescript": "^5.0.4",
87
- "webpack": "^5.91.0",
87
+ "webpack": "^5.98.0",
88
88
  "webpack-cli": "^5.1.4",
89
89
  "webpack-dev-server": "^4.15.2"
90
90
  },
package/src/literal.ts CHANGED
@@ -61,7 +61,7 @@ export default class Literal extends Node implements TFLiteral {
61
61
  * Gets whether two literals are the same
62
62
  * @param other The other statement
63
63
  */
64
- equals (other: Term): boolean {
64
+ equals (other: Term | null | undefined): boolean {
65
65
  if (!other) {
66
66
  return false
67
67
  }
@@ -61,7 +61,7 @@ export default abstract class Node {
61
61
  * Compares whether the two nodes are equal
62
62
  * @param other The other node
63
63
  */
64
- equals (other: Term): boolean {
64
+ equals (other: Term | null | undefined): boolean {
65
65
  if (!other) {
66
66
  return false
67
67
  }
package/src/tf-types.ts CHANGED
@@ -20,7 +20,7 @@ export interface Term {
20
20
  *
21
21
  * Note that the task force spec only allows comparison with other terms
22
22
  */
23
- equals (other: Term): boolean
23
+ equals (other: Term | null | undefined): boolean
24
24
  }
25
25
 
26
26
  /**