@lde/pipeline-shacl-validator 0.12.0 → 0.12.2

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.
Files changed (2) hide show
  1. package/README.md +17 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -86,11 +86,20 @@ new ShaclValidator({
86
86
 
87
87
  #### Named graphs with `SparqlUpdateWriter`
88
88
 
89
- `SparqlUpdateWriter` uses `dataset.iri.toString()` as the named graph URI on
90
- every write, with no per-call override. A report writer that shares the
91
- endpoint with the pipeline's main writer would land the SHACL report in the
92
- same graph as the dataset's data — and `CLEAR GRAPH` on first write per
93
- dataset would erase it. To keep validation results in a separate graph,
94
- either point the report writer at a different repository/endpoint, or
95
- implement a small wrapper `Writer` that swaps `dataset.iri` for a derived
96
- report-graph IRI before delegating.
89
+ `SparqlUpdateWriter` defaults to `dataset.iri.toString()` as the named graph
90
+ URI. A report writer that shares the endpoint with the pipeline's main
91
+ writer would otherwise land the SHACL report in the same graph as the
92
+ dataset's data — and `CLEAR GRAPH` on first write per dataset would erase
93
+ it. To keep validation results in a separate graph, pass `graphIri` to
94
+ derive the target graph from the dataset:
95
+
96
+ ```ts
97
+ new SparqlUpdateWriter({
98
+ endpoint,
99
+ auth,
100
+ graphIri: (dataset) =>
101
+ new URL(
102
+ `https://example.org/shacl-validation/${encodeURIComponent(dataset.iri.toString())}`,
103
+ ),
104
+ });
105
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/pipeline-shacl-validator",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "SHACL validation for @lde/pipeline",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",
@@ -36,6 +36,6 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@lde/dataset": "0.7.4",
39
- "@lde/pipeline": "0.30.0"
39
+ "@lde/pipeline": "0.30.2"
40
40
  }
41
41
  }