Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(render): adds new handlebars-free dot reporter (#217)
## Description - adds a 'hand built' `dot` rendition (`ndot`) - updates the `dot` rendition (see below for details) ... with the goal of phasing out the handlebars one. That itself will be done in a separate PR _after_ a last release _with_ the handelbars renderer in it (it itself got a bit of an overhaul and if we need to roll back I'd rather roll back to this updated handlebars versioned Steps: - [x] add a new `ndot` render module - [x] expand the render tests & fixtures for `dot` with the ones used for other render modules as well - use these tests & fixtures to build the `ndot` render module - [x] non-hierarchical states - [x] non-hierarchical transitions - [x] non-hierarchical notes - [x] hierarchical/ composite states - [x] hierarchical transitions - [x] self transitions on composite states - [x] explicitly _internal_ and _external_ self transitions on composite states - [x] hierarchical notes (states) - [x] hierarchical notes (transitions) --> these are now rendered _inside_ the containing state (addresses #213) - [x] parallel states (if not already covered in composite states) - [x] edge cases - [x] corner cases - When 100% covered: - [ ] ~~remove the `dot` module~~ separate PR - [ ] ~~rename the `ndot` module to `dot`~~ separate PR - [ ] ~~move `handlebars` to a devDependency, so it isn't shipped anymore (we still use it in the site generation)~~ separate PR There's also some changes to the `dot` rendition. Most of that is moving around white space & line ends, some of it is swapping the order of attributes (either for consistency of readability) and some of it is to make implicit attributes explicit (which makes writing & testing easier and thus more reliable). ## Motivation and Context - reduces the number of dependencies - handlebars hasn't seen updates in a pretty long time => _if_ there's ever going to be a security vulnerability in it a speedy fix might take a minute - the shipped handlebars templates & dependencies are not small - can likely do a bit better even not considering the bundled 3rd party code ## How Has This Been Tested? - [x] green ci - [x] additional automated non-regression tests (>300 of them ...) ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] Refactor (non-breaking change which fixes an issue without changing functionality) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information