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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glossarist",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "JavaScript SDK for Glossarist GCR packages — read, write, validate, and manage terminology concepts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -24,7 +24,11 @@ export class ConceptParser {
24
24
 
25
25
  let docs;
26
26
  try {
27
- docs = yaml.loadAll(raw, null, { schema: yaml.DEFAULT_SCHEMA });
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
- export {
62
- PRED, PREFIXES, SKOSXL, WELL_KNOWN,
63
- deterministicId, deterministicBnode,
64
- conceptUri, conceptToQuads,
65
- localizedConceptUri, localizedConceptToQuads,
66
- designationToQuads, skosLabelPredicate, skosxlLabelPredicate,
67
- detailedDefinitionToQuads,
68
- conceptSourceToQuads,
69
- collectQuads, writeTurtle, writeNTriples, writeJsonld, sortQuads,
70
- validateShacl, loadShapes, quadsToDataset,
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`.
@@ -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 {