feat!: markdown-transform 1.0.1 / cicero-core 1.0.1, tsc+webpack build, browser support#157
Merged
Merged
Conversation
Consume the TypeScript rewrite of the Accord Project markdown stack and the matching
cicero-core release.
- @accordproject/cicero-core 0.26.0 -> 1.0.1
- @accordproject/markdown-common/template/html 0.18.0 -> 1.0.1
- @accordproject/concerto-core/util/vocabulary 4.0.3 -> 4.1.4, concerto-codegen 4.0.1 -> 4.1.3
(cicero-core 1.0.1 and markdown 1.0.1 require concerto ^4.1.3)
- markdown-transform now dedupes to 1.0.1; the stale transitive 0.18.0 tree is gone
- TemplateArchiveProcessor: fix the deep import (cicero-core/types/src/script ->
cicero-core/lib/script, now that cicero-core ships its types under lib/) and drop the
bogus `{ options }` arg to the now-typed fromMarkdownTemplate (it only accepts `{ verbose? }`)
- bump the typescript test archive's cicero range ^0.26.0 -> ^1.0.0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: dselman <danscode@selman.org>
Coverage Report for CI Build 26942285029Coverage increased (+18.0%) to 81.49%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
mttrbrts
approved these changes
Jun 4, 2026
Member
mttrbrts
left a comment
There was a problem hiding this comment.
Do you have a migration guide for the docs site?
| import { transform } from '@accordproject/markdown-transform'; | ||
| import { TypeScriptToJavaScriptCompiler } from './TypeScriptToJavaScriptCompiler'; | ||
| import Script from '@accordproject/cicero-core/types/src/script'; | ||
| import Script from '@accordproject/cicero-core/lib/script'; |
Member
There was a problem hiding this comment.
We should export this properly upstream
Adopt the Accord Project build pattern (tsc -> lib/, webpack -> umd/) for consistency across the repos, and verify browser usage end-to-end. Build - replace rollup with `tsc -p tsconfig.build.json` -> lib/index.js (CJS) + lib/index.d.ts (drops the rollup ESM/bundled output); main/types now point at lib/, worker.js is emitted to lib/worker.js (getWorkerPath fallback dist -> lib) - add a webpack UMD browser bundle -> umd/template-engine.js (browser field), with node fallbacks (child_process/fs/os false, path/crypto/stream/buffer shims); no source map to keep the published package small - re-export ModelManager and TemplateMarkTransformer so a single browser bundle can run the model -> template -> agreement flow with one concerto instance - remove the now-redundant markdown `declare module` .d.ts shims (markdown 1.0.1 ships real types) Tests / CI - add an `e2e/` Playwright workspace that loads umd/template-engine.js into headless Chromium and exercises fromMarkdownTemplate + checkTypes (a full browser generate awaits the twoslash/webpack TS->JS compiler reconciliation) - CI: build on Node.js 22 only across ubuntu/macos/windows (drop 20.x), add a Browser E2E (Chromium) job, keep code coverage - publish includes only lib/ + umd/ (3.6MB packed) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: dselman <danscode@selman.org>
…c compilation)
The browser branch of TypeScriptToJavaScriptCompiler.initialize() dynamically imported
typescript from a CDN URL, which webpack cannot resolve in the UMD bundle
('Cannot find module https://...'). twoslash already pulls typescript into the bundle, so
the browser can use the bundled module directly.
This makes the full Playground browser loop work: parse -> type-check -> compile the
template's TypeScript logic to JS -> evaluate, all in the browser. The e2e now does a real
generate() in headless Chromium (regression guard) instead of only parse + checkTypes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: dselman <danscode@selman.org>
- README: add a Browser usage section (UMD bundle / `browser` field, the in-browser parse->type-check->compile->eval flow that powers Template Playground, the re-exported ModelManager/TemplateMarkTransformer, and the source- vs compiled-archive / Node-only caveats) - bump engines.node to >=22 (required by markdown-transform / cicero-core 1.0.1) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: dselman <danscode@selman.org>
Contributor
Author
Not yet. Cicero version in template archives will need to be bumped to 1.0.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades template-engine to the TypeScript Accord Project stack, switches the build to the AP-standard
tsc+webpackpattern, and makes the full author/run loop work in the browser.Dependency upgrade
@accordproject/cicero-core0.26.0 -> 1.0.1markdown-common/markdown-template/markdown-html0.18.0 -> 1.0.1(now dedupes — the stale 0.18.0 tree is gone)concerto-core/util/vocabulary4.0.3 -> 4.1.4,concerto-codegen4.0.1 -> 4.1.3TemplateArchiveProcessor: deep importcicero-core/types/src/script -> cicero-core/lib/script; drop the now-typed-away{ options }arg tofromMarkdownTemplatedeclare module.d.tsshims (1.0.1 ships real types)Build (rollup -> tsc + webpack)
tsc -p tsconfig.build.json->lib/index.js(CJS) +lib/index.d.ts;main/typesmove tolib/, the rollup ESM output is droppedumd/template-engine.js(browserfield), node fallbacks, no source mapModelManager+TemplateMarkTransformerso one browser bundle runs the whole flow with a single concerto instancelib/+umd/(3.6MB packed)Browser
e2e/Playwright workspace loads the UMD bundle into headless Chromium and runs a realgenerate()CI
BREAKING CHANGE
mainmoves fromdist/index.js(bundled CJS + ESM) tolib/index.js(unbundled CJS); the separate ESM build is dropped. Requires Node.js >= 22. Templates must target Cicero^1.0.0.Generated with Claude Code