glossarist 0.4.3 → 0.4.5
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/package.json +1 -1
- package/src/concept-parser.js +5 -1
- package/src/index.js +10 -13
- package/src/models/index.d.ts +0 -2
package/package.json
CHANGED
package/src/concept-parser.js
CHANGED
|
@@ -24,7 +24,11 @@ export class ConceptParser {
|
|
|
24
24
|
|
|
25
25
|
let docs;
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
// js-yaml 5.x dropped the explicit DEFAULT_SCHEMA export; the
|
|
28
|
+
// default schema is applied automatically when no `schema`
|
|
29
|
+
// option is passed. Passing CORE_SCHEMA reproduces the historical
|
|
30
|
+
// behavior (yaml.org core schema).
|
|
31
|
+
docs = yaml.loadAll(raw, { schema: yaml.CORE_SCHEMA ?? yaml.JSON_SCHEMA });
|
|
28
32
|
} catch (err) {
|
|
29
33
|
throw new YamlParseError(label, err);
|
|
30
34
|
}
|
package/src/index.js
CHANGED
|
@@ -58,16 +58,13 @@ export {
|
|
|
58
58
|
} from './entity-directory.js';
|
|
59
59
|
|
|
60
60
|
// RDF serialization layer (WS C). Mirrors lib/glossarist/rdf/.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} from './rdf/index.js';
|
|
72
|
-
|
|
73
|
-
export { ConceptToGlossTransform } from './transforms/concept-to-gloss.transform.js';
|
|
61
|
+
//
|
|
62
|
+
// NOTE: RDF and transforms are intentionally NOT re-exported from the
|
|
63
|
+
// main entry. They use Node-specific APIs (node:crypto for deterministic
|
|
64
|
+
// IDs) and pulling them in here would break browser builds. Consumers
|
|
65
|
+
// import them via the dedicated subpaths:
|
|
66
|
+
//
|
|
67
|
+
// import { conceptToQuads, writeTurtle } from 'glossarist/rdf';
|
|
68
|
+
// import { ConceptToGlossTransform } from 'glossarist/transforms';
|
|
69
|
+
//
|
|
70
|
+
// Both subpaths are declared in package.json `exports`.
|
package/src/models/index.d.ts
CHANGED
|
@@ -42,8 +42,6 @@ export class GlossaristModel {
|
|
|
42
42
|
static fromJSON(data: Record<string, unknown>): GlossaristModel;
|
|
43
43
|
equals(other: GlossaristModel): boolean;
|
|
44
44
|
clone(): GlossaristModel;
|
|
45
|
-
protected _lazy<T>(cacheKey: string, rawKey: string, wrapFn: (item: any) => T): T[];
|
|
46
|
-
protected _serialize(obj: Record<string, unknown>, jsonKey: string, cacheKey: string, rawKey: string): void;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export class Concept extends GlossaristModel {
|