Skip to content
Permalink
Browse files

upgrade dev dependencies to @latest and fix exact dependencies (#392)

The principal motivation for that is to apply a minification to a production
bundle which is available via webpack > 4 version
It is also a good practice to have close to latest dependencies which have
been fixed in order to ensure a maximal reproducibility of a build.

Also:
- add/fix scripts for running webpack and webpack-dev-server
- fix some incompatibility issues with d3.js
- webpack demands now an environment to be set which is done by setting
NODE_ENV
- regenerated whole yarn.lock
  • Loading branch information...
eryshev committed Apr 30, 2019
1 parent 25ed774 commit 37f238a33f0e43b19ebaccd266edaf13293e0302
@@ -1,35 +1,35 @@
{
"license": "Apache-2.0",
"devDependencies": {
"babel-cli": "^6.23.0",
"babel-core": "^6.23.1",
"babel-eslint": "^7.2.1",
"babel-loader": "^6.3.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.22.0",
"css-loader": "^0.26.1",
"devloop": "^0.1.10",
"empty": "^0.10.1",
"eslint": "^3.18.0",
"eslint-config-prettier": "^1.5.0",
"eslint-plugin-flowtype": "^2.30.4",
"eslint-plugin-lodash": "^2.4.0",
"eslint-plugin-prettier": "^2.0.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^6.10.3",
"file-loader": "^0.10.0",
"flow-bin": "^0.72.0",
"flow-status-webpack-plugin": "^0.1.7",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.2",
"less-loader": "^2.2.3",
"prettier": "^1.3.1",
"prettier-eslint-cli": "^4.1.0",
"style-loader": "^0.13.1",
"webpack": "^2.2.1",
"webpack-dev-middleware": "^2.0.5",
"webpack-dev-server": "^3.1.4"
"@babel/core": "7.4.4",
"@babel/plugin-proposal-class-properties": "7.4.4",
"@babel/preset-env": "7.4.4",
"@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"babel-eslint": "10.0.1",
"babel-loader": "8.0.5",
"css-loader": "2.1.1",
"devloop": "0.1.10",
"empty": "0.10.1",
"eslint": "5.16.0",
"eslint-config-prettier": "4.2.0",
"eslint-plugin-flowtype": "3.6.1",
"eslint-plugin-lodash": "5.1.0",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-promise": "4.1.1",
"eslint-plugin-react": "7.12.4",
"file-loader": "3.0.1",
"flow-bin": "0.98.0",
"flow-status-webpack-plugin": "0.1.7",
"html-webpack-plugin": "3.2.0",
"less": "3.9.0",
"less-loader": "5.0.0",
"prettier-eslint-cli": "4.7.1",
"style-loader": "0.23.1",
"webpack": "4.30.0",
"webpack-cli": "3.3.1",
"webpack-dev-server": "3.3.1",
"webpack-merge": "4.2.1"
},
"dependencies": {
"autolinker": "^1.4.3",
@@ -38,9 +38,11 @@
"css.escape": "^1.5.1",
"cytoscape": "^2.7.15",
"cytoscape-dagre": "^1.3.0",
"d3": "^4.7.4",
"d3": "4.7.4",
"d3-interpolate-path": "^1.1.1",
"d3plus-text": "^0.9.25",
"d3-selection": "1.3.0",
"d3-transition": "1.2.0",
"d3plus-text": "0.9.25",
"fuse.js": "^3.0.0",
"history": "^4.6.1",
"lodash": "^4.17.4",
@@ -81,6 +83,7 @@
"format-diff": "prettier-eslint $(git diff-index HEAD --name-only --diff-filter=d -- '*.js') --write --bracket-spacing true",
"eslint": "eslint \"**/src/**/*.js\"",
"eslint-check": "eslint --print-config .eslintrc | eslint-config-prettier-check",
"serve": "webpack-dev-server --output-public-path='/' --hot"
"serve": "NODE_ENV=development webpack-dev-server --output-public-path='/' --hot",
"build": "NODE_ENV=production webpack"
}
}
@@ -6,7 +6,7 @@ import React from "react";
import _ from "lodash";
import numeral from "numeraljs";

export type BadgeKind = "success" | "info" | "error" | "warning";
export type BadgeKind = "success" | "info" | "error" | "warning" | "alt";

type Props = {
kind: BadgeKind,
@@ -20,9 +20,10 @@ import type { ExecutionLog } from "../../datamodel";
import StreamView from "../components/StreamView";
import TextWithDashedLine from "../components/TextWithDashedLine";

type Level = "DEBUG" | "INFO" | "ERROR";
type Line = {
timestamp: string,
level: "DEBUG" | "INFO" | "ERROR",
level: Level,
message: string
};

@@ -179,11 +180,12 @@ class Execution extends React.Component<Props, State> {
} else if (json == "BOS" && streamsEventSource) {
this.shouldOverwriteStreams = true;
} else {
let lines = [];
let lines: Array<Line> = [];
json.map(line => {
let groups = /([^ ]+) ([^ ]+)\s+- (.*)/.exec(line);
if (groups) {
let [_, timestamp, level, message] = groups;
let [_, timestamp, levelAsString, message] = groups;
const level: Level = (levelAsString: any);
lines.push({
timestamp: moment.utc(timestamp).format("YYYY-MM-DD HH:mm:ss"),
level,
@@ -193,8 +195,9 @@ class Execution extends React.Component<Props, State> {
});
const streamsHead = this.shouldOverwriteStreams ? [] : this.state.streams;
this.shouldOverwriteStreams = false;
const streams = streamsHead.concat(lines);
this.setState({
streams: streamsHead.concat(lines)
streams
});
}
}
@@ -190,6 +190,7 @@ export const enter = (
tags
);
node.on("click", () => onClick(d.id));
console.log(node);
transitionNode(node, currentLayout.nodes[d.id]).on("end", () =>
resolve("enter nodes done")
);
@@ -1,5 +1,8 @@
import { nodeKind, edgeKind } from "../layout/symbolic/annotatedGraph";
import * as d3 from "d3";
import "d3-transition";
import "d3-selection";

import { nodeKind, edgeKind } from "../layout/symbolic/annotatedGraph";
import { textWrap } from "d3plus-text";
import { forEach, identity, reduce } from "lodash";
import { interpolatePath } from "d3-interpolate-path";
@@ -1,13 +1,17 @@
const process = require("process");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const FlowStatusWebpackPlugin = require("flow-status-webpack-plugin");
const merge = require("webpack-merge");

const env = process.env.NODE_ENV || "production";

const outputPath = path.resolve(
__dirname,
"timeseries/target/scala-2.11/classes/public"
);

module.exports = {
const common = {
entry: {
app: [path.resolve(__dirname, "timeseries/src/main/javascript/index.js")]
},
@@ -38,8 +42,8 @@ module.exports = {
loader: "babel-loader",
options: {
cacheDirectory: true,
presets: ["react", "es2015", "stage-0"],
plugins: []
presets: ["@babel/env", "@babel/flow", "@babel/react"],
plugins: ["@babel/plugin-proposal-class-properties"]
}
}
],
@@ -68,3 +72,7 @@ module.exports = {
})
]
};

module.exports = merge(common, {
mode: env
});
Oops, something went wrong.

0 comments on commit 37f238a

Please sign in to comment.
You can’t perform that action at this time.