Skip to content

Commit 48d2e29

Browse files
committed
update dependencies, fix #1201
1 parent 00ab153 commit 48d2e29

36 files changed

+21764
-27178
lines changed

Diff for: push_results.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
cp webdriver-ts-results/table.html ../krausest.github.io/js-framework-benchmark/current.html
22
cp webdriver-ts-results/BoxPlotTable*.js ../krausest.github.io/js-framework-benchmark/
3+
cp webdriver-ts-results/plotly*.js ../krausest.github.io/js-framework-benchmark/
34
cd ../krausest.github.io
45
git add js-framework-benchmark/current.html
56
git add js-framework-benchmark/BoxPlotTable*.js
7+
git add js-framework-benchmark/plotly*.js
68
git commit -m "update results"
79
git push
810
cd ../js-framework-benchmark/webdriver-ts

Diff for: webdriver-ts-results/BoxPlotTable.c66c015b9613d069c9ab.js

-22
This file was deleted.

Diff for: webdriver-ts-results/package-lock.json

+21,609-26,965
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: webdriver-ts-results/package.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@testing-library/jest-dom": "^5.11.5",
7-
"@testing-library/react": "^11.1.0",
8-
"@testing-library/user-event": "^12.1.10",
9-
"@types/jest": "^26.0.15",
10-
"@types/node": "^14.14.2",
11-
"@types/react": "^16.9.53",
12-
"@types/react-dom": "^16.9.8",
13-
"jstat": "^1.9.5",
14-
"plotly.js-cartesian-dist": "1.55.2",
15-
"react": "^17.0.1",
16-
"react-dom": "^17.0.1",
17-
"react-redux": "^7.2.1",
18-
"redux": "^4.0.5"
6+
"@testing-library/jest-dom": "^5.16.5",
7+
"@testing-library/react": "^14.0.0",
8+
"@testing-library/user-event": "^14.4.3",
9+
"@types/jest": "^29.4.0",
10+
"@types/node": "^18.14.6",
11+
"@types/react": "^18.0.28",
12+
"@types/react-dom": "^18.0.11",
13+
"jstat": "^1.9.6",
14+
"plotly.js-cartesian-dist": "2.18.2",
15+
"react": "^18.2.0",
16+
"react-dom": "^18.2.0",
17+
"react-redux": "^8.0.5",
18+
"redux": "^4.2.1"
1919
},
2020
"scripts": {
2121
"start": "react-scripts start",
2222
"build": "react-scripts build",
2323
"test": "react-scripts test",
2424
"eject": "react-scripts eject",
2525
"lint": "eslint './src/**/*.{ts,tsx}'",
26-
"build-prod": "rimraf dist && cross-env NODE_ENV=\"production\" webpack --env prod -c webpack.config.js && rimraf table.html && rimraf \"BoxPlotTable*.js\" && cpx dist/table.html . && cpx \"dist/BoxPlotTable*.js\" ."
26+
"build-prod": "rimraf dist && cross-env NODE_ENV=\"production\" webpack --env prod -c webpack.config.js && rimraf table.html && rimraf \"BoxPlotTable*.js\" && cpx dist/table.html . && cpx \"dist/BoxPlotTable*.js\" . && cpx \"dist/plotly*.js\" ."
2727
},
2828
"eslintConfig": {
2929
"extends": "react-app"
@@ -41,17 +41,17 @@
4141
]
4242
},
4343
"devDependencies": {
44-
"@types/react-redux": "^7.1.9",
44+
"@types/react-redux": "^7.1.25",
4545
"cpx": "1.5.0",
46-
"cross-env": "7.0.2",
47-
"eslint-plugin-react-hooks": "^4.2.0",
48-
"html-webpack-plugin": "^4.5.0",
46+
"cross-env": "7.0.3",
47+
"eslint-plugin-react-hooks": "^4.6.0",
48+
"html-webpack-plugin": "^5.5.0",
4949
"inline-chunk-html-plugin": "^1.1.1",
50-
"react-scripts": "^4.0.0",
51-
"rimraf": "^3.0.2",
52-
"ts-loader": "^8.0.6",
53-
"typescript": "^4.0.3",
54-
"webpack-bundle-analyzer": "^3.9.0",
55-
"webpack-cli": "^4.1.0"
50+
"react-scripts": "^5.0.1",
51+
"rimraf": "^4.3.1",
52+
"ts-loader": "^9.4.2",
53+
"typescript": "^4.9.5",
54+
"webpack-bundle-analyzer": "^4.8.0",
55+
"webpack-cli": "^5.0.1"
5656
}
5757
}

Diff for: webdriver-ts-results/src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const App = (): JSX.Element => {
1515
return (
1616
<div>
1717
{disclaimer}
18-
<p>The benchmark was run on a MacBook Pro 14 (32 GB RAM, 8/14 Cores, OSX 13.2), Chrome 110.0.5481.77 (arm64))
18+
<p>The benchmark was run on a MacBook Pro 14 (32 GB RAM, 8/14 Cores, OSX 13.2.1), Chrome 111.0.5563.64 (arm64))
1919
using the puppeteer benchmark driver with reduced tracing.
2020
</p>
2121
<SelectionBar/>

Diff for: webdriver-ts-results/src/index.tsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
32
import App from './App';
43
import {Provider} from 'react-redux'
54
import { createStore } from 'redux'
65
import { reducer } from './reducer';
76

87
const store = createStore(reducer)
98

10-
ReactDOM.render(
9+
import { createRoot } from 'react-dom/client';
10+
11+
window.onload = () => {
12+
13+
const root = createRoot(document.getElementById('root')!);
14+
15+
root.render(
1116
<Provider store={store}>
1217
<App/>
13-
</Provider>,
14-
document.getElementById('root')
18+
</Provider>
1519
);
16-
20+
}

Diff for: webdriver-ts-results/table.html

+2-46
Large diffs are not rendered by default.

Diff for: webdriver-ts-results/webpack.config.js

+23-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlug
33
var InlineChunkHtmlPlugin = require('inline-chunk-html-plugin');
44

55
var path = require('path')
6-
var cache = {};
6+
var cache = true;
77
var loaders = [
88
{
99
test: /\.tsx$|\.ts$/,
@@ -15,27 +15,41 @@ var loaders = [
1515
},
1616
{
1717
test: /\.css$/,
18-
loader: 'style-loader!css-loader'
18+
use: [{ loader: "style-loader" }, { loader: "css-loader" }],
1919
}
2020
];
2121
var extensions = [
2222
'.ts', '.tsx', '.ts', '.js'
2323
];
2424

2525
module.exports = [{
26-
cache: cache,
26+
cache: true,
2727
module: {
2828
rules: loaders
2929
},
3030
entry: {
31-
main: './src/index.tsx'
32-
},
31+
main: './src/index.tsx',
32+
},
3333
output: {
34+
publicPath: '',
3435
filename: '[name].[contenthash].js',
3536
},
3637
optimization: {
3738
splitChunks: {
38-
chunks: 'initial',
39+
chunks: 'all',
40+
cacheGroups: {
41+
vendor: {
42+
test: /[\\/]node_modules[\\/]/,
43+
name: 'vendor',
44+
chunks: 'all',
45+
},
46+
plotly: {
47+
test: /[\\/]node_modules[\\/]plotly.*[\\/]/,
48+
name: 'plotly',
49+
chunks: 'all',
50+
priority: 20
51+
},
52+
}
3953
}
4054
},
4155
resolve: {
@@ -54,9 +68,8 @@ module.exports = [{
5468
new HtmlWebpackPlugin({
5569
template: path.join(__dirname, 'public/index.html'),
5670
filename: 'table.html',
57-
inject: 'body',
58-
inlineSource: '.js$' // embed all javascript and css inline
71+
inject: true,
5972
}),
60-
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/main/])
61-
]
73+
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/main|vendor|BoxPlotTable/])
74+
]
6275
}];

Diff for: webdriver-ts/package.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
6-
"type": "commonjs",
6+
"type": "module",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
99
"lint": "eslint . --ext .ts",
1010
"tsbench": "cross-env LANG=\"en_US.UTF-8\" ts-node --files src/benchmarkRunner.ts",
1111
"bench": "cross-env LANG=\"en_US.UTF-8\" node dist/benchmarkRunner.js",
1212
"checkCSP": "cross-env LANG=\"en_US.UTF-8\" node dist/isCSPCompliant.js",
1313
"compile": "tsc",
14-
"results": "ts-node --files src/createResultJS.ts && cd .. && cd webdriver-ts-results && npm run build-prod",
15-
"index": "ts-node --files src/createIndex.ts",
16-
"isKeyed": "cross-env LANG=\"en_US.UTF-8\" ts-node --files src/isKeyed.ts",
17-
"parse": "ts-node --files src/parseTrace.ts"
14+
"results": "node dist/createResultJS.js && cd .. && cd webdriver-ts-results && npm run build-prod",
15+
"index": "node dist/createIndex.js",
16+
"isKeyed": "cross-env LANG=\"en_US.UTF-8\" node dist/isKeyed.js"
1817
},
1918
"author": "",
2019
"license": "Apache-2.0",
@@ -30,7 +29,6 @@
3029
"@typescript-eslint/parser": "5.54.0",
3130
"dockerode": "3.3.4",
3231
"eslint": "8.35.0",
33-
"ts-node": "10.9.1",
3432
"typescript": "4.9.5"
3533
},
3634
"dependencies": {
@@ -41,7 +39,6 @@
4139
"jstat": "1.9.6",
4240
"lighthouse": "10.0.2",
4341
"lodash": "4.17.21",
44-
"marky": "1.2.5",
4542
"npm-check-updates": "16.7.10",
4643
"playwright": "1.31.2",
4744
"playwright-firefox": "1.31.2",

Diff for: webdriver-ts/src/benchmarkRunner.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { fork } from "child_process";
22
import * as fs from "fs";
33
import yargs from 'yargs';
4-
import { BenchmarkInfo, benchmarkInfos, BenchmarkType, CPUBenchmarkInfo, MemBenchmarkInfo, StartupBenchmarkInfo } from "./benchmarksCommon";
5-
import { StartupBenchmarkResult } from "./benchmarksLighthouse";
6-
import { BenchmarkOptions, BENCHMARK_RUNNER, config, ErrorAndWarning, FrameworkData, initializeFrameworks } from "./common";
7-
import { writeResults } from "./writeResults";
4+
import { BenchmarkInfo, benchmarkInfos, BenchmarkType, CPUBenchmarkInfo, MemBenchmarkInfo, StartupBenchmarkInfo } from "./benchmarksCommon.js";
5+
import { StartupBenchmarkResult } from "./benchmarksLighthouse.js";
6+
import { BenchmarkOptions, BENCHMARK_RUNNER, config, ErrorAndWarning, FrameworkData, initializeFrameworks } from "./common.js";
7+
import { writeResults } from "./writeResults.js";
88

99
function forkAndCallBenchmark(
1010
framework: FrameworkData,
@@ -308,7 +308,7 @@ async function main() {
308308
if (!fs.existsSync(config.TRACES_DIRECTORY)) fs.mkdirSync(config.TRACES_DIRECTORY);
309309

310310
if (args.help) {
311-
yargs.showHelp();
311+
// yargs.showHelp();
312312
} else {
313313
return runBench(runFrameworks, runBenchmarks);
314314
}

Diff for: webdriver-ts/src/benchmarksCommon.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FrameworkData, config } from "./common";
1+
import { FrameworkData, config } from "./common.js";
22

33
export enum BenchmarkType {
44
CPU,

Diff for: webdriver-ts/src/benchmarksLighthouse.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as benchmarksCommon from "./benchmarksCommon";
2-
import { BenchmarkImpl, BenchmarkType, StartupBenchmarkInfo } from "./benchmarksCommon";
1+
import * as benchmarksCommon from "./benchmarksCommon.js";
2+
import { BenchmarkImpl, BenchmarkType, StartupBenchmarkInfo } from "./benchmarksCommon.js";
33

44
export interface StartupBenchmarkResult extends BenchmarkImpl {
55
benchmark: StartupBenchmarkInfo;

Diff for: webdriver-ts/src/benchmarksPlaywright.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// import { testTextContains, testTextContainsJS, testTextNotContained, testClassContains, testElementLocatedByXpath, testElementNotLocatedByXPath, testElementLocatedById, clickElementById, clickElementByXPath, getTextByXPath } from './webdriverAccess'
22

33
import { Browser, Page } from "playwright-core";
4-
import * as benchmarksCommon from "./benchmarksCommon";
5-
import { BenchmarkType } from "./benchmarksCommon";
6-
import { config, FrameworkData } from "./common";
7-
import { checkElementContainsText, checkElementExists, checkElementHasClass, checkElementNotExists, clickElement } from "./playwrightAccess";
4+
import * as benchmarksCommon from "./benchmarksCommon.js";
5+
import { BenchmarkType } from "./benchmarksCommon.js";
6+
import { config, FrameworkData } from "./common.js";
7+
import { checkElementContainsText, checkElementExists, checkElementHasClass, checkElementNotExists, clickElement } from "./playwrightAccess.js";
88

99

1010
export abstract class CPUBenchmarkPlaywright implements benchmarksCommon.BenchmarkImpl {

Diff for: webdriver-ts/src/benchmarksPuppeteer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// import { testTextContains, testTextContainsJS, testTextNotContained, testClassContains, testElementLocatedByXpath, testElementNotLocatedByXPath, testElementLocatedById, clickElementById, clickElementByXPath, getTextByXPath } from './webdriverAccess'
22

33
import { Page } from "puppeteer-core";
4-
import * as benchmarksCommon from "./benchmarksCommon";
5-
import { BenchmarkType } from "./benchmarksCommon";
6-
import { config, FrameworkData } from "./common";
7-
import { checkElementContainsText, checkElementExists, checkElementHasClass, checkElementNotExists, clickElement } from "./puppeteerAccess";
4+
import * as benchmarksCommon from "./benchmarksCommon.js";
5+
import { BenchmarkType } from "./benchmarksCommon.js";
6+
import { config, FrameworkData } from "./common.js";
7+
import { checkElementContainsText, checkElementExists, checkElementHasClass, checkElementNotExists, clickElement } from "./puppeteerAccess.js";
88

99

1010
export abstract class CPUBenchmarkPuppeteer implements benchmarksCommon.BenchmarkImpl {

Diff for: webdriver-ts/src/benchmarksWebdriver.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { WebDriver } from "selenium-webdriver";
2-
import * as benchmarksCommon from "./benchmarksCommon";
3-
import { BenchmarkType } from "./benchmarksCommon";
4-
import { config, FrameworkData } from "./common";
2+
import * as benchmarksCommon from "./benchmarksCommon.js";
3+
import { BenchmarkType } from "./benchmarksCommon.js";
4+
import { config, FrameworkData } from "./common.js";
55
import {
66
clickElementById,
77
clickElementByXPath,
88
getTextByXPath, testClassContains, testElementLocatedById, testElementLocatedByXpath,
99
testElementNotLocatedByXPath, testTextContains
10-
} from "./webdriverAccess";
10+
} from "./webdriverAccess.js";
1111

1212

1313
const SHORT_TIMEOUT = 20 * 1000;

Diff for: webdriver-ts/src/benchmarksWebdriverAfterframe.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { By, WebDriver, WebElement } from "selenium-webdriver";
2-
import * as benchmarksCommon from "./benchmarksCommon";
3-
import { BenchmarkType } from "./benchmarksCommon";
4-
import { config, FrameworkData } from "./common";
2+
import * as benchmarksCommon from "./benchmarksCommon.js";
3+
import { BenchmarkType } from "./benchmarksCommon.js";
4+
import { config, FrameworkData } from "./common.js";
55
import {
66
clickElementById,
77
clickElementByXPath,
88
findByXPath,
99
getTextByXPath, mainRoot, retry, testClassContains, testElementLocatedById, testElementLocatedByXpath,
1010
testElementNotLocatedByXPath, testTextContains
11-
} from "./webdriverAccess";
11+
} from "./webdriverAccess.js";
1212

1313

1414
const SHORT_TIMEOUT = 20 * 1000;

Diff for: webdriver-ts/src/benchmarksWebdriverCDP.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { WebDriver } from "selenium-webdriver";
2-
import * as benchmarksCommon from "./benchmarksCommon";
3-
import { BenchmarkType } from "./benchmarksCommon";
4-
import { config, FrameworkData } from "./common";
2+
import * as benchmarksCommon from "./benchmarksCommon.js";
3+
import { BenchmarkType } from "./benchmarksCommon.js";
4+
import { config, FrameworkData } from "./common.js";
55
import {
66
clickElementById,
77
clickElementByXPath,
88
getTextByXPath, testClassContains, testElementLocatedById, testElementLocatedByXpath,
99
testElementNotLocatedByXPath, testTextContains
10-
} from "./webdriverCDPAccess";
10+
} from "./webdriverCDPAccess.js";
1111

1212

1313
const SHORT_TIMEOUT = 20 * 1000;

Diff for: webdriver-ts/src/common.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import * as fs from "fs";
2-
import * as path from "path";
3-
import * as axios from "axios";
4-
import { StartupBenchmarkResult } from "./benchmarksLighthouse";
5-
import { string } from "yargs";
1+
import axios from "axios";
2+
import { StartupBenchmarkResult } from "./benchmarksLighthouse.js";
63

74

85
export interface JSONResult {

Diff for: webdriver-ts/src/createIndex.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as fs from "fs";
2-
import { JSONResult, config, initializeFrameworks } from "./common";
2+
import { JSONResult, config, initializeFrameworks } from "./common.js";
33
import * as dot from "dot";
44

55
async function main() {

Diff for: webdriver-ts/src/createResultJS.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as fs from "fs";
22
import yargs from "yargs";
3-
import { BenchmarkInfo, benchmarkInfos, BenchmarkType, fileName } from "./benchmarksCommon";
4-
import { subbenchmarks } from "./benchmarksLighthouse";
5-
import { config, initializeFrameworks, JSONResult } from "./common";
3+
import { BenchmarkInfo, benchmarkInfos, BenchmarkType, fileName } from "./benchmarksCommon.js";
4+
import { subbenchmarks } from "./benchmarksLighthouse.js";
5+
import { config, initializeFrameworks, JSONResult } from "./common.js";
66

77
let args: any = yargs(process.argv)
88
.string("url").default("url", config.HOST).argv;

0 commit comments

Comments
 (0)