From 8f70018a7bf7e0a015e001601e0959009317fb8d Mon Sep 17 00:00:00 2001 From: wimrijnders Date: Sun, 16 Jul 2017 22:51:20 +0200 Subject: [PATCH] Upgrade packages and tools for Travis unit testing (#3262) * Add C++11 and canvas module for travis tests * Added libgif, updated version gulp-clean-css * Update version webpack * Force versions minimatch, graceful-fs; fixes for upgraded webpack * Force version minimatch through travis.yml * Fix comma's in json * Add extraneous modules to package.json; final attempt at forcing versions of minimatch and graceful-fs * Final changes module versions * Fix due to linting * Fix typo in package.json * Upgrade eslint --- .eslintrc | 1 + .travis.yml | 12 +++++++++++- gulpfile.js | 5 +++-- lib/network/modules/ManipulationSystem.js | 2 +- package.json | 13 ++++++++++--- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index 1466a3db4..4d6a230f6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -22,5 +22,6 @@ "no-redeclare": 0, "no-unreachable": 1, "no-unused-vars": 0, + "no-useless-escape": 0, } } diff --git a/.travis.yml b/.travis.yml index f12ed79fa..3948301f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,15 @@ language: node_js -node_js: "6" +node_js: + - "6" +env: + - CXX=g++-4.8 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libgif-dev + - g++-4.8 before_script: - npm run lint - npm install -g gulp diff --git a/gulpfile.js b/gulpfile.js index 74fc9870b..44acd9f6f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,7 @@ var argv = require('yargs').argv; var ENTRY = './index.js'; var HEADER = './lib/header.js'; -var DIST = './dist'; +var DIST = __dirname + '/dist'; var VIS_JS = 'vis.js'; var VIS_MAP = 'vis.map'; var VIS_MIN_JS = 'vis.min.js'; @@ -38,7 +38,8 @@ function createBanner() { .replace('@@version', version); } -var bannerPlugin = new webpack.BannerPlugin(createBanner(), { +var bannerPlugin = new webpack.BannerPlugin({ + banner: createBanner(), entryOnly: true, raw: true }); diff --git a/lib/network/modules/ManipulationSystem.js b/lib/network/modules/ManipulationSystem.js index 581ae9373..36d426214 100644 --- a/lib/network/modules/ManipulationSystem.js +++ b/lib/network/modules/ManipulationSystem.js @@ -1077,8 +1077,8 @@ class ManipulationSystem { }); } else { - throw new Error('The function for add does not support two arguments (data,callback)'); this.showManipulatorToolbar(); + throw new Error('The function for add does not support two arguments (data,callback)'); } } else { diff --git a/package.json b/package.json index e1d285ee7..a3698d84f 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ "type": "git", "url": "git://github.com/almende/vis.git" }, + "bugs": { + "url": "https://github.com/almende/vis/issues" + }, "keywords": [ "vis", "visualization", @@ -48,21 +51,25 @@ "babel-preset-es2015": "^6.6.0", "babel-runtime": "^6.22.0", "babelify": "^7.3.0", + "canvas": "^1.6.5", "clean-css": "^4.0.2", - "eslint": "^3.15.0", + "eslint": "^4.2.0", "gulp": "^3.9.1", - "gulp-clean-css": "^2.3.2", + "gulp-clean-css": "^3.7.0", "gulp-concat": "^2.6.1", + "gulp-eslint": "^4.0.0", "gulp-rename": "^1.2.2", "gulp-util": "^3.0.8", "jsdom": "9.9.1", "jsdom-global": "^2.1.1", + "merge-stream": "^1.0.0", "mocha": "^3.2.0", "mocha-jsdom": "^1.1.0", "rimraf": "^2.5.4", + "test-console": "^1.0.0", "uglify-js": "^2.7.5", "uuid": "^3.0.1", - "webpack": "^1.14.0", + "webpack": "^2.0.0", "yargs": "^6.6.0" } }