fix: patch d3 libraries with victory-vendor to fix security vulnerability, failing test #3167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a copy of #3120 - creating another PR for the sake of cleaner commit history
demo
andsrc
fromfiles
array - they add bloat to the buildD3 moved to vending ESM only. Our consumers use jest, next, etc. which requires cjs - if we patch d3 security vulnerability in a patch fix we break our consumers. In order for v2.x.x to be secure we need a cjs version of patched d3.
victory-vendor
does this for us as per blog post https://formidable.com/blog/2022/victory-esm/change d3 references to
victory-vendor
, remove direct d3 dependenciesRelated Issue
#3012 #3009, more
Motivation and Context
Fix dependency vulnerability that will not go away in 2.x.x due to d3 not wanting to upgrade
How Has This Been Tested?
See comment here #3012 (comment)
Created two duplicate branches. One I upgraded the dependencies directly, this one I replaced with
victory-vendor
. Due to adding jest tests to our test suite we now have a failing build when directly upgrading the deps.deployed in recharts 2.3.0-alpha.1
Many references are also in our demo project - these continue to work as well. Tested manually.
npm run test
npm run build
npm run demo
Screenshots (if appropriate): N/A
Types of changes
Checklist: