hdt 3.0.3 → 3.1.1
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/.github/workflows/ci.yml +11 -2
- package/.jshintignore +1 -0
- package/.jshintrc +10 -0
- package/README.md +1 -1
- package/binding.gyp +1 -0
- package/lib/hdt.d.ts +47 -43
- package/package.json +3 -3
package/.github/workflows/ci.yml
CHANGED
|
@@ -10,11 +10,20 @@ jobs:
|
|
|
10
10
|
test:
|
|
11
11
|
runs-on: ${{ matrix.os }}
|
|
12
12
|
strategy:
|
|
13
|
+
fail-fast: false
|
|
13
14
|
matrix:
|
|
14
|
-
os:
|
|
15
|
+
os:
|
|
16
|
+
- ubuntu-20.04
|
|
17
|
+
- ubuntu-22.04
|
|
18
|
+
- ubuntu-latest
|
|
19
|
+
- macos-12
|
|
20
|
+
- macos-13
|
|
21
|
+
- macos-14
|
|
22
|
+
- macos-latest
|
|
15
23
|
node-version:
|
|
16
24
|
- 18.x
|
|
17
25
|
- 20.x
|
|
26
|
+
- 22.x
|
|
18
27
|
steps:
|
|
19
28
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
29
|
uses: actions/setup-node@v3
|
|
@@ -33,7 +42,7 @@ jobs:
|
|
|
33
42
|
**/node_modules
|
|
34
43
|
.rdf-test-suite-cache
|
|
35
44
|
.rdf-test-suite-ldf-cache
|
|
36
|
-
key: ${{ runner.os }}-test-modules-${{ hashFiles('**/package-lock.json') }}
|
|
45
|
+
key: ${{ runner.os }}-${{ runner.node-version }}-test-modules-${{ hashFiles('**/package-lock.json') }}
|
|
37
46
|
- name: Install dependencies
|
|
38
47
|
run: npm install
|
|
39
48
|
- name: Run tests
|
package/.jshintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node_modules
|
package/.jshintrc
ADDED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HDT for Node.js
|
|
2
2
|
[](https://www.npmjs.com/package/hdt)
|
|
3
|
-
[](https://github.com/LinkedDataFragments/HDT-Node/actions?query=workflow%3ACI)
|
|
4
4
|
[](https://david-dm.org/RubenVerborgh/HDT-Node)
|
|
5
5
|
[](https://david-dm.org/RubenVerborgh/HDT-Node#info=devDependencies)
|
|
6
6
|
|
package/binding.gyp
CHANGED
package/lib/hdt.d.ts
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import * as RDF from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
hasExactCount: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface Document {
|
|
34
|
-
searchTriples(sub?: RDF.Term, pred?: RDF.Term, obj?: RDF.Term, opts?: SearchTriplesOpts): Promise<SearchResult>;
|
|
35
|
-
countTriples(sub?: RDF.Term, pred?: RDF.Term, obj?: RDF.Term): Promise<SearchResult>;
|
|
36
|
-
searchLiterals(substring: string, opts?: SearchLiteralsOpts): Promise<SearchLiteralsResult>;
|
|
37
|
-
searchTerms(opts?: SearchTermsOpts): Promise<string[]>;
|
|
38
|
-
close(): Promise<void>;
|
|
39
|
-
readHeader(): Promise<string>;
|
|
40
|
-
changeHeader(triples:string, outputFile:string): Promise<Document>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function fromFile(filename: string, opts?: { dataFactory?: RDF.DataFactory }): Promise<Document>;
|
|
1
|
+
import * as RDF from "@rdfjs/types";
|
|
2
|
+
|
|
3
|
+
export interface SearchTermsOpts {
|
|
4
|
+
limit?: number;
|
|
5
|
+
position?: "subject" | "predicate" | "object";
|
|
6
|
+
prefix?: string;
|
|
7
|
+
subject?: string; // mutually exclusive with prefix and prioritized
|
|
8
|
+
object?: string, // mutually exclusive with prefix and prioritized
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SearchLiteralsOpts {
|
|
12
|
+
limit?: number;
|
|
13
|
+
offset?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SearchLiteralsResult {
|
|
17
|
+
literals: RDF.Literal[];
|
|
18
|
+
totalCount: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SearchTriplesOpts {
|
|
22
|
+
limit?: number;
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SearchResult {
|
|
27
|
+
triples: RDF.Quad[];
|
|
28
|
+
totalCount: number;
|
|
29
|
+
hasExactCount: boolean;
|
|
44
30
|
}
|
|
31
|
+
|
|
32
|
+
export interface Document {
|
|
33
|
+
searchTriples(sub?: RDF.Term, pred?: RDF.Term, obj?: RDF.Term, opts?: SearchTriplesOpts): Promise<SearchResult>;
|
|
34
|
+
|
|
35
|
+
countTriples(sub?: RDF.Term, pred?: RDF.Term, obj?: RDF.Term): Promise<SearchResult>;
|
|
36
|
+
|
|
37
|
+
searchLiterals(substring: string, opts?: SearchLiteralsOpts): Promise<SearchLiteralsResult>;
|
|
38
|
+
|
|
39
|
+
searchTerms(opts?: SearchTermsOpts): Promise<string[]>;
|
|
40
|
+
|
|
41
|
+
close(): Promise<void>;
|
|
42
|
+
|
|
43
|
+
readHeader(): Promise<string>;
|
|
44
|
+
|
|
45
|
+
changeHeader(triples: string, outputFile: string): Promise<Document>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function fromFile(filename: string, opts?: { dataFactory?: RDF.DataFactory }): Promise<Document>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hdt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Native bindings to access HDT compressed triple files.",
|
|
5
5
|
"author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"minimist": "^1.1.0",
|
|
35
|
-
"n3": "^1.3
|
|
35
|
+
"n3": "^1.17.3",
|
|
36
36
|
"nan": "^2.19.0",
|
|
37
|
-
"rdf-string": "^1.3
|
|
37
|
+
"rdf-string": "^1.6.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"eslint": "^5.3.0",
|