Skip to content

Commit

Permalink
fix: Update @serialize-javascript to address @json5 vulnerability (#26)
Browse files Browse the repository at this point in the history
Upgrading serialize-javascript dependency to address Prototype Pollution
vulnerability affecting json5.
  • Loading branch information
elivillalejos authored Jul 30, 2024
1 parent 9a16a89 commit 787eb62
Show file tree
Hide file tree
Showing 3 changed files with 4,897 additions and 4,776 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"babel": "^6.23.0",
"babel-loader": "^8.1.0",
"d3": "^5.16.0",
"serialize-javascript": "^3.1.0",
"ts-loader": "^7.0.5",
"typescript": "^5.1.6",
"uglifyjs-webpack-plugin": "^2.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as d3 from 'd3';
import {format} from 'd3';

import {VisConfig, VisQueryResponse, VisualizationDefinition} from './types';
import {fromSheetsToD3Format} from './currency_formatter';

export const formatType = (valueFormat: string) => {
const format = fromSheetsToD3Format(valueFormat);
return d3.format(format);
const formattedData = fromSheetsToD3Format(valueFormat);
return format(formattedData);
};

export const handleErrors = (
Expand Down
Loading

0 comments on commit 787eb62

Please sign in to comment.