Skip to content

Commit

Permalink
chore(all): dep upgrades to latest (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
lynchbomb committed Oct 15, 2019
1 parent 6b9a9d4 commit e9c81d6
Show file tree
Hide file tree
Showing 14 changed files with 1,140 additions and 1,108 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"devDependencies": {
"lerna": "^3.15.0",
"husky": "^2.4.0"
"lerna": "^3.18.0",
"husky": "^3.0.9"
}
}
}
2 changes: 1 addition & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ OPTIONS
--all see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.1/src/commands/help.ts)_

## `tracerbench marker-timings`

Expand Down
66 changes: 29 additions & 37 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,74 @@
"name": "tracerbench",
"version": "2.2.4",
"description": "CLI for Tracerbench",
"keywords": [
"oclif"
],
"keywords": ["oclif"],
"homepage": "https://github.com/TracerBench/tracerbench",
"bugs": "https://github.com/TracerBench/tracerbench/issues",
"license": "BSD-2-Clause",
"author": "Kris Selden @krisselden",
"files": [
"bin",
"dist",
"src",
"oclif.manifest.json",
"tb-schema.json"
],
"files": ["bin", "dist", "src", "oclif.manifest.json", "tb-schema.json"],
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"bin": {
"tracerbench": "./bin/run"
},
"dependencies": {
"@oclif/command": "^1.5.8",
"@oclif/config": "^1.12.0",
"@oclif/plugin-help": "^2.1.4",
"@oclif/command": "^1.5.19",
"@oclif/config": "^1.13.3",
"@oclif/plugin-help": "^2.2.1",
"@tracerbench/core": "^2.2.4",
"chalk": "^2.4.2",
"cli-table3": "^0.5.1",
"d3-array": "^2.0.3",
"d3-scale": "^3.0.0",
"d3-array": "^2.3.2",
"d3-scale": "^3.1.0",
"devtools-protocol": "0.0.665395",
"execa": "^2.0.3",
"fs-extra": "^7.0.1",
"handlebars": "^4.1.2",
"execa": "^3.1.0",
"fs-extra": "^8.1.0",
"handlebars": "^4.4.3",
"json-query": "^2.2.2",
"json5": "^2.1.0",
"jstat": "^1.9.0",
"json5": "^2.1.1",
"jstat": "^1.9.1",
"log-symbols": "^3.0.0",
"path": "0.12.7",
"tslib": "^1.10.0"
"tmp": "^0.1.0",
"tslib": "^1.10.0",
"tough-cookie": "^3.0.1"
},
"devDependencies": {
"@oclif/dev-cli": "^1.21.0",
"@oclif/test": "^1.2.2",
"@oclif/dev-cli": "^1.22.2",
"@oclif/test": "^1.2.5",
"@oclif/tslint": "^3.1.1",
"@types/chai": "^4.1.7",
"@types/chai-fs": "^2.0.1",
"@types/chai": "^4.2.3",
"chai-files": "^1.4.0",
"@types/chalk": "^2.2.0",
"@types/d3-array": "^1.2.6",
"@types/d3-array": "^2.0.0",
"@types/d3-scale": "^2.1.1",
"@types/fs-extra": "^5.0.4",
"@types/fs-extra": "^8.0.0",
"@types/json-query": "^2.2.0",
"@types/json5": "*",
"@types/log-symbols": "^3.0.0",
"@types/mock-fs": "3.6.30",
"@types/node": "^10.12.18",
"@types/node": "^12.11.0",
"chai": "^4.2.0",
"chai-fs": "^2.0.0",
"mocha": "^6.2.0",
"mocha": "^6.2.1",
"mock-fs": "^4.10.1",
"nyc": "^14.1.1",
"prettier": "^1.16.4",
"prettier": "^1.18.2",
"ts-node": "^8.4.1",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "^3.6.3",
"typescript-json-schema": "^0.37.0"
"typescript": "^3.6.4",
"typescript-json-schema": "^0.40.0",
"@types/tmp": "^0.1.0"
},
"engines": {
"node": ">=10.0.0"
},
"oclif": {
"commands": "./dist/src/commands",
"bin": "tracerbench",
"plugins": [
"@oclif/plugin-help"
],
"plugins": ["@oclif/plugin-help"],
"topics": {
"compare:analyze": {
"description": "Run an analysis of a benchmark run from a results json file and output to terminal"
Expand All @@ -96,4 +88,4 @@
"copystatic": "cp -a ./src/static ./dist/src"
},
"gitHead": "142d4c4a60878c37fb056a06fccf9694bdeda259"
}
}
23 changes: 13 additions & 10 deletions packages/cli/test/commands/compare.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { test } from '@oclif/test';
import { expect } from 'chai';
import { expect, use } from 'chai';
import Compare from '../../src/commands/compare';
import { defaultFlagArgs } from '../../src/command-config';
import { FIXTURE_APP, TB_RESULTS_FOLDER } from '../test-helpers';
import { ICompareJSONResults } from '../../src/helpers/log-compare-results';
const chaiFiles = require('chai-files');
use(chaiFiles);

const fidelity = 'test';
const emulateDevice = 'iphone-4';
const regressionThreshold = '-100ms';
const file = chaiFiles.file;

describe('compare fixture: A/A', () => {
test
Expand All @@ -32,15 +35,15 @@ describe('compare fixture: A/A', () => {
]);

expect(ctx.stdout).to.contain(`Success`);
expect(
`${TB_RESULTS_FOLDER}/server-control-settings.json`
).to.be.a.file();
expect(
`${TB_RESULTS_FOLDER}/server-experiment-settings.json`
).to.be.a.file();
expect(
`${TB_RESULTS_FOLDER}/compare-flags-settings.json`
).to.be.a.file();
// tslint:disable-next-line: no-unused-expression
expect(file(`${TB_RESULTS_FOLDER}/server-control-settings.json`)).to
.exist;
// tslint:disable-next-line: no-unused-expression
expect(file(`${TB_RESULTS_FOLDER}/server-experiment-settings.json`)).to
.exist;
// tslint:disable-next-line: no-unused-expression
expect(file(`${TB_RESULTS_FOLDER}/compare-flags-settings.json`)).to
.exist;
}
);
});
Expand Down
16 changes: 10 additions & 6 deletions packages/cli/test/commands/create-archive.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { test } from '@oclif/test';
import * as chai from 'chai';
import { expect, use } from 'chai';
import * as path from 'path';
import CreateArchive from '../../src/commands/create-archive';
import { tmpDir } from '../setup';
chai.use(require('chai-fs'));

const chaiFiles = require('chai-files');
use(chaiFiles);

const url = 'https://www.tracerbench.com';
const tbResultsFolder = path.join(`${process.cwd()}/${tmpDir}`);
const file = chaiFiles.file;

describe('create-archive', () => {
test
Expand All @@ -20,10 +23,11 @@ describe('create-archive', () => {
'--tbResultsFolder',
tbResultsFolder,
]);
chai
.expect(ctx.stdout)
.to.contain(`HAR & cookies.json successfully generated`);
chai.expect(`${tbResultsFolder}/trace.har`).to.be.a.file();
expect(ctx.stdout).to.contain(
`HAR & cookies.json successfully generated`
);
// tslint:disable-next-line: no-unused-expression
expect(file(`${tbResultsFolder}/trace.har`)).to.exist;
}
);
});
2 changes: 0 additions & 2 deletions packages/cli/test/commands/marker-timings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import * as path from 'path';
import MarkerTimings from '../../src/commands/marker-timings';
import { tmpDir } from '../setup';

chai.use(require('chai-fs'));

const tbResultsFolder = path.join(`${process.cwd()}/${tmpDir}`);
const url = 'https://www.tracerbench.com';

Expand Down
11 changes: 8 additions & 3 deletions packages/cli/test/commands/report.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { test } from '@oclif/test';
import { expect } from 'chai';
import { expect, use } from 'chai';
import Compare from '../../src/commands/compare';
import Report from '../../src/commands/report';
import {
FIXTURE_APP,
TB_RESULTS_FOLDER,
TB_CONFIG_FILE,
} from '../test-helpers';
const chaiFiles = require('chai-files');
use(chaiFiles);

const fidelity = 'test';
const file = chaiFiles.file;

describe('report: creates html', () => {
test
Expand Down Expand Up @@ -41,8 +44,10 @@ describe('report: creates html', () => {
expect(ctx.stdout).to.contain(
`The PDF and HTML reports are available here`
);
expect(`${TB_RESULTS_FOLDER}/artifact-1.html`).to.be.a.file();
expect(`${TB_RESULTS_FOLDER}/artifact-1.pdf`).to.be.a.file();
// tslint:disable-next-line: no-unused-expression
expect(file(`${TB_RESULTS_FOLDER}/artifact-1.html`)).to.exist;
// tslint:disable-next-line: no-unused-expression
expect(file(`${TB_RESULTS_FOLDER}/artifact-1.pdf`)).to.exist;
}
);
});
21 changes: 12 additions & 9 deletions packages/cli/test/commands/trace.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { test } from '@oclif/test';
import * as chai from 'chai';
import { use, expect } from 'chai';
import * as path from 'path';
import Trace from '../../src/commands/trace';
import { tmpDir } from '../setup';

chai.use(require('chai-fs'));
const chaiFiles = require('chai-files');
use(chaiFiles);

const tbResultsFolder = path.join(`${process.cwd()}/${tmpDir}`);
const url = 'https://www.tracerbench.com';
const cpuThrottleRate = '1';
const file = chaiFiles.file;

describe('trace', () => {
test
Expand All @@ -24,9 +26,10 @@ describe('trace', () => {
'--cpuThrottleRate',
cpuThrottleRate,
]);
chai.expect(ctx.stdout).to.contain(`Trace`);
chai.expect(ctx.stdout).to.contain(`Subtotal`);
chai.expect(`${tbResultsFolder}/trace.json`).to.be.a.file();
expect(ctx.stdout).to.contain(`Trace`);
expect(ctx.stdout).to.contain(`Subtotal`);
// tslint:disable-next-line: no-unused-expression
expect(file(`${tbResultsFolder}/trace.json`)).to.exist;
}
);
});
Expand All @@ -46,10 +49,10 @@ describe('trace: insights', () => {
cpuThrottleRate,
'--insights',
]);
chai.expect(ctx.stdout).to.contain(`.js`);
chai.expect(ctx.stdout).to.contain(`.css`);
chai.expect(ctx.stdout).to.contain(`Frame-URL:`);
chai.expect(ctx.stdout).to.contain(`Frame-ID:`);
expect(ctx.stdout).to.contain(`.js`);
expect(ctx.stdout).to.contain(`.css`);
expect(ctx.stdout).to.contain(`Frame-URL:`);
expect(ctx.stdout).to.contain(`Frame-ID:`);
}
);
});
9 changes: 7 additions & 2 deletions packages/cli/test/helpers/print-to-pdf.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import * as chai from 'chai';
import { use, expect } from 'chai';
import * as path from 'path';
import * as url from 'url';

const chaiFiles = require('chai-files');
use(chaiFiles);

import { FIXTURE_APP, TB_RESULTS_FOLDER } from '../test-helpers';
import printToPDF from '../../src/helpers/print-to-pdf';
const file = chaiFiles.file;

describe('printToPDF', () => {
it(`it outputs pdf`, async () => {
Expand All @@ -12,6 +16,7 @@ describe('printToPDF', () => {
url.pathToFileURL(FIXTURE_APP.control).toString(),
outputPath
);
chai.expect(outputPath).to.be.a.file();
// tslint:disable-next-line: no-unused-expression
expect(file(outputPath)).to.exist;
});
});
14 changes: 7 additions & 7 deletions packages/har-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
},
"dependencies": {
"@tracerbench/har": "^2.0.0-beta.6",
"mime-types": "^2.1.20"
"mime-types": "^2.1.24"
},
"devDependencies": {
"@types/mime-types": "^2.1.0",
"@types/node": "^10.12.18",
"json-schema-to-typescript": "^6.1.3",
"prettier": "^1.16.4",
"tslint": "^5.14.0",
"@types/node": "^12.11.0",
"json-schema-to-typescript": "^7.1.0",
"prettier": "^1.18.2",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "^3.3.4000"
"typescript": "^3.6.4"
},
"publishConfig": {
"tag": "beta"
},
"gitHead": "e9e301b7d4a75ac252fe69cf533668e42432ea8d"
}
}
6 changes: 5 additions & 1 deletion packages/har-remix/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export default class ArchiveServer {
const { status, content } = entry.response;
if (content && status >= 200 && status < 300) {
let { text } = content;
const { encoding, mimeType } = content;
const { encoding, mimeType } = content as {
encoding: BufferEncoding;
mimeType: string;
};

let body: Buffer | undefined;

if (text === undefined) {
Expand Down
4 changes: 2 additions & 2 deletions packages/har/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@krisselden/har-schema": "^0.1.0",
"json-schema-to-typescript": "^6.1.3"
"json-schema-to-typescript": "^7.1.0"
},
"gitHead": "e9e301b7d4a75ac252fe69cf533668e42432ea8d"
}
}
Loading

0 comments on commit e9c81d6

Please sign in to comment.