ts-graphviz

Simple Graphviz library for TypeScript.

MIT License

Downloads
4.2M
Stars
116
Committers
11

Bot releases are visible (Hide)

ts-graphviz - v1.0.0 🌈

Published by github-actions[bot] about 2 years ago

🚀 Shift to AST-centered design (Major Version Upgrade)

Purpose of Major Version Upgrade

The modules around AST were integrated, and the functions for models stringing to DOT language, distributed in multiple locations, have been consolidated.

See #622

New Features

ts-graphviz/ast Module

In this Pull Request, we have taken the @ts-graphviz/parser package and integrated its functionality.

We provided AST-related processing such as parse and stringify functions as the ts-graphviz/ast module.
We also made internal improvements for the extensibility of processing.

Attribute Types

We have prepared type definitions for various attributes.

This allows for editorial assistance in specifying attributes and checks in TypeScript.

See #542

BREAKING CHANGES

Structure of AST

The structure of ASTs provided by @ts-graphviz/parser is different from that offered by ts-graphviz/ast.

There are few changes to the implementation of parser, and the modifications are aimed at unifying the naming across the package and commonality to the JavaScript ecosystem.

Interface naming conventions

In integrating AST into the package, ambiguity in the naming conventions became a problem.

Accordingly, the following actions were taken

  • We abolished the naming convention for existing interfaces prefixed with I, such as ICluster, and changed it so that the naming is the same overall as for the AST type.
  • For those that do not have an implementation like interface, a naming convention such as XxxModel has been established.
  • The Claster has been deprecated and renamed to XxxGraphModel.

As a result, the naming of v0 series and v1 series are mapped as follows.

  • INode -> NodeModel
  • IEdge -> EdgeModel
  • ICluster -> GraphBaseModel
  • ISubgraph -> SubgraphModel
  • IRootCluster -> RootGraphModel

Other Changes

And we have also made the following improvements

Issues

  • #618
  • #615
  • #601
  • #600

PR

  • ci: change GitHub Pages Deploy method @kamiazya (#660)
  • chaos: improve maintainability @kamiazya (#659)
  • Bump minimist from 1.2.5 to 1.2.6 @dependabot (#581)
  • Add download badge to README.md @kamiazya (#559)
  • Add devcontainer @kamiazya (#520)
  • Bump typedoc from 0.20.36 to 0.22.4 @dependabot (#514)
  • Bump tmpl from 1.0.4 to 1.0.5 @dependabot (#516)
  • Update node-ci.yml @kamiazya (#492)
  • Bump path-parse from 1.0.6 to 1.0.7 @dependabot (#488)
ts-graphviz - v0.16.0 🌈

Published by github-actions[bot] over 3 years ago

🚀 Features

  • Improve types @kamiazya (#455)

Changes

  • Bump ws from 7.4.2 to 7.4.6 @dependabot (#421)
ts-graphviz - v0.15.1 🌈

Published by github-actions[bot] over 3 years ago

Changes

  • upgrade dependencies and fix code styles @kamiazya (#408)
  • add exports field for ESModule @kamiazya (#407)
  • Bump hosted-git-info from 2.8.5 to 2.8.9 @dependabot (#406)
  • Bump lodash from 4.17.20 to 4.17.21 @dependabot (#403)
ts-graphviz - v0.15.0 🌈

Published by github-actions[bot] over 3 years ago

Some Internal API braking changes.

Changes

  • Bump jest-graphviz from 0.3.1 to 0.4.0 @dependabot-preview (#282)
  • Upgrade to GitHub-native Dependabot @dependabot-preview (#390)
  • [Security] Bump y18n from 4.0.0 to 4.0.1 @dependabot-preview (#367)
ts-graphviz - v0.14.0 🌈

Published by github-actions[bot] almost 4 years ago

🚀 Features

  • Added API to specify common attributes in a cluster. @kamiazya (#277)

🐛 Bug Fixes

  • stop running CI on Windows @kamiazya (#279)

Changes

  • Update dev dependencies and fix build script @kamiazya (#280)
  • [Security] Bump yargs-parser from 13.1.1 to 13.1.2 @dependabot-preview (#216)
ts-graphviz - v0.13.2 🌈

Published by github-actions[bot] about 4 years ago

🐛 Bug Fixes

  • Fix edge targets validation @kamiazya (#212)

Changes

  • Bump typescript from 3.9.3 to 3.9.7 @dependabot-preview (#190)
  • Bump typedoc from 0.17.7 to 0.18.0 @dependabot-preview (#202)
  • Bump rollup-plugin-typescript2 from 0.27.1 to 0.27.2 @dependabot-preview (#209)
  • Bump @types/jest from 25.2.3 to 26.0.10 @dependabot-preview (#208)
  • Bump rollup-plugin-terser from 5.3.0 to 7.0.0 @dependabot-preview (#203)
  • Bump eslint-plugin-jest from 23.13.1 to 23.20.0 @dependabot-preview (#198)
  • Bump rollup from 2.10.7 to 2.26.5 @dependabot-preview (#211)
  • Bump eslint-plugin-import from 2.20.2 to 2.22.0 @dependabot-preview (#179)
  • Bump eslint-plugin-prettier from 3.1.3 to 3.1.4 @dependabot-preview (#171)
  • [Security] Bump lodash from 4.17.15 to 4.17.20 @dependabot-preview (#205)
  • docs: add elasticdotventures as a contributor @allcontributors (#157)
  • typescript errors in README @elasticdotventures (#156)
ts-graphviz - v0.13.1 🌈

Published by github-actions[bot] over 4 years ago

🐛 Bug Fixes

  • add attribute undefined value validation @kamiazya (#154)

Changes

  • Bump rollup from 2.10.5 to 2.10.7 @dependabot-preview (#153)
  • Bump jest from 25.3.0 to 25.5.4 @dependabot-preview (#128)
  • [Security] Bump minimist from 1.2.0 to 1.2.5 @dependabot-preview (#152)
ts-graphviz - v0.13.0 🌈

Published by github-actions[bot] over 4 years ago

🚀 Features

  • Add grouped edge target @kamiazya (#150)
const root = new Digraph();
const [node1, node2, node3, node4] = Array(4)
    .fill(true)
    .map((_, i) => root.createNode(`node${i + 1}`));
const edge = new Edge([node1, [node2, node3], node4]);
root.addEdge(edge);
console.log(toDot(root));
digraph {
  "node1" -> {"node2" "node3"} -> "node4";
}

result

Changes

  • Bump @types/jest from 25.2.1 to 25.2.3 @dependabot-preview (#144)
  • Bump @typescript-eslint/eslint-plugin from 2.33.0 to 2.34.0 @dependabot-preview (#145)
  • Bump @typescript-eslint/parser from 2.33.0 to 2.34.0 @dependabot-preview (#146)
  • Bump eslint-plugin-jest from 23.11.0 to 23.13.1 @dependabot-preview (#141)
  • Bump tslib from 1.11.1 to 2.0.0 @dependabot-preview (#137)
  • Bump ts-jest from 25.3.1 to 25.5.1 @dependabot-preview (#131)
  • Bump typedoc from 0.17.6 to 0.17.7 @dependabot-preview (#143)
  • Bump rollup from 2.10.2 to 2.10.5 @dependabot-preview (#149)
  • Bump typescript from 3.9.2 to 3.9.3 @dependabot-preview (#148)
ts-graphviz - v0.12.0 🌈

Published by github-actions[bot] over 4 years ago

HAS BRAKING CHANGES

🚀 Features

There are many changes to the flexibility of the API in this release.

  • Refactor API @kamiazya (#126)

Migration Guide

  • IContext interface was removed.

  • ICluster's createEdge method API was changed.

- createEdge(...targets: EdgeTarget[]): IEdge;
+ createEdge(targets: EdgeTarget[], attributes?: EdgeAttributesObject): IEdge;
  • remove toDot method, use the toDot function instead.
import { digraph, toDot } from 'ts-graphviz';
const g = digraph();

const node1 = g.createNode('node1');
const node2 = g.createNode('node2');

g.createEdge([node1, node2]);

console.log(toDot(g));

Changes

  • Bump @types/jest from 25.1.4 to 25.2.1 @dependabot-preview (#108)
  • Bump eslint-plugin-jest from 23.10.0 to 23.11.0 @dependabot-preview (#138)
  • Bump @typescript-eslint/parser from 2.31.0 to 2.33.0 @dependabot-preview (#139)
  • Bump @typescript-eslint/eslint-plugin from 2.31.0 to 2.33.0 @dependabot-preview (#136)
  • Bump typedoc from 0.16.11 to 0.17.6 @dependabot-preview (#130)
  • Bump rollup from 2.6.1 to 2.10.2 @dependabot-preview (#140)
  • Bump typescript from 3.8.3 to 3.9.2 @dependabot-preview (#132)
  • Bump rollup-plugin-typescript2 from 0.26.0 to 0.27.1 @dependabot-preview (#134)
  • change linter to eslint @kamiazya (#125)
  • fix CI, fix to kamiazya/setup-graphviz @kamiazya (#124)
  • Bump jquery from 3.4.1 to 3.5.0 @dependabot (#123)
ts-graphviz - v0.11.0 🌈

Published by github-actions[bot] over 4 years ago

🐛 Bug Fixes

  • Add ForwardRefNode object @kamiazya (#121)

Changes

  • upgrade jest-graphviz @kamiazya (#120)
  • Fix repository url @kamiazya (#119)
ts-graphviz - v0.10.0 🌈

Published by github-actions[bot] over 4 years ago

🚀 Features

  • Improve Attributes API @kamiazya (#115)

Changes

  • Bump rollup from 2.0.6 to 2.6.1 @dependabot-preview (#114)
  • Bump ts-jest from 25.2.1 to 25.3.1 @dependabot-preview (#107)
  • Bump jest from 25.1.0 to 25.3.0 @dependabot-preview (#111)
  • Bump tslint-plugin-prettier from 2.1.0 to 2.3.0 @dependabot-preview (#98)
ts-graphviz - v0.9.1 🌈

Published by github-actions[bot] over 4 years ago

Changes

  • Bump rollup from 1.32.1 to 2.0.6 @dependabot-preview (#89)
  • Bump typescript from 3.7.5 to 3.8.3 @dependabot-preview (#84)
  • Bump tslib from 1.10.0 to 1.11.1 @dependabot-preview (#81)
  • Bump ts-jest from 25.1.0 to 25.2.1 @dependabot-preview (#77)
  • Bump @types/jest from 25.1.1 to 25.1.4 @dependabot-preview (#86)
  • Bump rollup-plugin-typescript2 from 0.25.3 to 0.26.0 @dependabot-preview (#74)
  • Bump typedoc from 0.16.9 to 0.16.11 @dependabot-preview (#82)
  • Bump rollup from 1.30.1 to 1.32.1 @dependabot-preview (#85)
  • Bump rollup-plugin-terser from 5.2.0 to 5.3.0 @dependabot-preview (#87)
  • [Security] Bump acorn from 5.7.3 to 5.7.4 @dependabot-preview (#88)
  • docs: add laysent as a contributor @allcontributors (#70)
  • docs: add kamiazya as a contributor @allcontributors (#69)
  • Add CONTRIBUTING.md @kamiazya (#67)
ts-graphviz - v0.9.0 🌈

Published by github-actions[bot] over 4 years ago

🐛 Bug Fixes

  • fix: use quote for IDs @laysent (#64)

Changes

  • Upgrade to jest25 @kamiazya (#66)
  • Bump rollup-plugin-terser from 5.1.3 to 5.2.0 @dependabot-preview (#49)
  • Bump rollup from 1.29.0 to 1.30.1 @dependabot-preview (#61)
  • Bump typescript from 3.7.4 to 3.7.5 @dependabot-preview (#54)
  • Bump jest-graphviz from 0.1.1 to 0.2.0 @dependabot-preview (#48)
  • Bump typedoc from 0.15.8 to 0.16.9 @dependabot-preview (#63)
  • Fix attribute types @kamiazya (#56)

Thanks @laysent !

ts-graphviz - v0.8.0 🌈

Published by github-actions[bot] almost 5 years ago

🚀 Features

  • Add attribute types @kamiazya (#47)

Changes

  • Bump rollup from 1.28.0 to 1.29.0 @dependabot-preview (#43)
  • Bump typedoc from 0.15.6 to 0.15.8 @dependabot-preview (#46)
  • Add types field to package.json @kamiazya (#44)
  • Add PR and issue templates @kamiazya (#42)
ts-graphviz - v0.7.0 🌈

Published by github-actions[bot] almost 5 years ago

🚀 Features

  • Type abstraction by interface @kamiazya (#41)
    • Redesign Context APIs.
    • Abstract with interface and loose coupling between models.
    • Elimination of circular import.

Changes

  • Bump rollup from 1.27.14 to 1.28.0 @dependabot-preview (#39)
  • Bump ts-jest from 24.2.0 to 24.3.0 @dependabot-preview (#40)

Braking changes

  • remove add and remove method from Cluster.
ts-graphviz - v0.6.0 🌈

Published by github-actions[bot] almost 5 years ago

Changes

  • Improve coverage @kamiazya (#38)
  • Refacter and document comment @kamiazya (#36)

🚀 Features

  • Add attributes APIs @kamiazya (#37)
ts-graphviz - v0.5.0 🌈

Published by github-actions[bot] almost 5 years ago

Changes

🚀 Features

  • Add static mode for root cluster @kamiazya (#33)
  • Support compass port @kamiazya (#34)
ts-graphviz - v0.4.1 🌈

Published by github-actions[bot] almost 5 years ago

Changes

  • Create CODE_OF_CONDUCT.md @kamiazya (#35)
  • Add funding infomation to package.json @kamiazya (#31)

🚀 Features

  • Support ESModule and unpkg @kamiazya (#32)

🐛 Bug Fixes

  • Escape slash character in literal @kamiazya (#30)
ts-graphviz - v0.4.0 🌈

Published by github-actions[bot] almost 5 years ago

Changes

  • Bump @types/jest from 24.0.24 to 24.0.25 @dependabot-preview (#27)
  • Bump typedoc from 0.15.5 to 0.15.6 @dependabot-preview (#28)

🚀 Features

  • Add comment prop for graphviz objects @kamiazya (#26)

🐛 Bug Fixes

  • Add case for escaping characters for leteral @kamiazya (#29)
ts-graphviz - v0.3.0 🌈

Published by github-actions[bot] almost 5 years ago

Changes

  • Bump @types/jest from 24.0.23 to 24.0.24 @dependabot-preview (#22)
  • Bump typedoc from 0.15.4 to 0.15.5 @dependabot-preview (#21)
  • Bump typescript from 3.7.3 to 3.7.4 @dependabot-preview (#23)
  • Bump tslint-plugin-prettier from 2.0.1 to 2.1.0 @dependabot-preview (#24)
  • update jest-graphviz version @kamiazya (#20)

🚀 Features

  • Refactor code @kamiazya (#25)
Package Rankings
Top 2.37% on Npmjs.org
Badges
Extracted from project README
License: MIT PRs Welcome CI All Contributors OpenSSF Best Practices OpenSSF Scorecard Tidelift npm version deno version GitHub npm yarn Refarence Sponsor OpenCollective format: Biome test: Vitest build: Vite