Skip to content

chore(deps): upgrade markdown packages to 2.0.0, concerto-codegen to 7.1.0 and cicero-core to 3.0.0 - #206

Merged
mttrbrts merged 4 commits into
accordproject:mainfrom
ujjwalv01:chore/markdown-2.0
Oct 11, 2026
Merged

mttrbrts merged 4 commits into
accordproject:mainfrom
ujjwalv01:chore/markdown-2.0

Conversation

@ujjwalv01

@ujjwalv01 ujjwalv01 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of #185 (section 2), as requested in #185 (comment) and in review.

Upgrades the dependencies whose new releases have landed:

This is only the version bumps. No source changes were needed: template-engine imports these packages only through their root entry points (CodeGen and Common from codegen, the markdown classes and models, and the Template and Script types from cicero-core), which the new exports maps keep. #207 removed the last deep cicero-core import. Switching to named ESM imports and template-engine's own ESM/exports work come in a later PR.

The lockfile changes only these packages and what they bring in or drop:

  • the markdown bump adds @noble/hashes (a new dependency of markdown-template 2.0);
  • the codegen bump changes a single entry;
  • the cicero-core 2.3 bump removes 15 nested packages (cicero-core's markdown 1.1.0 copies, and the extra markdown-cicero / markdown-it-cicero 2.0.0 copies with their pinned semver) and moves the top-level markdown-cicero and markdown-it-cicero to 2.0.0;
  • the cicero-core 3.0 bump changes a single entry: its new dependencies (buffer, @noble/hashes) were already installed.

npm ls now shows a single 2.0.0 copy of every markdown package and a single concerto-core, deduplicated under cicero-core, and the lockfile holds one copy of every @accordproject package.

Commits

  • chore(deps): upgrade markdown packages to 2.0.0: package.json and package-lock.json.
  • chore(deps): upgrade concerto-codegen to 7.1.0: package.json and package-lock.json.
  • chore(deps): upgrade cicero-core to 2.3.0: package.json and package-lock.json.
  • chore(deps): upgrade cicero-core to 3.0.0: package.json, package-lock.json, and the accordproject.cicero range of the three test archives (^2.0.0 → ^3.0.0), which cicero-core 3.0 would otherwise refuse to load.

Compatibility

  • Template typing. markdown 2.0 includes fix(markdown-template): preserve parent scope in conditional and optional blocks markdown-transform#683 and #684. Variables inside {{#if}} blocks, inside primitive and enum {{#optional}} blocks, and in their {{else}} branches now type-check against the parent scope, where they used to fail with Unknown property (Cannot use variables inside an #if block template-playground#2). This only accepts templates that were rejected before. No snapshots changed: the test templates use variables only in blocks that already worked ({{#optional loyaltyStatus}}{{level}} on a concept, {{this}} in {{#optional age}}), and their {{#if}} bodies and {{else}} branches contain no variables.

  • Browser bundle. webpack now resolves the markdown packages and codegen through their browser conditions to ES modules (lib/esm-browser, dist/esm-browser) instead of nested UMD bundles. Codegen's browser build imports concerto-core, concerto-util and concerto-vocabulary as bare dependencies, so it shares template-engine's single copy instead of bundling its own. webpack stats show one package root each for codegen and the three Concerto packages.

    UMD Raw Gzipped
    5.2.0 (published) 9.95 MB 2.77 MB
    + markdown 2.0 5.86 MB 1.53 MB
    + concerto-codegen 7.1 5.35 MB 1.40 MB
    + cicero-core 2.3 5.36 MB 1.40 MB
    + cicero-core 3.0 5.36 MB 1.40 MB
  • Templates must target cicero 3. cicero-core checks that its version satisfies the template's accordproject.cicero range, so with 3.0.0 a template declaring ^2.0.0 fails to load (The template targets Cicero version ^2.0.0 but the current Cicero version is 3.0.0.). The three test archives now declare ^3.0.0. Templates used with this template-engine release need the same change.

  • cicero-core is not in the UMD. template-engine imports only the Template and Script types from cicero-core, so tsc drops the import and webpack stats show no cicero-core module, before and after the 3.0 bump. The UMD size is unchanged by it.

  • One copy of each markdown package. With cicero-core@^2.2.0, markdown 1.1.0 held the top of node_modules, so npm nested markdown-cicero and markdown-it-cicero 2.0.0 under each of markdown-template, markdown-transform and markdown-html, and the UMD bundled them three times. With 2.3.0, webpack stats show a single package root, at 2.0.0, for every markdown package. The bundled source shrinks by about 90 kB, but webpack had already tree-shaken most of the duplicated code, so the minified UMD stays at 5.36 MB (1.40 MB gzipped). The gain is a deduplicated install and a single markdown version for consumers, which unblocks template-playground#981.

Testing

  • jest --ci (snapshots are compared, not written): 19/19 suites, 182/182 tests, 46/46 snapshots pass, with no snapshot changes. (Run in parallel with the e2e suite, some TemplateArchiveProcessor and TemplateMarkInterpreter tests hit their timeouts; those suites pass on their own.)
  • npm run licchk and npm run lint: 0 errors. Lint's 8 warnings are already on main, in generated files.
  • npm run build:dist: TypeScript and the webpack UMD build complete.
  • npx playwright test --config e2e/playwright.config.ts: 6/6 Chromium tests pass.

🤖 Generated with Claude Code

@ujjwalv01
ujjwalv01 marked this pull request as ready for review October 11, 2026 12:20
@ujjwalv01
ujjwalv01 requested a review from a team October 11, 2026 12:20
@ujjwalv01

Copy link
Copy Markdown
Contributor Author

@mttrbrts the template-engine bump is up: #206 . It moves markdown-common, -template and -transform (and the markdown-html dev dependency) to ^2.0.0, with no source changes and no snapshot changes. The UMD drops from 9.95 MB to 5.86 MB (1.53 MB gzipped), since webpack now picks up markdown 2.0's ES modules. cicero-core ^2.2.0 still pulls markdown 1.x until its own bump is released, so template-playground#981 still waits on both.

Comment thread package.json Outdated
Comment on lines 48 to 49
@@ -50,9 +50,9 @@

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's hold this PR until cicero-core is released. Also, we should upgrade concerto-codegen at the same time.

@ujjwalv01 ujjwalv01 changed the title chore(deps): upgrade markdown packages to 2.0.0 chore(deps): upgrade markdown packages to 2.0.0 and concerto-codegen to 7.1.0 Oct 11, 2026
@ujjwalv01

Copy link
Copy Markdown
Contributor Author

Done: concerto-codegen is now ^7.1.0 here (one lockfile entry; webpack bundles it from dist/esm-browser and it shares the single concerto-core). Holding until cicero-core is released with template-archive#951, then I'll add that bump. That also collapses the three nested copies of markdown-cicero 2.0 that the current cicero-core forces.

@ujjwalv01
ujjwalv01 requested a review from mttrbrts October 11, 2026 13:06
@mttrbrts

Copy link
Copy Markdown
Member

Done: concerto-codegen is now ^7.1.0 here (one lockfile entry; webpack bundles it from dist/esm-browser and it shares the single concerto-core). Holding until cicero-core is released with template-archive#951, then I'll add that bump. That also collapses the three nested copies of markdown-cicero 2.0 that the current cicero-core forces.

@ujjwalv01 cicero-core@2.3.0 is now released. Thanks!

@ujjwalv01 ujjwalv01 changed the title chore(deps): upgrade markdown packages to 2.0.0 and concerto-codegen to 7.1.0 chore(deps): upgrade markdown packages to 2.0.0, concerto-codegen to 7.1.0 and cicero-core to 2.3.0 Oct 11, 2026
@ujjwalv01

Copy link
Copy Markdown
Contributor Author

@mttrbrts , all three upgrades are in now: markdown 2.0, concerto-codegen 7.1 and cicero-core 2.3. With cicero-core 2.3, npm ls shows a single 2.0.0 copy of every markdown package (15 nested packages left the lockfile), and the UMD bundles one copy of each. Tests, snapshots, build and e2e pass. Could you take another look?

@ujjwalv01

Copy link
Copy Markdown
Contributor Author

@mttrbrts cicero-core 3.0.0 is out now too. Would you like this PR on ^3.0.0 instead of ^2.3.0? With 3.0, template-engine's bundle takes cicero-core's ES module build instead of its UMD, and you already checked template-archive#954's build against template-engine main. I can add that commit and report the UMD size, or keep 2.3 here and do 3.0 separately.

@mttrbrts

Copy link
Copy Markdown
Member

@mttrbrts cicero-core 3.0.0 is out now too. Would you like this PR on ^3.0.0 instead of ^2.3.0? With 3.0, template-engine's bundle takes cicero-core's ES module build instead of its UMD, and you already checked template-archive#954's build against template-engine main. I can add that commit and report the UMD size, or keep 2.3 here and do 3.0 separately.

Let's do 3.0.0 here too, please

Refs accordproject#185

Signed-off-by: Ujjwal Verma <ujjwalverma010305@gmail.com>
Refs accordproject#185

Signed-off-by: Ujjwal Verma <ujjwalverma010305@gmail.com>
cicero-core 2.3.0 depends on markdown ^2.0.0, so npm installs a single 2.0.0 copy of every markdown package.

Refs accordproject#185

Signed-off-by: Ujjwal Verma <ujjwalverma010305@gmail.com>
@mttrbrts
mttrbrts enabled auto-merge (squash) October 11, 2026 14:53
auto-merge was automatically disabled October 11, 2026 15:08

Head branch was pushed to by a user without write access

cicero-core 3.0 only loads templates whose accordproject.cicero range includes its version, so the test archives now target ^3.0.0.

Refs accordproject#185

Signed-off-by: Ujjwal Verma <ujjwalverma010305@gmail.com>
@ujjwalv01 ujjwalv01 changed the title chore(deps): upgrade markdown packages to 2.0.0, concerto-codegen to 7.1.0 and cicero-core to 2.3.0 chore(deps): upgrade markdown packages to 2.0.0, concerto-codegen to 7.1.0 and cicero-core to 3.0.0 Oct 11, 2026
@ujjwalv01

ujjwalv01 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@mttrbrts cicero-core is now on 3.0.0 here, and the branch is rebased on main (including #207). The UMD is 5.36 MB (1.40 MB gzipped), down from 5.86 MB with markdown 2.0 alone, with one copy each of the markdown packages and concerto-core. Tests, snapshots, build and e2e pass.

One thing to flag: cicero-core 3.0 rejects templates whose accordproject.cicero range excludes 3.0 ("The template targets Cicero version ^2.0.0..."), so the 3.0 commit also moves three test archives (formula-uses-logic-helper, latedeliveryandpenalty-typescript, no-logic-template) to ^3.0.0. cicero-core's MIGRATION.md doesn't mention this yet; I'll open a small docs PR in template-archive for it. Existing templates (for example, the playground's samples) will need the same change when they move to 3.0.

Could you take another look?

UPD : Docs PR for the cicero range check: accordproject/template-archive#956

@mttrbrts
mttrbrts merged commit 7186250 into accordproject:main Oct 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants