Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: removes 3rd party dependency 'wrap-ansi' (#946)
## Description - removes 3rd party dependency 'wrap-ansi' ## Motivation and Context Reduces the number of 3rd party dependencies by 7, which is good for download size & performance and reduces potential vulnerabilities and maintenance burden. We _do_ wrap with ansi-codes, but if we apply the ansi codes _after_ wrapping, we don't need the specialised `wrap-ansi` package anymore and can do with a simple hand-rolled function for wrapping, which is what this package implements (the function is _ugly_, and might not cover all edge cases but it works well enough for our use case). From [npmgraph](https://npmgraph.js.org/?q=wrap-ansi): <img width="952" alt="shows wrap-ansi's module dependency graph, with its 6 indirect dependencies" src="https://github.com/sverweij/dependency-cruiser/assets/4822597/1dd195cd-18c2-4022-a304-3f87416fc4a4"> <img width="406" alt="shows the number of bytes wrap-ansi adds to dependency-cruiser's install size; 96kb unpacked, with emoji-regex and get-east-asian-width as the largest contributors" src="https://github.com/sverweij/dependency-cruiser/assets/4822597/fb372f56-6c8c-4039-8f5f-8ae5fb5ee71c"> ## How Has This Been Tested? - [x] green ci ## 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