Skip to content

Commit e328799

Browse files
author
Michael Mrowetz
committed
chore: update dependencies and fix new lint/compiler issues
1 parent ca16c26 commit e328799

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

Diff for: package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@
3333
"types": "./index.d.ts",
3434
"license": "MIT",
3535
"devDependencies": {
36-
"conventional-changelog": "^1.1.3",
37-
"grunt": "^1.0.1",
36+
"conventional-changelog": "^1.1.15",
37+
"grunt": "^1.0.2",
3838
"grunt-banner": "^0.6.0",
39-
"grunt-browserify": "^5.0.0",
39+
"grunt-browserify": "^5.2.0",
4040
"grunt-bump": "^0.8.0",
4141
"grunt-contrib-clean": "^1.1.0",
4242
"grunt-contrib-concat": "^1.0.1",
4343
"grunt-contrib-copy": "^1.0.0",
44-
"grunt-contrib-uglify": "^3.0.1",
44+
"grunt-contrib-uglify": "^3.3.0",
4545
"grunt-contrib-watch": "^1.0.0",
4646
"grunt-gh-pages": "^2.0.0",
47-
"grunt-run": "^0.7.0",
47+
"grunt-run": "^0.8.0",
4848
"grunt-tslint": "^5.0.1",
4949
"live-server": "^1.2.0",
5050
"load-grunt-config": "^0.19.2",
51-
"tsify": "^3.0.1",
52-
"tslint": "~5.4",
53-
"tslint-eslint-rules": "^4.1.1",
54-
"typescript": "~2.3",
51+
"tsify": "^3.0.4",
52+
"tslint": "~5.9.1",
53+
"tslint-eslint-rules": "^5.0.0",
54+
"typescript": "~2.7.2",
5555
"whatwg-fetch": "^2.0.3"
5656
},
5757
"dependencies": {
58-
"@types/har-format": "^1.2.1"
58+
"@types/har-format": "^1.2.2"
5959
}
6060
}

Diff for: src/ts/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function PerfCascade(waterfallDocsData: WaterfallDocs, chartOptions: Partial<Cha
6868
* @returns {SVGSVGElement} - Chart SVG Element
6969
*/
7070
export function fromHar(harData: Har, options: ChartOptions = {}): SVGSVGElement {
71-
const harTransformerOptions: HarTransformerOptions = {
71+
const harTransformerOptions = {
7272
...defaultHarTransformerOptions,
7373
...options,
7474
};

Diff for: src/ts/transformers/har.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ const buildDetailTimingBlocks = (startRelative: number, harEntry: Entry): Waterf
242242
// special case for 'connect' && 'ssl' since they share time
243243
// http://www.softwareishard.com/blog/har-12-spec/#timings
244244
if (key === "connect" && t["ssl"] && t["ssl"] !== -1) {
245-
const sslStart = parseInt(harEntry[`_ssl_start`], 10) || time.start;
246-
const sslEnd = parseInt(harEntry[`_ssl_end`], 10) || time.start + t.ssl;
247-
const connectStart = (!!parseInt(harEntry[`_ssl_start`], 10)) ? time.start : sslEnd;
245+
const sslStart = parseInt(harEntry[`_ssl_start`].toString(), 10) || time.start;
246+
const sslEnd = parseInt(harEntry[`_ssl_end`].toString(), 10) || time.start + t.ssl;
247+
const connectStart = (!!parseInt(harEntry[`_ssl_start`].toString(), 10)) ? time.start : sslEnd;
248248
return collect
249249
.concat([createWaterfallEntryTiming("ssl", Math.round(sslStart), Math.round(sslEnd))])
250250
.concat([createWaterfallEntryTiming(key, Math.round(connectStart), Math.round(time.end))]);

Diff for: src/ts/waterfall/sub-components/svg-general-components.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ const appendSecond = (context: Context, timeHolder: SVGGElement,
2424
/** just used if `addLabel` is `true` - for full seconds */
2525
let lineLabel;
2626
let lineClass = "sub-second-line";
27+
let x: string;
2728

2829
if (addLabel) {
2930
const showTextBefore = (sec > secsTotal - 0.2);
3031
lineClass = "second-line";
31-
let x = roundNumber(secPerc * sec) + 0.5 + "%";
32+
x = roundNumber(secPerc * sec) + 0.5 + "%";
3233
const css = {};
3334
if (showTextBefore) {
3435
x = roundNumber(secPerc * sec) - 0.5 + "%";
@@ -37,7 +38,7 @@ const appendSecond = (context: Context, timeHolder: SVGGElement,
3738
lineLabel = svg.newTextEl(sec + "s", { x, y: diagramHeight }, css);
3839
}
3940

40-
const x = roundNumber(secPerc * sec) + "%";
41+
x = roundNumber(secPerc * sec) + "%";
4142
const lineEl = svg.newLine({
4243
x1: x,
4344
x2: x,

Diff for: src/ts/waterfall/svg-chart.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import OverlayManager from "./details-overlay/overlay-manager";
1010
import { PubSub } from "./details-overlay/pub-sub";
1111
import * as row from "./row/svg-row";
1212
import { makeTooltip } from "./row/svg-tooltip";
13-
import * as alignmentHelper from "./sub-components/svg-alignment-helper";
14-
import * as generalComponents from "./sub-components/svg-general-components";
15-
import * as marks from "./sub-components/svg-marks";
13+
import * as svgAlignmentHelper from "./sub-components/svg-alignment-helper";
14+
import * as svgGeneralComponents from "./sub-components/svg-general-components";
15+
import * as svgMarks from "./sub-components/svg-marks";
1616

1717
/**
1818
* Get a string that's as wide, or wider than any number from 0-n.
@@ -107,16 +107,16 @@ export function createWaterfallSvg(data: WaterfallData, options: ChartRenderOpti
107107
let mouseListeners: HoverEvtListeners;
108108
if (options.showAlignmentHelpers) {
109109
hoverOverlayHolder = svg.newG("hover-overlays");
110-
const hoverEl = alignmentHelper.createAlignmentLines(context.diagramHeight);
110+
const hoverEl = svgAlignmentHelper.createAlignmentLines(context.diagramHeight);
111111
hoverOverlayHolder.appendChild(hoverEl.startline);
112112
hoverOverlayHolder.appendChild(hoverEl.endline);
113-
mouseListeners = alignmentHelper.makeHoverEvtListeners(hoverEl);
113+
mouseListeners = svgAlignmentHelper.makeHoverEvtListeners(hoverEl);
114114
}
115115

116116
// Start appending SVG elements to the holder element (timeLineHolder)
117117

118-
scaleAndMarksHolder.appendChild(generalComponents.createTimeScale(context, data.durationMs));
119-
scaleAndMarksHolder.appendChild(marks.createMarks(context, data.marks));
118+
scaleAndMarksHolder.appendChild(svgGeneralComponents.createTimeScale(context, data.durationMs));
119+
scaleAndMarksHolder.appendChild(svgMarks.createMarks(context, data.marks));
120120

121121
// This assumes all icons (mime and indicators) have the same width
122122
const perIconWidth = entriesToShow[0].responseDetails.icon.width;

0 commit comments

Comments
 (0)