Skip to content

Concerto v2.0.0

Compare
Choose a tag to compare
@mttrbrts mttrbrts released this 20 Apr 08:56
b05be1d

This is a major release of Concerto 2.0 that includes new features, bug-fixes, enhancements and breaking changes.

Introduction

Concerto 2.0 delivers some fundamental improvements, whilst maintaining a high-degree of (though not total!) 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: (#408 #403 #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.

Decorator Sets

See: (#395) ✅

Adds a DecoratorManager class which can be used to load a JSON file containing a specification of decorators to be applied to model elements, and then to apply them to a ModelManager.

Changelog

  • chore(actions): publish v1.2.1 to npm by @github-actions in #335
  • fix(metamodel) Switches to Concerto metamodel 0.3 by @jeromesimeon in #338
  • chore(pegjs) : move from pegjs to peggy 1.2.0 by @dselman in #341
  • feature(core) Expose name resolution to MetaModel API by @jeromesimeon in #342
  • fix(build) Redo code coverage reporting, remove istanbul-combine by @jeromesimeon in #343
  • fix: generate interfaces for typescript. JSON schema should include abstract types. #345 and #346 by @dselman in #347
  • fix: remove Typescript namespaces #348 by @dselman in #349
  • Remove instanceof symbol by @dselman in #352
  • feature(parser) Switch model creation from old ast to metamodel by @jeromesimeon in #350
  • feat: generate typescript definitions by @dselman in #354
  • fix(metamodel) Changes to classes for file location by @jeromesimeon in #355
  • refactor(imports) clean up import handling from parser by @jeromesimeon in #356
  • fix: remove static class property by @dselman in #357
  • refactor(core+parser) Move CTO parser/printer out of core into its own package by @jeromesimeon in #353
  • fix(*) Some adjustments to jsdoc for TS generation by @jeromesimeon in #358
  • fix(*): set typescript enum values to strings (resolves #362) by @sstone1 in #363
  • fix(cto) AST printing when there is a concerto version + CLI bug by @jeromesimeon in #365
  • fix(cto) print field default and optional in correct order by @jeromesimeon in #367
  • fix(cto) Prints extends and identified in declarations in the right order by @jeromesimeon in #368
  • docs(README & CONTRIBUTING): updated slack link to discord's - #369 by @gaurav7019 in #370
  • feat: vocabulary manager by @dselman in #361
  • docs: update the module descriptions by @dselman in #371
  • Minor Typo by @AbhijithGanesh in #373
  • fix(core) Better error messages for out of range numeric values by @jeromesimeon in #377
  • feature(*): support external model resolution at the AST level by @jeromesimeon in #380
  • fix(build): Proper webpack/babel configuration + fixes to linter by @jeromesimeon in #383
  • chore(deps): bump urijs from 1.19.7 to 1.19.8 by @dependabot in #382
  • chore(deps): bump node-fetch from 2.6.6 to 2.6.7 by @dependabot in #381
  • fix(doc): Remove missing links from contrib-notes by @jeromesimeon in #384
  • chore(build): Upgrade and cleanup of dependencies by @jeromesimeon in #385
  • feature(util): Add label utility functions by @jeromesimeon in #386
  • fix(core): Better error message for missing required fields by @jeromesimeon in #387
  • chore(deps): bump urijs from 1.19.8 to 1.19.9 by @dependabot in #388
  • refactor(util): Move base exceptions to @accordproject/concerto-util by @jeromesimeon in #396
  • refactor(core): Distinguish Model Manager on CTO or AST, revise addModel operations by @jeromesimeon in #397
  • chore(actions): publish v2.0.0-alpha.1 to npm by @github-actions in #398
  • fix(core): Regression in update external models not returning model files by @jeromesimeon in #399
  • chore(actions): publish v2.0.0-alpha.2 to npm by @github-actions in #400
  • chore(build): Update engines constraints in all package.json by @jeromesimeon in #401
  • fix(types): update index.js for better type generation (resolves #402) by @sstone1 in #403
  • chore(deps): bump minimist from 1.2.5 to 1.2.6 by @dependabot in #404
  • fix(types): typescript type generation improvements (contributes to #402) by @sstone1 in #405
  • fix(types): visitor visit methods should be public by @sstone1 in #408
  • feat: support for externalizing decorators #393 by @dselman in #395
  • chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /packages/concerto-vocabulary by @dependabot in #409
  • refactor(errors): improve error messages by @stefanblaginov in #390
  • docs(readme): update links to discord by @mttrbrts in #410
  • chore(ci): trigger npm publish when a GH release is published by @mttrbrts in #411
  • chore(actions): publish v2.0.0-beta.1 to npm by @github-actions in #413
  • chore(deps): bump minimist from 1.2.5 to 1.2.6 by @dependabot in #412
  • chore(actions): publish v2.0.0-beta.2 to npm by @github-actions in #414

New Contributors

Full Changelog: v1.2.1...v2.0.0