Skip to content

Concerto v2.0.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@jeromesimeon jeromesimeon released this 16 Mar 15:38

This 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 of addModel* 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

See: (#340 #339) ✅

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) to peggy
  • 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

See: (#294 #206 ) ✅

Numerous improvements have been made to the JSONSchema support, including the ability to import a JSONSchema as a Concerto model.

Model Vocabularies

See: (#360 #374) ✅

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.