@lde/docgen 0.6.17 → 0.6.19

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 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAqB7E"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMpD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAqB7E"}
package/dist/parse.js CHANGED
@@ -2,7 +2,7 @@ import { rdfDereferencer } from 'rdf-dereference';
2
2
  import jsonld from 'jsonld';
3
3
  import { rdfSerializer } from 'rdf-serialize';
4
4
  import streamToString from 'stream-to-string';
5
- const XSD_STRING = 'http://www.w3.org/2001/XMLSchema#string';
5
+ import { xsd } from '@tpluscode/rdf-ns-builders';
6
6
  export async function parseRdfToJsonLd(filePath) {
7
7
  const { data } = await rdfDereferencer.dereference(filePath, {
8
8
  localFiles: true,
@@ -27,7 +27,8 @@ function stripDefaultStringType(value) {
27
27
  }
28
28
  if (value && typeof value === 'object') {
29
29
  const record = value;
30
- if (record['@value'] !== undefined && record['@type'] === XSD_STRING) {
30
+ if (record['@value'] !== undefined &&
31
+ record['@type'] === xsd.string.value) {
31
32
  const { ['@type']: _, ...rest } = record;
32
33
  return rest;
33
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/docgen",
3
- "version": "0.6.17",
3
+ "version": "0.6.19",
4
4
  "description": "Generate documentation from SHACL shapes",
5
5
  "keywords": [
6
6
  "shacl",
@@ -35,6 +35,7 @@
35
35
  "!**/*.tsbuildinfo"
36
36
  ],
37
37
  "dependencies": {
38
+ "@tpluscode/rdf-ns-builders": "^5.0.0",
38
39
  "commander": "^15.0.0",
39
40
  "jsonld": "^9.0.0",
40
41
  "liquidjs": "^10.27.0",