Commit e75a97cd authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbolizer] Version bumps for dependencies

This CL updates TypeScript, rollup and d3 to newer versions.

Drive-bys:
 - Remove unused source file lang-disassembly.
 - Fix typing problem with FileReader callback

The rollup version update also ensures that watch mode works again:

  npm run-script watch

Change-Id: If852bc4287760017c185fbcb6dd9d2e36db36a04
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1396091
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58551}
parent f214b914
This diff is collapsed.
......@@ -13,12 +13,11 @@
"author": "The V8 team",
"license": "MIT",
"dependencies": {
"@types/d3": "^5.0.0",
"d3": "^5.5.0",
"pegjs": "^0.10.0",
"rollup": "^0.62.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-typescript2": "^0.15.1"
"@types/d3": "^5.5.0",
"d3": "^5.7.0",
"rollup": "^0.68.2",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-typescript2": "^0.18.1"
},
"repository": {
"type": "git",
......@@ -28,7 +27,7 @@
"chai": "^4.2.0",
"mocha": "^5.2.0",
"ts-mocha": "^2.0.0",
"typescript": "^2.9.1",
"typescript": "^3.2.2",
"typescript-formatter": "^7.2.2",
"local-web-server": "^2.6.0"
}
......
......@@ -10,8 +10,8 @@ import path from 'path'
const onwarn = warning => {
// Silence circular dependency warning for moment package
const node_modules = path.normalize('node_modules/');
if (warning.code === 'CIRCULAR_DEPENDENCY'
&& !warning.importer.indexOf(node_modules)) {
if (warning.code === 'CIRCULAR_DEPENDENCY' &&
!warning.importer.indexOf(node_modules)) {
return
}
......@@ -20,7 +20,13 @@ const onwarn = warning => {
export default {
input: "src/turbo-visualizer.ts",
plugins: [node(), typescript({abortOnError:false})],
output: {file: "build/turbolizer.js", format: "iife", sourcemap: true},
plugins: [node(), typescript({
abortOnError: false
})],
output: {
file: "build/turbolizer.js",
format: "iife",
sourcemap: true
},
onwarn: onwarn
};
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
PR.registerLangHandler(
PR.createSimpleLexer(
[
[PR.PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/, null, '\''],
[PR.PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']
],
[ // fallthroughStylePatterns
[PR.PR_COMMENT, /;; debug: position \d+/, null],
]),
['disassembly']);
......@@ -209,7 +209,7 @@ window.onload = function () {
if (multiview) multiview.onresize();
}
function loadFile(txtRes) {
function loadFile(txtRes: string) {
// If the JSON isn't properly terminated, assume compiler crashed and
// add best-guess empty termination
if (txtRes[txtRes.length - 2] == ',') {
......@@ -294,14 +294,16 @@ window.onload = function () {
d3.select("#upload").on("click",
() => document.getElementById("upload-helper").click());
d3.select("#upload-helper").on("change", function (this: HTMLInputElement) {
var uploadFile = this.files && this.files[0];
var filereader = new FileReader();
filereader.onload = function (e) {
var txtRes = filereader.result;
const uploadFile = this.files && this.files[0];
if (uploadFile) {
const filereader = new FileReader();
filereader.onload = () => {
const txtRes = filereader.result;
if (typeof txtRes == 'string')
loadFile(txtRes);
};
if (uploadFile)
filereader.readAsText(uploadFile);
}
});
}
......
......@@ -11,7 +11,6 @@
},
"files": [
"src/util.ts",
"src/lang-disassembly.ts",
"src/node.ts",
"src/edge.ts",
"src/graph.ts",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment