Skip to content

Commit 4af628a

Browse files
authored
Merge pull request #667 from jeswr/fix/rdfjs-stub
fix: use @rdfjs/types rather than rdf-js stub
2 parents 07fd952 + 9d8148b commit 4af628a

File tree

6 files changed

+15
-36
lines changed

6 files changed

+15
-36
lines changed

package-lock.json

Lines changed: 10 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"dependencies": {
4747
"@babel/runtime": "^7.26.9",
4848
"@frogcat/ttl2jsonld": "^0.0.10",
49+
"@rdfjs/types": "^2.0.1",
4950
"@xmldom/xmldom": "^0.8.10",
5051
"cross-fetch": "^3.2.0",
5152
"jsonld": "^8.3.3",
@@ -77,7 +78,6 @@
7778
"nock": "^13.5.6",
7879
"node-fetch": "^3.3.2",
7980
"node-polyfill-webpack-plugin": "^2.0.1",
80-
"rdf-js": "^4.0.2",
8181
"sinon": "^15.2.0",
8282
"sinon-chai": "^3.7.0",
8383
"source-map-loader": "^4.0.2",

src/literal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class Literal extends Node implements TFLiteral {
6161
* Gets whether two literals are the same
6262
* @param other The other statement
6363
*/
64-
equals (other: Term): boolean {
64+
equals (other: Term | null | undefined): boolean {
6565
if (!other) {
6666
return false
6767
}

src/node-internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default abstract class Node {
6161
* Compares whether the two nodes are equal
6262
* @param other The other node
6363
*/
64-
equals (other: Term): boolean {
64+
equals (other: Term | null | undefined): boolean {
6565
if (!other) {
6666
return false
6767
}

src/tf-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface Term {
2020
*
2121
* Note that the task force spec only allows comparison with other terms
2222
*/
23-
equals (other: Term): boolean
23+
equals (other: Term | null | undefined): boolean
2424
}
2525

2626
/**

tests/types/rdfjs-compatibility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
DataFactory,
33
} from '../../src/index';
4-
import * as RdfJs from 'rdf-js';
4+
import * as RdfJs from '@rdfjs/types';
55

66
const factory = DataFactory;
77

0 commit comments

Comments
 (0)