0.6.9 • Published 1 year ago
@lionweb/core v0.6.9
The core package
An NPM package that can be added to a Node.js/NPM codebase as follows:
$ npm add @lionweb/coreIt contains:
- several base types
- the LionCore M3, including the
builtinslanguage - functions for (de-)serialization
Starting points
The following is a list of links to potential starting points:
- Implementation of the LionCore metametamodel (M3): see the specific README.
- Metamodel-generic/-aspecific code regarding:
- TypeScript type definitions.
- Representation of references.
- Serialization.
Changelog
0.6.9 - not yet officially released
- Improve deserialization:
- Produce more meaningful messages for problems
- Configure how problems are reported through an instance of a
SimplisticHandler, calling a new functiondeserializeLanguagesWithHandler. The default value for the handler isdefaultSimplisticHandlerwhich just reports the problem to the JavaScript console (usingconsole.log). TheAccumulatingSimplisticHandlerclass accumulates the problems reported, which can be accessed through itsallProblemsmethod. TheAggregatingSimplisticHandlerclass aggregates the problems reported (with count), which can be output using itsreportAllProblemsOnConsolemethod, and accessed through itsallProblemsmethod. - Pass dependent languages also as languages from languages deserializer to regular deserializer, not just as referable data (which is only useful for the built-ins)
- Fix a bug in the serializer that caused an "unhelpful" exception on an unset or unresolved — i.e., "not-connected", represented by a
nullvalue — reference target . Now, such reference targets are simply skipped.
0.6.8
- With respect to deserialization:
- Relax deserialization to just skip serialized nodes for which the corresponding M2 data can't be found.
- Fix a bug w.r.t. enumeration literals — deserializing changed the keys of enumeration literals in the language's definition.
- Deserialization doesn't throw on unresolvable references, but warns on the console and returns
null(which means “unresolved”).
- Export
byIdMapfunction, which computes a map id → thing from an array of things with anid, from the package. - Made
SerializedProperty.valuenull-able, to align with the specification.
0.6.7
- Fix cycle in imports that some bundlers were having trouble with.
0.6.6
- The serializer now also serializes annotations.
- Add support for custom primitive types.
Specifically:
- A new interface type
PrimitiveTypeSerializer. - A default implementation
DefaultPrimitiveTypeSerializerof that that's aware of the LionCore built-in primitive types. serializeNodeshas an additional argument of typePrimitiveTypeSerializerwith as default value an instance ofDefaultPrimitiveTypeSerializer.
- A new interface type
0.6.5
- Add support for custom primitive types.
Specifically:
- A new interface type
PrimitiveTypeDeserializer. - A default implementation
DefaultPrimitiveTypeDeserializerof that that's aware of the LionCore built-in primitive types. deserializeSerializationChunkhas an additional argument of typePrimitiveTypeDeserializerwith as default value an instance ofDefaultPrimitiveTypeDeserializer.
- A new interface type
- Expose function
inheritsFrom.
0.6.4
- Add functions
mapValuesandinstantiableClassifiers. - Add a method
SymbolTable.languageMatchingto look up a language.
0.6.3
- The deserializer now deserializes all nodes in the serialization chunk, not just the root nodes (identified as having
parentset tonull). (This fixes issue #145.)- Also:
deserializeChunkis renamed todeserializeSerializationChunkfor naming consistency, althoughdeserializeChunkis retained as an alias.
- Also:
- Add a method
metaTypeto M3 types, to deduce classifiers' names from. (That fixes issue #143.)
0.6.2
- Add a method
Classifier.metaPointer.
0.6.1
- Introduce a
isBuiltinNodeConceptfunction that checks whether a classifier happens to be theNodeconcept built into LionCore. - Add a reference
annotatestoAnnotation.
0.6.0
- Introduce a type
SymbolTableto encapsulate lookup of languages' entities and their features.- Provide a naive and a memoising implementation of the
SymbolTableabstraction, and use the latter in the deserializer to make that (a bit) more performant.
- Provide a naive and a memoising implementation of the
0.5.0
This is the first version corresponding to a release of LionWeb (version: 2023.1) as a whole.
- Remove JSON Schema generation functionality – this wasn't up-to-date at all.
- Implement persistence of annotations on
Nodes, including (de-)serialization. - Added an optional field
resolveInfoForto theExtractionFacadetype, to compute the fieldresolveInfofield of a serialized reference target. The default used is to check whether a node instance implementsINamedand takes the value of thenamefield. - Breaking change:
serializeLanguageanddeserializeLanguageare now "multi-lingual" in the sense that a serialization chunk can contain multipleLanguages. As a result, these functions have been renamed to (the plural)serializeLanguages(with varargs), anddeserializeLanguages(returningLanguage[]). - (Bugfix:) Deserialize
Annotations. - Breaking change: Rework ID and key generation in the LionCore
LanguageFactory. As part of that:- Add
String[s]Mappertypes, aStringsMapperinstancelast, and functionsconcatenatorandchainto produce instances of them. - Remove
M3Node.keyedand the "awkward" key generation in theInstantiationFacadefor the LionCore language. - Remove types
IdGenerator, andKeyGeneratorand everything related to that. - Expose keys (instead of qualified names) for LionCore M3 and the LionCore built-ins.
- Add
- Add a type
DynamicINamedand an M3-functionconceptsOf, primarily for generation purposes. - Move
asTextand ID checking to@lionweb/utilities. - Expose a helper function
nameSorted. - Rename
ConceptInterface→Interface. - Change names:
ReadModelAPI→ExtractionFacade,WriteModelAPI→InstantiationFacade. - Change name of
conceptfields toclassifier, and their types (where applicable) toClassifier. - Fix
licensefield inpackage.jsonto"Apache-2.0". - Replace all occurrences of "LIon" (with uppercase 'I') with "Lion" (with lowercase 'i').
- Split the
ModelAPIinterface into a read- and write-part:ReadModelAPIvs.WriteModelAPI. - Make fixes w.r.t. multi-language models.
- Migrate from Deno to Node.js.
- Implement import of enums in Ecore importer.
No changelog has been kept for previous versions, regardless of whether these were published or not.
Development
Build it from source as follows:
npm run build0.6.10-beta.0
1 year ago
0.6.10-beta.1
1 year ago
0.6.10-beta.2
1 year ago
0.6.9
1 year ago
0.6.9-beta.2
1 year ago
0.6.9-beta.1
1 year ago
0.6.7
1 year ago
0.6.6
1 year ago
0.6.8
1 year ago
0.6.8-beta.0
1 year ago
0.6.6-beta.0
1 year ago
0.6.8-beta.1
1 year ago
0.6.8-beta.2
1 year ago
0.6.9-beta.0
1 year ago
0.6.8-beta.4
1 year ago
0.6.5-beta.0
1 year ago
0.6.5
1 year ago
0.6.4
2 years ago
0.6.4-beta.0
2 years ago
0.6.3
2 years ago
0.6.2
2 years ago
0.6.1
2 years ago
0.6.0
2 years ago
0.6.0-beta.3
2 years ago
0.6.0-beta.2
2 years ago
0.5.0
2 years ago
0.5.0-beta.9
2 years ago
0.5.0-beta.8
2 years ago
0.5.0-beta.7
2 years ago
0.5.0-beta.6
2 years ago
0.5.0-beta.5
2 years ago
0.5.0-beta.3
2 years ago
0.5.0-beta.2
2 years ago
0.5.0-beta.0
2 years ago