Skip to content

Commit

Permalink
Pewpew updates20220906 (#98)
Browse files Browse the repository at this point in the history
* Updated dependencies Cargo and npm

* Fixed clippy and format warnings

* Fixed tests that are failing in Rust 1.63

- Rust version 1.63 changed how they convert float to Durations. Previously they truncated, now they round
  - https://github.com/rust-lang/rust/releases/tag/1.63.0
  - rust-lang/rust#96051
  - 'Rounding is now used when converting a float to a Duration. The converted duration can differ slightly from what it was.'

* Fixed the names of some variables to match what they are
  • Loading branch information
tkmcmaster committed Sep 7, 2022
1 parent 154445c commit 0f607e9
Show file tree
Hide file tree
Showing 21 changed files with 6,268 additions and 6,229 deletions.
370 changes: 204 additions & 166 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ url = "2"
yansi = "0.5"
zip_all = { path = "./lib/zip_all" }
# https://github.com/softprops/json-env-logger/issues/6
log = { version = "0.4.14", features = ["kv_unstable_std"] }
log = { version = "0.4", features = ["kv_unstable_std"] }
env_logger = "0.9"
json_env_logger = { version = "0.1", features = ["iso-timestamps"] }
# https://github.com/sfackler/rust-openssl/issues/1021#issuecomment-605602642
Expand Down
1,678 changes: 833 additions & 845 deletions guide/results-viewer-react/package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions guide/results-viewer-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,48 @@
"license": "ISC",
"dependencies": {
"@fs/hdr-histogram-wasm": "file:./lib/hdr-histogram-wasm",
"chart.js": "^3.8.0",
"chart.js": "^3.9.1",
"chartjs-adapter-date-fns": "^2.0.0",
"date-fns": "^2.28.0",
"date-fns": "^2.29.2",
"file-saver": "^2.0.5",
"immutability-helper": "^3.1.1",
"js-yaml": "^4.1.0",
"react": "^18.2.0",
"react-accessible-accordion": "^5.0.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.2",
"react-transition-group": "^4.4.2",
"react-transition-group": "^4.4.5",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@babel/core": "^7.18.9",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-interactions": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/builder-webpack5": "^6.5.9",
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9",
"@babel/core": "^7.19.0",
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
"@storybook/addon-interactions": "^6.5.10",
"@storybook/addon-links": "^6.5.10",
"@storybook/builder-webpack5": "^6.5.10",
"@storybook/manager-webpack5": "^6.5.10",
"@storybook/react": "^6.5.10",
"@storybook/testing-library": "0.0.13",
"@types/chart.js": "^2.9.37",
"@types/file-saver": "^2.0.5",
"@types/har-format": "^1.2.8",
"@types/js-yaml": "^4.0.5",
"@types/react": "^18.0.15",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"@types/react-transition-group": "^4.4.5",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"babel-loader": "^8.2.5",
"eslint": "^8.20.0",
"eslint": "^8.23.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"html-webpack-plugin": "^5.5.0",
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"webpack": "^5.73.0",
"typescript": "^4.8.2",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.3"
"webpack-dev-server": "^4.10.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Title,
Tooltip
} from "chart.js";
import { LogLevel, log } from "../../util/log";
import { DataPoint } from "./model";

// https://www.chartjs.org/docs/latest/getting-started/integration.html#bundlers-webpack-rollup-etc
Expand Down Expand Up @@ -337,6 +338,10 @@ const afterBuildTicks = (chart: any) => {
const chart: Chart = legend.chart;
const datasets = chart.data.datasets!;
let allHidden = true;
if (legendItem.datasetIndex === undefined) {
log("legendItem.datasetIndex was undefined. Please investigate", LogLevel.ERROR, legendItem);
return;
}
for (let i = 0; i < datasets.length; i++) {
const meta = chart.getDatasetMeta(i);
if (!meta.hidden && i !== legendItem.datasetIndex) {
Expand Down

0 comments on commit 0f607e9

Please sign in to comment.