Releases: accordproject/template-archive
Cicero 0.12.4 🥚
This release features offline support for Cicero, and bug / security fixes.
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Cicero Offline
✈️ Work on the plane! Cicero will cache external models for you, so you can work on your templates while offline. (#361)
Fixes
- Now properly checks for well-formed semver (PR #362)
- Dependency upgrade to Axios 0.19 for security
Cicero v0.12.3 🥚
This is a minor release, which features improvements and bug fixes.
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Cicero Generate
- ⚗️the
Corda
target works on the latest Corda 4.0 release, with fixes to code-generation for monetary amounts. (contribution @rogersanick)
Cicero Archive
- 🏃 you don't have to pass a
--archiveFile
option to thecicero archive
command anymore, it will use the name of the template and its version number to pick a name for you.
Cicero v0.12.2
⚙️ This is minor release, using the version of Composer Concerto exported as a component of the ergo-compiler
package. This provides a reliable way to ensure the same version of Concerto is used when importing multiple Cicero/Ergo packages in your application.
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Cicero v0.12.1 🥚
This is a bug fix release for Cicero, and also features a new cicero generateText
command which lets you generate the contract text for a given contract data in JSON!
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Command line
⚖️ With the new generateText
command (#348), you can now generate the contract text from JSON. For instance, considering the contract data for the minilatedeliveryandpenalty
clause:
{
"$class": "org.accordproject.minilatedeliveryandpenalty.MiniLateDeliveryClause",
"clauseId": "6c4456f0-7a8e-4746-9c9c-ef336206f34c",
"buyer": {
"$class": "org.accordproject.cicero.contract.AccordParty",
"partyId": "Betty Buyer"
},
"seller": {
"$class": "org.accordproject.cicero.contract.AccordParty",
"partyId": "Steve Seller"
},
"penaltyDuration": {
"$class": "org.accordproject.time.Duration",
"amount": 2,
"unit": "days"
},
"penaltyPercentage": 10.5,
"maximumDelay": {
"$class": "org.accordproject.time.Duration",
"amount": 15,
"unit": "days"
}
}
Calling cicero generateText --data data.json
should return the text of the contract:
$ cicero generateText --data data.json
11:32:24 - info: Using current directory as template folder
11:32:26 - info: Late Delivery and Penalty.
In case of delayed delivery of Goods, "Betty Buyer" shall pay to
"Steve Seller" a penalty amounting to 10.5% of the total
value of the Goods for every 2 days of delay. If the
delay is more than 15 days, the Buyer is entitled to
terminate this Contract.
Ergo
- 🧮 A new small library
interest.ergo
to calculate monthly payments for fixed rate mortgages - ⚙️ Fixes to the lexer to better handle escaped characters in strings (
\n
,\t
,\r
,\b
) (accordproject/ergo#606) - ⚙️ Strings can now use escaped ascii codes
\000
to\255
Bug fixes
- 🐞 Date/Time values now parse properly when some of the fields (e.g., milliseconds) are missing (#343)
- 🐞 Command line commands do not mandate a
state.json
file anymore (#345) - 🐞 Fix to the JavaScript code generation for infinity and not-a-number Double values (accordproject/ergo#612)
- 🐞 Fix to the command line:
--contractName
is not required anymore (accordproject/ergo#609) - 🐞 Do not fail validation for clauses returning atomic values
Cicero v0.12.0 🥚
This release features brand new markup for specifying the format of Dates and Times in templates, improvements to the metadata in templates and various internal improvements and bug fixes.
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Templates Markup
- 🕑 You can now specify your own format for date and time in the natural language grammar for templates. (#300 , #63) E.g., the following template variable:
[{dateTimeProperty as "D MMMM YYYY HH:mm:ss.SSSZ"}]
lets you parse contract text containing a date and time written as:
1 January 2018 05:15:20.123+05:00
System:
- 🔬The new metadata for templates provides a clearer distinction between source template archives and compiled template archives (#328)
- ⚙️ A completely redesigned execution engine, with two distinct instantiations: one using https://github.com/patriksimek/vm2 for sandboxed evaluation, and the other using JavaScript
eval
for browser support - ⚙️ A new
cicero-test
package better isolates testing support from the rest of the system
Bug fixes
- 🐞 Ergo command-line issues have been fixed (accordproject/ergo#591)
- 🐞 Cicero command-line issues have been fixed (#324)
Cicero v0.11.1
This is a bug fix release:
- 🐞Addresses issue with "Not a Number" floating point literals in the emitted JavaScript code
- 🐞VM execution should be passed the JSON after validation
Cicero v0.11.0
This is a major release! Some of the highlights include: support for handling and maintaining timezones in Date/Time operations, a new way to write tests for your legal contracts and clauses which does not require you to write code, and the ability to indicate semantic tags with your templates.
Also this release includes a completely redesigned API and execution engine, and Corda as a new target for the Cicero model generator.
Note that as of this release, Ergo is the only source language for contract logic in Accord Project templates. You can still compile templates to JavaScript for execution on NodeJs or other JavaScript-based platforms.
Cicero Core
- 🏷️ You can use the
keyword
field in your package.json and the newgetKeywords()
call gives you access to keywords as part of the template metadata. (contribution by @irmerk)
Cicero Execute
- ⚙️Completely redesigned execution API, Ergo and Cicero now share the same execution engine
- ⌛Execution API now takes a current time (ISO 8691 UTC format) as a parameter
- ⌛Using
moment-mini
for a smaller footprint of the execution engine
Cicero Generate
- ⚗️New
Corda
format, lets you generate Corda-ready Java classes from your templates.
Template testing
- 🥒New Format for tests uses Cucumber syntax, so you do not need to learn JavaScript for testing Accord Project templates!
Ergo
- 📲 New dispatch semantics: dispatch picks the clause with the most specific request type first, and the compiler rejects programs with two clauses with the same request type (accordproject/ergo#550)
- ⌛ DateTime operations maintain and take into account timezone information (accordproject/ergo#515)
- 🧮 New operator
%
for remainder,integerModulo
returns the modulo.integerMod
is removed. - 🚅 Various performance improvements
Bug fixes
- 🐞
getMonth
now returns month ranging from 1 to 12, instead of 0 to 11 (accordproject/ergo#574) - 🐞arraySubtract has parameters in the right order again in JavaScript backend (accordproject/ergo#576)
- 🐞Record construction properly handles duplicate fields (accordproject/ergo#516)
- 🐞
startOf
is not the same asendOf
anymore... (accordproject/ergo#513)
Cicero v0.10.2
As we wait for the next major release (thank you everyone for your patience!), we have a minor release adding new Ergo built-in functions.
Ergo Language
- 🛍 A new built-in function
singleton
returns the one element in a singleton array (ornone
) - 🛍 Support for parsing Double and Integer/Long from String
Cicero v0.10.1
Cicero v0.10.0
This release features the latest (and improved) Ergo 0.6.0 with a brand new DateTime library, overloaded operators, and various improvements to the Ergo compiler and type system!
Install the latest release of the Cicero command-line tool with
npm i -g @accordproject/cicero-cli
Ergo
- 🛍 Overloaded operators: never write
+i
again! (accordproject/ergo#375). - 🕑 You can now use directly
Duration
andPeriod
concepts from the most recent Concerto time model. New operations include converting durations between different time units, duration division and computing the minimum/maximum in an array of dates.DateTime support: (accordproject/ergo#345, accordproject/ergo#483)
Bug fixes
- 🐞 The JavaScript target now provides runtime access to the model's inheritance hierarchy (accordproject/ergo#58)
- 🐞 Accessing fields from records now works as expected (accordproject/ergo#385)
- 🐞 Long does not get confused with Double by the type checker anymore (accordproject/ergo#488)
- 🐞 Type checking for match over optionals now fails when the input type isn't an optional (as expected!) (accordproject/ergo#502), (accordproject/ergo#387)