Concerto v2.0.0-alpha.1
Pre-releaseThis is an alpha release of Concerto 2.0
Introduction
Concerto 2.0 delivers some fundamental improvements, whilst maintaining a high-degree (though not total!) of backwards compatibility.
It notably includes several new packages:
@accordproject/concerto-util
contains utility functions used in other parts of the code and fundamentally independent from Concerto as a modeling language@accordproject/concerto-metamodel
contains utility functions for accessing and manipulating the new Concerto metamodel@accordproject/concerto-cto
contains the parser for the.cto
syntax for Concerto. The parser now outputs a proper Concerto object, instance of the metamodel rather than a custom JSON object.@accordproject/concerto-vocabulary
contains new functionality to handle model vocabularies
💥 Breaking Changes
- Concerto libraries now require Node.js version 14 or later. Node.js version 12 is no longer supported
- Some utility modules or functions have been moved from existing packages into the new
@accordproject/concerto-util
notably: file loaders, file writers, the logger class, and some base exceptions. - Some of the APIs for the
ModelManager
class have been revised, with a new set ofaddModel*
methods on that class - Some of the APIs for the
ModelFile
class have been revised, notably the constructor for that class now expect a Concerto syntax tree (an object instance of the Concerto metamodel) rather than a string using.cto
syntax
New Parser and MetaModel
The parser for Concerto (.cto
syntax) has been fully re-implemented. Some of the main changes are:
- Switch from the
pegjs
parser generator (no longer maintained) topeggy
- The output of parsing is now a valid Concerto object which means it can be handled using the Concerto API. That object is an instance of a model called the Concerto MetaModel which is published in the Accord Project models repository
TypeScript improvements
See: (#318 #362 #348 #345 #322 #170 ) ✅
Numerous improvements have been made to the TypeScript support, both to the TypeScript API for the Concerto package(s) and to the TypeScript code-generation from models.
JSONSchema improvements
Numerous improvements have been made to the JSONSchema support, including the ability to import a JSONSchema as a Concerto model.
Model Vocabularies
A new syntax allows to define a set of locale-specific vocabularies for your models. This allows a user to define the terminology for the model in various natural languages.