Skip to content

Commit

Permalink
Merge pull request #298 from jpmorganchase/release-bugs
Browse files Browse the repository at this point in the history
Release bugs
  • Loading branch information
texodus authored Nov 8, 2018
2 parents 0d30e79 + cd108f2 commit 788bce9
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 44 deletions.
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
"bench:build": "lerna run bench:build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"bench:run": "lerna exec ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} -- npm run bench:run",
"bench": "npm-run-all --silent bench:build bench:run",
"precompile": "mkdir -p obj",
"compile": "cd obj/ && emcmake cmake ../scripts/ && emmake make -j${PSP_CPU_COUNT-8}",
"postcompile": "node scripts/compile",
"docs": "lerna run docs --silent --stream",
"pretest:build": "lerna exec -- mkdir -p build",
"test:build": "bash -c '[[ -z \"${PSP_DOCKER}\" ]] && npm run --silent _build_test || npm run --silent _emsdk -- npm run --silent _build_test'",
Expand All @@ -72,16 +69,18 @@
"start": "lerna run start --stream --scope",
"write_tests": "WRITE_TESTS=1 npm run test:run",
"postinstall": "lerna bootstrap --hoist",
"precommit": "npm run lint:autofix && npm run docs && git add . -u",
"lint": "eslint packages/*/src/**/*.js packages/*/test/**/*.js examples/*/*.js",
"lint:autofix:es": "npm run lint -- --fix",
"lint:autofix:clang": "clang-format -i -style=file src/cpp/*.cpp && clang-format -i -style=file src/include/perspective/*.h",
"lint:autofix:less": "prettier --tab-width 4 --write packages/**/src/less/*.less",
"lint:autofix:html": "html-beautify packages/**/src/html/*.html -r",
"lint:autofix:json": "prettier --tab-width 4 --write **/package.json",
"lint:autofix:markdown": "prettier --tab-width 4 --write docs/usage.md docs/installation.md",
"lint:autofix": "npm-run-all --silent lint:autofix:*",
"pre_build": "npm run compile",
"precommit": "npm run lint",
"lint": "npm-run-all --silent lint:*",
"lint:eslint": "eslint packages/*/src/**/*.js packages/*/test/**/*.js examples/*/*.js",
"lint:clang:cpp": "bash -c 'diff -u <(cat src/cpp/*) <(clang-format -style=file src/cpp/*)'",
"lint:clang:include": "bash -c 'diff -u <(cat src/include/perspective/*) <(clang-format -style=file src/include/perspective/*)'",
"fix:es": "npm run lint:eslint -- --fix",
"fix:clang": "clang-format -i -style=file src/cpp/*.cpp && clang-format -i -style=file src/include/perspective/*.h",
"fix:less": "prettier --tab-width 4 --write packages/**/src/less/*.less",
"fix:html": "html-beautify packages/**/src/html/*.html -r",
"fix:json": "prettier --tab-width 4 --write **/package.json",
"fix:markdown": "prettier --tab-width 4 --write docs/usage.md docs/installation.md",
"fix": "npm-run-all --silent fix:*",
"_build": "lerna run build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"_build_test": "lerna run test:build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"_emsdk": "docker run --rm -it ${PSP_CPU_COUNT:+--cpus=\"${PSP_CPU_COUNT}.0\"} -v $(pwd):/src -e PACKAGE=${PACKAGE} perspective/emsdk",
Expand Down
6 changes: 3 additions & 3 deletions packages/perspective-viewer/src/js/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

import {detectIE} from "./utils.js";
import {detectIE} from "@jpmorganchase/perspective/src/js/utils.js";

function calc_index(event) {
if (this._active_columns.children.length == 0) {
Expand Down Expand Up @@ -68,7 +68,7 @@ export function drop(ev) {
}

// Deselect the dropped column
if (this._plugin.deselectMode === "pivots" && this._visible_column_count() > 1 && name !== "sort" && name !== "filter") {
if (this._plugin.deselectMode === "pivots" && this._get_visible_column_count() > 1 && name !== "sort" && name !== "filter") {
for (let x of this.shadowRoot.querySelectorAll("#active_columns perspective-row")) {
if (x.getAttribute("name") === data[0]) {
this._active_columns.removeChild(x);
Expand All @@ -87,7 +87,7 @@ export function column_undrag(event) {
Array.prototype.slice.call(this._active_columns.children).map(x => {
x.className = "";
});
if (this._visible_column_count() > 1 && event.dataTransfer.dropEffect !== "move") {
if (this._get_visible_column_count() > 1 && event.dataTransfer.dropEffect !== "move") {
this._active_columns.removeChild(data);
this._update_column_view();
}
Expand Down
1 change: 1 addition & 0 deletions packages/perspective-viewer/src/less/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
}

.plugin_information {
color: var(--warning--color, inherit);
display: flex;
flex-direction: row;
justify-content: flex-start;
Expand Down
2 changes: 2 additions & 0 deletions packages/perspective-viewer/src/less/material.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ perspective-viewer {
#4d342f 70%,
#222222 100%
);

--warning--color: #333;
}
1 change: 1 addition & 0 deletions packages/perspective-viewer/src/less/row.less
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
border: none;
transform-origin: none;
transition: 0;
background: var(--plugin--background, #fff) !important;
}

.awesomplete > ul:before {
Expand Down
14 changes: 6 additions & 8 deletions packages/perspective/bench/config/benchmark.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
const path = require('path');
const common = require('../../src/config/common.config.js');

module.exports = Object.assign({}, common(), {
module.exports = Object.assign({}, common({no_minify: true}), {
entry: './bench/js/benchmark.js',
plugins: [],
target: "node",
externals: [/^([a-z0-9]|\@(?!apache\-arrow)).*$/],
node: {},
externals: [/^([a-z0-9]|\@(?!apache\-arrow)).*?(?!wasm)$/g],
node: {
__dirname: false,
__filename: false
},
output: {
filename: 'benchmark.js',
path: path.resolve(__dirname, '../../build'),
libraryTarget: "umd"
}
});

module.exports.module.rules.push({
test: /\.wasm$/,
loader: "arraybuffer-loader"
});
6 changes: 2 additions & 4 deletions packages/perspective/bench/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
import "../less/benchmark.less";

import CodeMirror from 'codemirror';
import 'codemirror/lib/codemirror.css';
import 'codemirror/theme/eclipse.css';
import '!!style-loader!css-loader!codemirror/lib/codemirror.css';
import '!!style-loader!css-loader!codemirror/theme/eclipse.css';
import 'codemirror/mode/javascript/javascript.js';

import Chart from "chart.js";

import {histogram} from "d3-array";

String.prototype.hashCode = function(){
var hash = 0;
if (this.length == 0) return hash;
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/bench/results/results.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/perspective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
"bench:build:copy": "cp bench/csv/* build",
"bench:run": "node build/benchmark.js",
"bench": "npm-run-all bench:build bench:run",
"prebuild": "mkdir -p build",
"prebuild": "mkdir -p build && CLICOLOR_FORCE=1 npm run compile",
"precompile": "mkdir -p obj",
"compile": "cd ../../obj/ && emcmake cmake ../scripts/ && emmake make -j${PSP_CPU_COUNT-8}",
"postcompile": "node ../../scripts/compile",
"build": "npm-run-all build:webpack",
"build:webpack": "npm-run-all -p build:webpack:*",
"build:webpack:umd": "webpack --color --config src/config/perspective.config.js",
Expand Down
26 changes: 13 additions & 13 deletions packages/perspective/src/config/common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ const PerspectivePlugin = require("../../webpack-plugin");

const plugins = [new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /(en|es|fr)$/)];

if (!process.env.PSP_NO_MINIFY && !process.env.PSP_DEBUG) {
plugins.push(
new UglifyJSPlugin({
sourceMap: true,
mangle: false,
exclude: /asmjs\.worker\.js$/,
output: {
ascii_only: true
}
})
);
}
module.exports = function({build_worker, no_minify} = {}) {
if (!process.env.PSP_NO_MINIFY && !process.env.PSP_DEBUG && !no_minify) {
plugins.push(
new UglifyJSPlugin({
sourceMap: true,
mangle: false,
exclude: /(asmjs\.worker\.js)$/,
output: {
ascii_only: true
}
})
);
}

module.exports = function(build_worker) {
plugins.push(new PerspectivePlugin({build_worker: build_worker}));
return {
plugins: plugins,
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/src/config/perspective.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require("path");
const common = require("./common.config.js");

module.exports = Object.assign({}, common(true), {
module.exports = Object.assign({}, common({build_worker: true}), {
entry: "./src/js/perspective.parallel.js",
output: {
filename: "perspective.js",
Expand Down

0 comments on commit 788bce9

Please sign in to comment.