Resolve CVEs and simplify dependency maintenance + FDC3 Workbench version check#1841
Merged
Resolve CVEs and simplify dependency maintenance + FDC3 Workbench version check#1841
Conversation
…,lnerability Also remove unused pixelmatch dependency and drop vitest-mock-extended as a dependency in the root package.json as it is only used in packages/fdc3-standard
…to simplify installs and maintenance
…ndency hoisting and node polyfill
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
@finos/fdc3-maintainers this PR has us finally achieving zero CVEs on the main packages, fdc3-workbench and website. I've tried to make it easier to maintain this going forward - the next logical step would be to convert fdc3-conformance to vite/esbuild and vitest to further consolidate and simplify. I'll be using this as the base for the 2.2.2 release branch, which I am working on now. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1841 +/- ##
==========================================
- Coverage 95.68% 95.61% -0.07%
==========================================
Files 69 69
Lines 4631 4676 +45
Branches 806 721 -85
==========================================
+ Hits 4431 4471 +40
- Misses 200 205 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe your change
Resolves all known CVEs in the monorepo and consolidates shared devDependencies to the root
package.jsonto simplify future maintenance.Also corrects the FDC3 Workbench version check to not flag FDC3 2.2 implementation as unsupported.
CVEs Resolved
esbuild≤0.24.2 (viavitest→vite5.x)vitestand@vitest/coverage-v8from^2.0.0to^3.2.4; upgradedvitest-mock-extendedfrom^2.0.0to^3.0.0. Vitest 3.x resolves to vite 6.x which usesesbuild@^0.25.0(patched).serialize-javascript≤7.0.4 (viamocha)overridesin rootpackage.jsonto forceserialize-javascript@^7.0.5. No mocha version uses a patched range, so an override is the only option without removing mocha.elliptic(viavite-plugin-node-polyfills→node-stdlib-browser→crypto-browserify)vite-plugin-node-polyfillsfromfdc3-workbench. The workbench source doesn't use Node.js crypto APIs; the only polyfills actually needed (Buffer,path) are now provided via targetedbufferandpath-browserifypackages with vite resolve aliases.Dependency consolidation
Moved 10 shared devDependencies from 7 workspace packages to the root
package.json, eliminating ~60 duplicate declarations:@eslint/js,eslint,eslint-config-prettier,globals,typescript,typescript-eslint,rimraf(previously in all 6 packages + testing)@types/node,prettier,tsx(previously in 3+ packages)vitest,@vitest/coverage-v8,pixelmatch(previously in 5 packages, also resolves npm workspace hoisting issues with@vitest/coverage-v8transitive deps)This ensures consistent versions across all workspaces and avoids the npm workspace hoisting failures that were causing missing transitive dependencies (e.g.
@ampproject/remapping,ast-v8-to-istanbul,magicast).Other fixes
vitest-mock-extendedandpixelmatchfrom rootpackage.json(only needed infdc3-standardandpackages/testingrespectively)pixelmatchtopackages/testingdependencies (required byquickpicklewhich doesn't declare it)type-detectandget-func-nametotoolbox/fdc3-conformancedependencies to fix hoisting conflict betweenchai@4.x(conformance) andchai@5.x(vitest)Bufferandpathbrowser polyfills tofdc3-workbenchto replace the functionality previously provided byvite-plugin-node-polyfillsVerification
npm audit: 0 vulnerabilities (down from 2 high, 5 moderate, 6 low)fdc3-workbenchandfdc3-conformancebuild successfullyRelated Issue
resolves #1672
Contributor License Agreement
Review Checklist