feat!: upgrade to Concerto v4.0.3 (breaking change)#137
Conversation
There was a problem hiding this comment.
Pull request overview
Updates template-engine to better align with Concerto v4 API changes by removing deprecated ModelManager strict-mode usage and adding explicit serializer option objects to relevant deserialization calls.
Changes:
- Remove
{ strict: true }fromModelManagerinstantiations (tests + interpreter internal validation helpers). - Update
Serializer.fromJSON(...)call sites to pass an explicitSerializerOptionsobject. - Update Jest snapshots to match the new diagnostics output.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/TemplateMarkInterpreter.ts |
Removes ModelManager strict mode and adds serializer options for validation/deserialization. |
test/TemplateMarkInterpreter.test.ts |
Removes strict mode from ModelManager in interpreter integration tests. |
test/HelloWorld.test.ts |
Removes strict mode from ModelManager in hello-world test setup. |
test/GenerateOptions.test.ts |
Removes strict mode from ModelManager in generation options tests. |
test/CustomTemplateModel.test.ts |
Removes strict mode from ModelManager in custom model test setup. |
test/__snapshots__/TemplateMarkInterpreter.test.ts.snap |
Snapshot updates reflecting changed error locations/output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
24e66fc to
6a6d67b
Compare
|
Thanks for working on this! However, adding explicit options like The root cause is that the TypeScript type definitions in Concerto v4 appear to incorrectly require these options. I've opened an upstream issue to fix this: accordproject/concerto#1192 Once that's fixed, this PR can be simplified to just remove the Let's fix the type definitions upstream first, then revisit this PR. This comment was generated by AI on behalf of @mttrbrts. |
|
Understood! Sorry for the delay, I will get to this asap. |
Signed-off-by: Aadityavardhan Singh <[email protected]>
6a6d67b to
f531d3d
Compare
|
@mttrbrts done, ready for review |
- Bump concerto-core, concerto-util to 4.0.2 and concerto-codegen to 4.0.0
- Add concerto-vocabulary 4.0.2 (required peer dep of concerto-codegen v4)
- Fix all Serializer constructor calls to pass empty options object ({})
- Fix all serializer.fromJSON() calls to pass empty options object ({})
- Add explicit types to InMemoryWriter.getFilesInMemory() forEach callback
(InMemoryWriter is typed as `any` in concerto-util v4 exports)
- Update snapshots to reflect v4 codegen output (concerto namespace types
no longer emitted; line offsets updated accordingly)
- Bump package version to 3.0.0 (breaking: drops Concerto v3 support)
BREAKING CHANGE: requires Concerto v4; not compatible with Concerto v3
Co-Authored-By: Matt Roberts <[email protected]>
- @accordproject/cicero-core: 0.25.2 → 0.26.0 - @accordproject/concerto-codegen: 4.0.0 → 4.0.1 - @accordproject/concerto-core: 4.0.2 → 4.0.3 - @accordproject/concerto-util: 4.0.2 → 4.0.3 - @accordproject/concerto-vocabulary: 4.0.2 → 4.0.3 - @accordproject/markdown-common: 0.17.2 → 0.18.0 - @accordproject/markdown-template: 0.17.2 → 0.18.0 - @accordproject/markdown-html: 0.17.2 → 0.18.0 Co-Authored-By: Claude Opus 4.5 (1M context) <[email protected]> Signed-off-by: mttrbrts <[email protected]>
Co-Authored-By: Claude Opus 4.5 (1M context) <[email protected]> Signed-off-by: mttrbrts <[email protected]>
Co-Authored-By: Claude Opus 4.5 (1M context) <[email protected]> Signed-off-by: mttrbrts <[email protected]>
Co-Authored-By: Claude Opus 4.5 (1M context) <[email protected]> Signed-off-by: mttrbrts <[email protected]>
Coverage Report for CI Build 25486640833Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 63.844%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
fixes #136
This PR fixes the first and second problems listed in #136, as directed by @mttrbrts, these changes did not break the v3 build and as per my understanding, the strict : true parameter for modelManager was mostly redundant.
For the serializer API changes I updated Serializer.fromJSON() calls, adding an option:
({ validate: true, acceptResourcesForRelationships: false });
This satisfies v3's strict TypeScript requirements for the SerializerOptions interface while preparing the calls for v4's updated signature where these options are made optional.
Updated snapshots to adjust these changes.