Skip to content

Commit 3b138bc

Browse files
authored
feat: support latest Concerto and TypeScript (#814)
Updates the Cicero packages to support the latest Concerto and sets the stage for TypeScript support (to be added to Template Engine). Signed-off-by: Dan Selman <danscode@selman.org> Signed-off-by: Dan Selman <dselman@meta.com> Co-authored-by: Dan Selman <dselman@meta.com>
1 parent ddd4df4 commit 3b138bc

File tree

177 files changed

+15001
-13021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+15001
-13021
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
68
branches:
79
- main
@@ -13,27 +15,33 @@ jobs:
1315
strategy:
1416
matrix:
1517
node-version:
16-
- 16.x
17-
- 18.x
18+
- 20.x
1819
os:
1920
- ubuntu-latest
20-
# - windows-latest
21-
- macOS-latest
2221

2322
runs-on: ${{ matrix.os }}
2423

2524
steps:
2625
- name: git checkout
27-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2827

2928
- name: Use Node.js ${{ matrix.node-version }}
30-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v4
3130
with:
3231
node-version: ${{ matrix.node-version }}
33-
32+
3433
- run: npm ci
3534
- run: npm run build --if-present
36-
- run: npm test
35+
- env:
36+
NODE_OPTIONS: "--max_old_space_size=4096"
37+
run: npm test
38+
39+
- name: Archive npm failure logs
40+
uses: actions/upload-artifact@v4
41+
if: failure()
42+
with:
43+
name: npm-logs
44+
path: C:\npm\cache\_logs\
3745

3846
- name: Calculate code coverage
3947
run: npm run coverage
@@ -74,15 +82,15 @@ jobs:
7482

7583
steps:
7684
- name: git checkout
77-
uses: actions/checkout@v2
85+
uses: actions/checkout@v4
7886

79-
- name: Use Node.js 18.x
80-
uses: actions/setup-node@v1
87+
- name: Use Node.js 20.x
88+
uses: actions/setup-node@v4
8189
with:
82-
node-version: 18.x
90+
node-version: 20.x
8391

84-
- name: Build
85-
run: npm ci
92+
- run: npm ci
93+
- run: npm run build --if-present
8694

8795
- name: timestamp
8896
id: timestamp
@@ -92,5 +100,6 @@ jobs:
92100
- name: build and publish
93101
run: |
94102
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
103+
node ./scripts/bump_version.js ${{ steps.timestamp.outputs.stamp }}
95104
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
96-
npm publish --workspaces --access public --tag=unstable 2>&1
105+
npm publish --workspaces --access public --tag=unstable 2>&1

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
release:
55
types:
6-
- released
6+
- published
77

88
jobs:
99
publish:
@@ -13,12 +13,12 @@ jobs:
1313

1414
steps:
1515
- name: git checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

18-
- name: Use Node.js 16.x
18+
- name: Use Node.js 20.x
1919
uses: actions/setup-node@v1
2020
with:
21-
node-version: 16.x
21+
node-version: 20.x
2222

2323
- run: npm ci
2424
- run: npm run build --if-present
@@ -31,13 +31,14 @@ jobs:
3131
- name: build and publish
3232
run: |
3333
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
34+
node ./scripts/bump_version.js ${{ github.event.release.tag_name }}
3435
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
3536
npm publish --workspaces --access public ${{ steps.tag.outputs.tag }} 2>&1
3637
3738
- name: Create PR to increment version
3839
uses: peter-evans/create-pull-request@v3
3940
with:
40-
base: master
41+
base: main
4142
commit-message: 'chore(actions): publish ${{ github.event.release.tag_name }} to npm'
4243
committer: GitHub <noreply@github.com>
4344
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Using Cicero you can take any existing natural language text (typically a clause
3131
Top level repository (cicero), with sub packages. Each sub-package is published as an independent npm module managed as npm packages:
3232
* [cicero-cli](https://github.com/accordproject/cicero/tree/master/packages/cicero-cli) : Command line interface (for parsing, execution, creating archives) for Accord Project legal templates
3333
* [cicero-core](https://github.com/accordproject/cicero/tree/master/packages/cicero-core) : Core classes to manage the grammar, models and logic of Accord Project legal templates
34-
* [cicero-tools](https://github.com/accordproject/cicero/tree/master/packages/cicero-tools) : Tools for generating code (UML, Java, etc.) from Accord Project legal templates
3534
* [generator-cicero-template](https://github.com/accordproject/cicero/tree/master/packages/generator-cicero-template): Utility to create a self-contained directory for a new Accord Project legal template
3635

3736
## Installation
@@ -94,7 +93,7 @@ Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respec
9493

9594
[linuxfound]: https://www.linuxfoundation.org
9695
[charter]: https://github.com/accordproject/governance/blob/master/accord-project-technical-charter.md
97-
[apmain]: https://accordproject.org/
96+
[apmain]: https://accordproject.org/
9897
[apblog]: https://medium.com/@accordhq
9998
[apdoc]: https://docs.accordproject.org/
10099
[apdiscord]: https://discord.com/invite/Zm99SKhhtA
@@ -105,4 +104,4 @@ Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respec
105104
[apache]: https://github.com/accordproject/cicero/blob/master/LICENSE
106105
[creativecommons]: http://creativecommons.org/licenses/by/4.0/
107106

108-
[apspec]: https://docs.accordproject.org/docs/accordproject-template.html
107+
[apspec]: https://docs.accordproject.org/docs/accordproject-template.html

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "0.24.0"
2+
"version": "0.25.0"
33
}

license.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"*.tgz"
5353
],
5454
"licenseFormats": {
55-
"js|njk|pegjs|cto|acl|qry|ergo": {
55+
"js|njk|pegjs|cto|acl|qry": {
5656
"prepend": "/*",
5757
"append": " */",
5858
"eachLine": {

0 commit comments

Comments
 (0)