Skip to content

Commit

Permalink
bump frontend dependencies (via #2480)
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Apr 8, 2024
1 parent dd958fa commit a777bb2
Show file tree
Hide file tree
Showing 48 changed files with 6,475 additions and 24,689 deletions.
2 changes: 1 addition & 1 deletion allure-generator/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = {
"space-before-function-paren": [
"error",
{
anonymous: "never",
anonymous: "always",
asyncArrow: "always",
named: "never",
},
Expand Down
2 changes: 1 addition & 1 deletion allure-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "Allure Report Generator"
node {
// repository is declared in root settings.gradle.kts
distBaseUrl.set(null as String?)
version.set("16.20.2")
version.set("20.12.1")
download.set(true)
}

Expand Down
30,656 changes: 6,240 additions & 24,416 deletions allure-generator/package-lock.json

Large diffs are not rendered by default.

107 changes: 50 additions & 57 deletions allure-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
"author": "Dmitry Baev",
"license": "Apache-2.0",
"devDependencies": {
"@babel/core": "^7.13.15",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.15",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.13.15",
"autoprefixer": "^9.8.6",
"@babel/core": "^7.24.4",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.24.1",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.24.4",
"autoprefixer": "^10.4.19",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"babel-loader": "^9.1.3",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"css-loader": "^2.1.1",
"css-loader": "^7.0.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"date-fns": "^1.30.1",
"eslint": "^7.17.0",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -29,61 +30,49 @@
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.2",
"file-loader": "^6.2.0",
"handlebars-jest": "^0.5.0",
"handlebars-loader": "^1.7.1",
"jest": "^24.9.0",
"jsdom": "^16.5.3",
"json-loader": "^0.5.7",
"memory-fs": "^0.4.1",
"mini-css-extract-plugin": "^0.5.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-loader": "^3.0.0",
"postcss-rtl": "^1.7.3",
"prettier": "^1.19.1",
"rimraf": "^3.0.2",
"handlebars-loader": "^1.7.3",
"mini-css-extract-plugin": "^2.8.1",
"postcss-loader": "^8.1.1",
"postcss-rtl": "^2.0.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"sass": "^1.32.10",
"sass-loader": "^7.3.1",
"source-map-loader": "^1.1.3",
"style-loader": "^0.23.1",
"sass-loader": "^14.1.1",
"source-map-loader": "^5.0.0",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.10",
"underscore.string": "^3.3.5",
"url-loader": "^1.1.2",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2",
"webpack-merge": "^4.2.2"
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"webpack-merge": "^5.10.0"
},
"dependencies": {
"@babel/runtime": "^7.13.10",
"@babel/runtime": "^7.24.4",
"b_": "^1.3.4",
"backbone": "1.3.3",
"backbone-decorators": "^0.0.6",
"backbone.marionette": "3.3.1",
"backbone.wreqr": "^1.4.0",
"colorette": "^1.2.2",
"d3-array": "^1.2.0",
"d3-axis": "^1.0.8",
"d3-brush": "^1.1.6",
"d3-drag": "^1.2.5",
"d3-dsv": "^1.2.0",
"d3-interpolate": "^1.4.0",
"d3-scale": "^1.0.6",
"d3-scale-chromatic": "^1.5.0",
"d3-selection": "^1.4.2",
"d3-selection-multi": "^1.0.1",
"d3-shape": "^1.3.7",
"filesize": "^3.5.10",
"backbone": "^1.6.0",
"backbone.marionette": "^3.5.1",
"d3-array": "^3.2.4",
"d3-axis": "^3.0.0",
"d3-brush": "^3.0.0",
"d3-drag": "^3.0.0",
"d3-dsv": "^3.0.1",
"d3-interpolate": "^3.0.1",
"d3-scale": "^4.0.2",
"d3-scale-chromatic": "^3.1.0",
"d3-selection": "^3.0.0",
"d3-shape": "^3.2.0",
"filesize": "^10.1.1",
"font-awesome": "^4.7.0",
"handlebars": "^4.7.7",
"handlebars": "^4.7.8",
"highlight.js": "^10.4.1",
"i18next": "^8.4.3",
"jquery": "^3.6.0",
"jquery": "^3.7.1",
"normalize-css": "^2.3.1",
"sortablejs": "^1.13.0",
"sortablejs": "^1.15.2",
"split.js": "^1.6.4",
"underscore": "^1.8.3"
},
"engines": {
"node": ">=10.10.0"
"underscore": "^1.13.6",
"url": "^0.11.3"
},
"browserslist": [
"last 1 version",
Expand All @@ -93,7 +82,6 @@
"scripts": {
"build": "npm run webpack:prod",
"cleanup": "rimraf build/www",
"coverage": "jest --coverage --collectCoverageFrom=src/main/javascript/**/*.js",
"lint": "eslint --ignore-path=.gitignore ./src/main/javascript",
"lint:fix": "eslint --fix --ignore-path=.gitignore ./src/main/javascript",
"test": "npm run lint",
Expand All @@ -103,9 +91,14 @@
"webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"webpack:build": "npm run cleanup && npm run webpack:build:main",
"webpack:build:main": "npm run webpack -- --config webpack/webpack.dev.js --env.stats=normal",
"webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --host=0.0.0.0 --port=3000 --env.stats=minimal",
"webpack:dev-verbose": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --port=3000 --profile --progress --env.stats=normal",
"webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --host=0.0.0.0 --port=3000",
"webpack:prod": "npm run cleanup && npm run webpack:prod:main",
"webpack:prod:main": "npm run webpack -- --config webpack/webpack.prod.js --profile"
},
"overrides": {
"backbone.marionette": {
"backbone": "^1.6.0",
"underscore": "^1.13.6"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static void main(final String... args) throws IOException {
.withPlugins(plugins)
.build();
final ReportGenerator generator = new ReportGenerator(configuration);
generator.generateSingleFile(files[lastIndex], Arrays.asList(Arrays.copyOf(files, lastIndex)));
generator.generate(files[lastIndex], Arrays.asList(Arrays.copyOf(files, lastIndex)));
}

public static Path[] getFiles(final String... paths) {
Expand Down
12 changes: 6 additions & 6 deletions allure-generator/src/main/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import "font-awesome/css/font-awesome.css";
import "./styles.scss";
import { history } from "backbone";
import { Application, Behaviors } from "backbone.marionette";
import * as behaviors from "./behaviors";
import translate from "./helpers/t";
import { ErrorLayout } from "./layouts/error/ErrorLayout";
import TestResultLayout from "./layouts/testresult/TestResultLayout";
import router from "./router";
import i18next, { initTranslations } from "./utils/translation";
import * as behaviors from "./behaviors/index.js";
import translate from "./helpers/t.js";
import { ErrorLayout } from "./layouts/error/ErrorLayout.js";
import TestResultLayout from "./layouts/testresult/TestResultLayout.js";
import router from "./router.js";
import i18next, { initTranslations } from "./utils/translation.js";

// https://github.com/d3/d3-timer/pull/21
if (typeof window.requestAnimationFrame === "function") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./styles.scss";
import { View } from "backbone";
import { axisBottom, axisLeft } from "d3-axis";
import { event as currentEvent, select } from "d3-selection";
import { select } from "d3-selection";
import template from "./BaseChartView.hbs";

export default class BaseChartView extends View {
Expand Down Expand Up @@ -54,16 +54,14 @@ export default class BaseChartView extends View {

makeAxis(axis, element, options, { left = 0, top = 0 } = {}) {
Object.keys(options).forEach((option) => axis[option](options[option]));
element.call(axis).attrs({
transform: `translate(${left},${top})`,
});
element.call(axis).attr("transform", `translate(${left},${top})`);
return axis;
}

getTooltipContent() {}

onItemOver(d) {
this.showTooltip(d, currentEvent.target);
onItemOver(event, d) {
this.showTooltip(d, event.target);
}

showTooltip(d, element) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,17 @@ export default class DurationChart extends BaseChartView {

this.bindTooltip(bars);

bars.attrs({
x: (d) => this.x(d.x0) + 2,
y: this.height,
width: (d) => Math.max(this.x(d.x1) - this.x(d.x0) - 2, 0),
height: 0,
});
bars
.attr("x", (d) => this.x(d.x0) + 2)
.attr("y", this.height)
.attr("width", (d) => Math.max(this.x(d.x1) - this.x(d.x0) - 2, 0))
.attr("height", 0);

if (this.firstRender) {
bars = bars.transition().duration(500);
}

bars.attrs({
y: (d) => this.y(d.y),
height: (d) => this.height - this.y(d.y),
});
bars.attr("y", (d) => this.y(d.y)).attr("height", (d) => this.height - this.y(d.y));
}

getTooltipContent({ testResults }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class PieChartView extends BaseChartView {

const sectors = this.svg
.select(".chart__plot")
.attrs({ transform: `translate(${leftOffset},${topOffset})` })
.attr("transform", `translate(${leftOffset},${topOffset})`)
.selectAll(".chart__arc")
.data(this.pie(data))
.enter()
Expand All @@ -76,8 +76,8 @@ class PieChartView extends BaseChartView {
.select(".chart__plot")
.append("text")
.classed("chart__caption", true)
.attrs({ dy: "0.4em" })
.styles({ "font-size": `${radius / 3}px` })
.attr("dy", "0.4em")
.style("font-size", `${radius / 3}px`)
.text(this.getChartTitle());

if (this.firstRender) {
Expand Down Expand Up @@ -146,9 +146,11 @@ class PieChartView extends BaseChartView {
onLegendHover(e) {
const el = this.$(e.currentTarget);
const status = el.data("status");
const sector = this.$(`.chart__fill_status_${status}`)[0];
const data = select(sector).datum();
this.showTooltip(data, sector);
const sector = this.$el.find(`.chart__fill_status_${status}`)[0];
if (sector) {
const data = select(sector).datum();
this.showTooltip(data, sector);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class SeverityChartView extends BaseChartView {
getChartData() {
this.data = severities.map((severity) =>
values.map((status) => {
const testResults = this.collection.filter(function(item) {
const testResults = this.collection.filter(function (item) {
return item.status === status && item.severity === severity;
});
return {
Expand Down Expand Up @@ -69,24 +69,20 @@ export default class SeverityChartView extends BaseChartView {
.enter()
.append("rect");

bars.attrs({
x: (d) => this.status(d.status),
y: this.height,
height: 0,
width: this.status.step(),
class: (d) => `chart__bar chart__fill_status_${d.status}`,
});
bars
.attr("x", (d) => this.status(d.status))
.attr("y", this.height)
.attr("height", 0)
.attr("width", this.status.step())
.attr("class", (d) => `chart__bar chart__fill_status_${d.status}`);

this.bindTooltip(bars);

if (this.firstRender) {
bars = bars.transition().duration(500);
}

bars.attrs({
y: (d) => this.y(d.value),
height: (d) => this.height - this.y(d.value),
});
bars.attr("y", (d) => this.y(d.value)).attr("height", (d) => this.height - this.y(d.value));
super.onAttach();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import "./styles.scss";
import { max } from "d3-array";
import { scaleLinear, scalePoint } from "d3-scale";
import { scaleOrdinal, schemeCategory20 } from "d3-scale";
import { scaleOrdinal } from "d3-scale";
import { schemeCategory10 } from "d3-scale-chromatic";
import { area, line, stack } from "d3-shape";
import BaseChartView from "../../components/graph-base/BaseChartView";
import TooltipView from "../../components/tooltip/TooltipView";
Expand All @@ -22,7 +23,7 @@ class TrendChartView extends BaseChartView {
.keys(this.keys)
.value((d, key) => d.data[key] || 0);

this.color = options.colors || scaleOrdinal(schemeCategory20);
this.color = options.colors || scaleOrdinal(schemeCategory10);

options.notStacked && this.stack.offset(() => {});
this.yTickFormat = options.yTickFormat || ((d) => d);
Expand Down Expand Up @@ -57,15 +58,9 @@ class TrendChartView extends BaseChartView {
});

if (document.dir === "rtl") {
this.svg
.selectAll(".chart__axis_x")
.selectAll("text")
.style("text-anchor", "start");
this.svg.selectAll(".chart__axis_x").selectAll("text").style("text-anchor", "start");
} else {
this.svg
.selectAll(".chart__axis_x")
.selectAll("text")
.style("text-anchor", "end");
this.svg.selectAll(".chart__axis_x").selectAll("text").style("text-anchor", "end");
}

this.svg
Expand Down Expand Up @@ -135,12 +130,7 @@ class TrendChartView extends BaseChartView {
}

showSlices(data) {
this.plot
.selectAll(".slice")
.data(data)
.enter()
.append("g")
.attr("class", "slice");
this.plot.selectAll(".slice").data(data).enter().append("g").attr("class", "slice");

this.plot
.selectAll(".slice")
Expand Down Expand Up @@ -179,7 +169,7 @@ class TrendChartView extends BaseChartView {
.attr("width", (d, i) =>
i === 0 || this.x(d.id) === this.width ? this.x.step() / 2 : this.x.step(),
)
.on("mouseover", (d) => {
.on("mouseover", (event, d) => {
const anchor = this.plot
.append("circle")
.attr("class", "anchor")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LanguageSelectView extends PopoverView {
const langId = this.$(e.currentTarget).data("id");
settings.setLanguage(langId);
i18next.changeLanguage(langId);
gtag( "language_change", { language: langId });
gtag("language_change", { language: langId });
}
}

Expand Down
Loading

0 comments on commit a777bb2

Please sign in to comment.