Aquí hi ha 23 versions de D2, des de 20 de gener del 2023 fins a l’actual, 0.9.0. Cadascuna enllaça amb els instal·ladors del mateix desenvolupador.
23 versions en 4 anys · unes 6,3 per any
| Versió | Data | Mida | Fitxers |
|---|---|---|---|
| 0.9.0Darrera versió | 7 de setembre del 2026 | — | 64 bits MSI Notes de la versióFeatures 🚀
- TALA is now open source and bundled with D2, including the JavaScript/WASM package. Select it with d2 --layout=tala, D2_LAYOUT=tala, or vars.d2-config.layout-engine: tala. No separate plugin installation or license key is required.
- tala: configure layout attempts with --tala-seeds, D2_TALA_SEEDS, or vars.d2-config.data.tala-seeds.
- exports: render PNG, GIF, PDF, and PPTX with the built-in renderer
Improvements 🧹
- performance: reduce repeated work in Dagre ranking, text measurement, SVG preparation, and PNG encoding
- performance: reduce repeated work in selective imports, dynamic grid layout, and PNG connection rendering
- exports: reduce PNG memory usage and support images above the previous 67-megapixel limit
- performance: SVG rendering is approximately 10× faster across the E2E corpus. Real-world diagrams compile, lay out, and render approximately 3× faster at the median.
- renders: SVG exports are approximately 24% smaller across the E2E corpus and 18% smaller across real-world fixtures, with unchanged appearance.
- renders: render Markdown labels as native SVG instead of HTML foreignObject content
Bugfixes ⛑️
- install: reject the obsolete --tala installer flag with migration guidance before installing, instead of incorrectly claiming that older D2 releases bundle TALA
- sequence diagrams: keep synthetic lifeline endpoint IDs stable across architectures
- exports: honor D2_TIMEOUT during PNG and GIF rendering
- compiler: keep recursive globs out of class and variable definitions and report class reference cycles instead of overflowing the stack
- renders: decode gzip, Brotli, and deflate remote images before embedding them
For the latest d2.js changes, see separate changelog. |
| 0.8.2 | 24 d’agost del 2026 | — | 64 bits MSI Notes de la versióFeatures 🚀
- exports: gif exports work with animate: true keyword #2663
Improvements 🧹
- releases: strip native binaries, build and smoke-test all six archives in CI, produce reproducible archives with checksums, signed provenance, and SBOM attestations, and verify standalone downloads when GitHub provides a digest
- plugins: make render post-processing optional and deprecate it for removal after one protocol compatibility cycle; legacy external postprocess commands remain supported during the transition
- api: deprecate legacy layout-feature constants, raw-WASM ELK/object-order bridges, unused public wrappers, and test-only comparison, validation, and logging helpers; compatibility entry points remain callable for one release while in-repository callers use supported or internal replacements
- maintenance: update the Go toolchain to 1.27.0 and refresh Go, d2.js, CI, release dependencies, and compression-sensitive snapshots
- renders: update syntax highlighting and migrate archived font and PDF dependencies to maintained replacements
- d2dagre: replace the embedded JavaScript runtime with native Go Dagro and update its D2-used layout surface from Dagre 0.8.5 to Dagre 3.1.1 behavior. This intentionally changes node ordering and coordinates, edge routes, self-loops, and compound sizing in some diagrams; regenerate and review stored SVG or board-JSON snapshots
- d2sketch: update the native rough-go renderer from Rough.js 4.0.4 to 4.6.6 behavior. Seeded sketch strokes, fills, arrowheads, and SVG paths may change; regenerate and review stored sketch SVG snapshots
- d2elk: replace the embedded ELK.js 0.8.2 runtime with native Go elk-go and update D2's ELK layout profile to ELK.js 0.12.0 behavior. This is a layout-behavior update, not an output-compatible runtime swap:
- existing ELK diagrams may receive different node coordinates and ordering, edge and label routes, and component packing; regenerate and review stored SVG or board-JSON snapshots
- children of nested compound graphs may be reordered because ELK 0.12 cannot safely apply D2's previous nested model-order profile
- non-default --elk-algorithm modes may also produce different geometry; the optional DisCo algorithm is removed because upstream no longer bundles it
- d2latex: replace the embedded MathJax JavaScript runtime with the native Go mathjax-go port without changing rendered formulas
- performance: native Go engine migrations substantially reduce median end-to-end D2-to-SVG conversion time in Apple M4 benchmarks:
- Dagre is 7–9× faster
- ELK is 40–53× faster
- LaTeX is 21.6× faster on a four-formula diagram
- performance: remove superlinear compiler and layout bottlenecks in large globs, repeated imports, nested diagrams, compound Dagre graphs, bend-heavy ELK layouts, and style-only scenario/step boards #2827. Median Apple M4 single-CPU synthetic stress benchmarks for these targeted cliffs, rather than corpus-wide conversion averages, improve by:
- leading glob applied to 1,000 fields: 1.59s to 12ms (~133× faster)
- 100 references into the same 100-field import file: 54ms to 12ms (~4.6× faster)
- 4,000 flat fields: 67ms to 7ms (~9.6× faster)
- 3,200 distinct edges: 200ms to 19ms (~10.6× faster)
- 32-node base with 8 style-only scenarios and 8 steps (17 boards total): 40ms to 7.3ms (~5.5× faster)
- 340-object nested D2 Dagre layout: 1.30s to 0.88s (~32% faster)
- Dagro depth-100 compound layout: 3.60s to 0.90s (~4× faster)
- 250-node, 1,000-edge ELK layout: 337ms to 238ms (~30% faster)
- d2ascii:
- sql_table and uml class shapes are supported #2623
- newlines are handled #2626
- empty left columns are cropped #2626
- exports:
- Chromium download through CLI for PNG exports is prompted #2655
- animate-interval is no longer required, defaults to 1000ms for gifs #2663
- renders:
- remote images are fetched more reliably #2659
Bugfixes ⛑️
- d2dagre: keep same-direction parallel edges and self-loop routes finite when using Dagre 3.1.1 behavior
- d2svg: reject padding th |
| 0.7.1 | 19 d’agost del 2025 | — | 64 bits MSI Notes de la versióFeatures 🚀
- ASCII renders. Output txt for d2 to render diagrams as ASCII art #2572
- cross arrowhead shape is available #2190
- style.underline support for class fields and methods #2544
- markdown, latex, and code can be used as edge labels #2545
- border-x label positioning functionality #2549
- tooltips with near set always show even without hover #2564
- CLI supports customizing monospace fonts with --font-mono, --font-mono-bold, --font-mono-italic, and --font-mono-semibold flags #2590
Improvements 🧹
- labels on scenario/step boards can be set with primary value (like layers) #2579
- autoformatter preserves order of boards #2580
- rename "Legend" with a title/label of your choosing (especially useful for non-English diagrams) #2582
- sketch mode fonts will use custom fonts if provided #2582
Bugfixes ⛑️
- actors in sequence diagrams with labels and icons together no longer overlap, position keywords now work too #2548
- fix double glob behavior in scenarios (wasn't propagating correctly) #2557
- fix diagram bounding box not accounting for legend in some cases #2584
Breaking Changes
- If you are using D2 as a library/API, passing in a FontFamily with sketch renders will now use the font, instead of previously ignoring it.
For the latest d2.js changes, see separate changelog. |
| 0.7.0 | 2 de maig del 2025 | — | 64 bits MSI Notes de la versióFeatures 🚀
- Icons:
- connections can include icons #12
- Syntax:
- suspend/unsuspend to define models and instantiate them #2394
- Globs:
- support for filtering edges based on properties of endpoint nodes (e.g., &src.style.fill: blue) #2395
- level filter implemented #2473
- Render:
- markdown, latex, and code can be used as object labels #2204
- shape: c4-person to render a person shape like what the C4 model prescribes #2397
- Icons:
- border-radius should work on icon #2409
- Misc:
- Diagram legends are implemented #2416
Improvements 🧹
- CLI:
- Support validate command. #2415
- Watch mode ignores backup files (e.g. files created by certain editors like Helix). #2131
- Support for --omit-version flag. #2377
- Casing is ignored for plugin names #2486
- Compiler:
- links can be set to root path, e.g. /xyz. #2357
- When importing a file, attempt resolving substitutions at the imported file scope first #2482
- validate gradient color stops. #2492
- Parser:
- impose max key length. It's almost certainly a mistake if an ID gets too long, e.g. missing quotes #2465
- Render:
- horizontal padding added for connection labels #2461
Bugfixes ⛑️
- Compiler:
- fixes panic when sql_shape shape value had mixed casing #2349
- fixes panic when importing from a file with spread substitutions in vars #2427
- fixes support for center in d2-config #2360
- fixes panic when comment lines appear in arrays #2378
- fixes inconsistencies when objects were double quoted #2390
- fixes globs not applying to spread substitutions #2426
- fixes panic when classes were mixed with layers incorrectly #2448
- fixes panic when gradient colors are used in sketch mode #2481
- fixes panic using glob ampersand filters with composite values #2489
- fixes leaf ampersand filter when used with imports #2494
- Formatter:
- fixes substitutions in quotes surrounded by text #2462
- CLI:
- fetch and render remote images of mimetype octet-stream correctly #2370
- Composition:
- spread importing scenarios/steps was not inheriting correctly #2460
- imported fields were not merging with current fields/edges #2464
- Markdown:
- fixes nested var substitutions not working #2456
For the latest d2.js changes, see separate changelog. |
| 0.6.9 | 5 de febrer del 2025 | — | 64 bits MSI Notes de la versióFeatures 🚀
- Animations: style.animated: true is supported on shapes #2250
- Connections now support link #1955
- Vars: vars in markdown blocks are substituted #2218
- Markdown: Github-flavored tables work in md blocks #2221
- Render: adds box arrowheads #2227
- d2 fmt now supports a --check flag #2253
- CLI: PNG output to stdout is supported using --stdout-format png - #2291
- Globs: &connected and &leaf filters are implemented #2299
- CLI: add --no-xml-tag for direct HTML embedding #2302
- CLI: play cmd added for opening d2 input in online playground #2242
Improvements 🧹
- Composition: links pointing to own board are purged #2203
- Syntax: reserved keywords must be unquoted #2231
- Latex: Backslashes in Latex blocks do not escape #2232
- This is a breaking change. Previously Latex blocks required escaping the backslash. So
for older D2 versions, you should remove the excess backslashes.
- Links: non-http url scheme links are supported (e.g. x.link: vscode://file/) #2237
- Compiler: reserved keywords with missing values error instead of silently doing nothing #2251
- Render: SVG outputs conform to stricter HTML standards, e.g. no duplicate ids #2273
- Themes: theme names are consistently cased #2322
- Nears: constant nears avoid collision with edge routes #2327
Bugfixes ⛑️
- Imports: fixes using substitutions in icon values #2207
- Markdown: fixes ampersands in URLs in markdown #2219
- Globs: fixes edge case where globs with imported boards would create empty boards #2247
- Sequence diagrams: fixes alignment of notes when self messages are above it #2264
- Null: fixes nulling a connection with absolute syntax #2318
- Gradients: works with connection fills #2326
- Latex: fixes backslashes doubling on successive parses #2328 |
| 0.6.8 | 7 de novembre del 2024 | — | 64 bits MSI Notes de la versióFeatures 🚀
- Render: SVG files render in non-browser contexts (e.g. Inkscape, LaTeX) #2147
Improvements 🧹
- Lib: removes a dependency on external slog that was causing troubles with installation #2137
- CLI: attempts writing to path atomically, falling back to non-atomic if failed #2141
- Export: pptx has "created at" metadata removed, so successive runs yield the same result #2169
- Formatter: empty board keywords (e.g. layers) are removed #2178
- Render: a tooltip or link by itself will not expand width of shape #2183
Bugfixes ⛑️
- Render: fixes edge case of a 3d shape with outside label being cut off #2132
- Composition: labels for boards set with shorthand x: y was not applied #2182
- Globs: double globs (**) were erroring when used with multiple scenario boards #2195 |
| 0.6.5 | 18 d’abril del 2024 | — | 64 bits MSI Notes de la versióD2 0.6.5 has a hotfix for 0.6.4 breaking plugin compatibility. Also includes 2 compiler fixes regarding substitutions/vars.Bugfixes ⛑️
- Fix executable plugins that implement standalone router #1910
- Fix compiler error with multiple nested spread substitutions #1913
- Fix substitutions from imports into different scopes #1914 |
| 0.6.3 | 16 de desembre del 2023 | — | 64 bits MSI Notes de la versióD2 0.6.3 allows you to make your own and customize existing D2 themes. Here's an example with some random color codes.See docs
Playground link
Features 🚀
- Themes can be customized via d2-config vars. #1777
Improvements 🧹
- Icons can be added for special objects (sql_table, class, code, markdown, latex). #1774
Bugfixes ⛑️
- Fix importing files that override an existing value with an array. #1762
- Fixes missing unfilled triangle arrowheads when sketch flag is on. #1763
- Fixes a bug where the render target could be incorrect if the target path contains "index". #1764
- Fixes ELK layout with outside labels/icons. #1776
- Fixes a bug where an edge could become disconnected with dagre layout and direction right. #1778 |
| 0.6.1 | 9 d’octubre del 2023 | — | 64 bits MSI |
| 0.6.0 | 4 d’agost del 2023 | — | 64 bits MSI |
| 0.5.1 | 11 de juny del 2023 | — | 64 bits MSI |
| 0.5.0 | 9 de juny del 2023 | — | 64 bits MSI Notes de la versióFeatures 🚀
- D2 files have the ability to import from other D2 files. See docs. #1371
- sql_table alternatively takes an array of constraints instead of being limited to a single one. Thanks @satoqz ! #1245
Improvements 🧹
- Use shape-specific sizing for grid containers #1294
- Grid diagrams support nested shapes or grid diagrams #1309
- grid-gap, vertical-gap, and horizontal-gap apply to padding on grid diagrams #1309
- Watch mode browser uses an error favicon to easily indicate compiler errors.
Thanks @sinyo-matu ! #1240
- Grid layout performance improved when there are many similarly sized shapes #1315
- Connections and labels are adjusted for shapes with 3d or multiple #1340
- Constraints in sql_table render even if they have no matching abbreviation #1372
- Constraints in sql_table sheds their excessive letter-spacing and is padded from the end consistently #1372
- Duplicate image URLs in icons are only fetched once #1373
- In watch mode, images are cached by default across compiles.
Can be disabled with flag --img-cache=0. #1373
- Common invalid array separator , usage in class arrays returns a helpful error message #1376
- Invalid constraint usage is met with an error message, preventing a common mistake of omitting shape: sql_table #1379
- Connections no longer obscure outside labels #1381
- Container connections in dagre are more balanced #1384
- Connections that go through shape labels are now masked translucently #1383
Bugfixes ⛑️
- Shadow is no longer cut off when --pad is 0.
Thank you @LeonardsonCC ! #1326
- Fixes grid layout overwriting label placements for nested objects #1345
- Fixes fonts not rendering correctly on certain platforms.
Thanks @mikeday for identifying the solution. #1356
- Fixes folders not rendering in animations (--animate-interval) #1357
- Fixes panic using reserved keywords as containers #1358
- When multiple classes are change different attributes of arrowheads, they are
- Prevent empty block strings #1364
- Fixes dagre mis-aligning a nested shape's connection #1370
- Fixes a bug in grids sometimes putting a shape on the next row/column #1380
Breaking changes
- @xyz is now reserved as a pattern for imports. If you previously had a key that started like that, it must either be renamed or quoted like "@xyz".
- Likewise with ...@xyz (spread operator import) |
| 0.4.2 | 3 de maig del 2023 | — | 64 bits MSI |
| 0.4.1 | 18 d’abril del 2023 | — | 64 bits MSI |
| 0.4.0 | 10 d’abril del 2023 | — | 64 bits MSI |
| 0.3.0 | 31 de març del 2023 | — | 64 bits MSI |
| 0.2.6 | 20 de març del 2023 | — | 64 bits MSI |
| 0.2.5 | 17 de març del 2023 | — | 64 bits MSI |
| 0.2.4 | 9 de març del 2023 | — | 64 bits MSI |
| 0.2.3 | 7 de març del 2023 | — | 64 bits MSI |
| 0.2.2 | 6 de març del 2023 | — | 64 bits MSI |
| 0.2.1 | 25 de febrer del 2023 | — | 64 bits MSI |
| 0.1.6 | 20 de gener del 2023 | — | 64 bits MSI Notes de la versióFeatures 🚀
animated keyword implemented for connections. #652
animated connection example
border-radius keyword implemented for squares/rectangles. #688
circle arrowheads. #634
Improvements 🧹
ELK layouts tuned to have better defaults. #627
Code snippets of unrecognized languages will render (just without syntax highlighting). #650
Adds sketched versions of arrowheads. #656
Bugfixes ⛑️
Fixes code snippets not being tall enough with leading newlines. #664
Opacity was not being applied to labels of shapes (and other edge cases). #677
Fixes arrowheads sometimes appearing broken with sketch on. #656
Fixes attributes being ignored for sql_table to sql_table connections. #658
Icon URLs that needed escaping (e.g. with ampersands) are handled correctly by CLI. #666
Fixes self-connections inside layouts when using ELK. #676
Fixes inter-span messages between spans of the same actor in sequence diagrams. #694
Fixes arrowheads sometimes appearing broken in Dagre layouts. #649
Fixes tooltip/link attributes being ignored for sql_table and class. #658
Bounding box was not accounting for dimensions added by multiple and 3d keywords, which made them look cut off with 0 padding. #684, #685
Fixes markdown shapes being slightly too short for their text in some cases. #665
Fixes panic when the only diagram object has near set to a constant. #687 |