-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
… BREAKING (#45) ## Description - stops doing a function call (or even importing the formatter) when no formatting is needed - enames lots of things for clarity and grammatical correctness. The BREAKING bit: the changeType attribute in an IChange is now called type (BREAKING) - with this, simplifies the format function to have 0 branches - also ensures we use node:assert/strict always over node:assert ## Motivation and Context - when running this as a library function this reduces overhead, bot on import (as the formatting function is imported only then when it's needed) and at runtime (skipping 2 function calls and a lookup). - clear and concise naming makes using the package easier. As a side effect of this PR the distribution size of the package reduces from 6.1kB (17.1kB unpacked) to 5.9kb (16.9kB unpacked) ## How Has This Been Tested? - [x] green ci - [x] adapted automated non-regression tests ## 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) - [x] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.