Skip to content

Use Node v12.13.0 (LTS) for development #4322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 21, 2019
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: 2.0
jobs:
build:
docker:
- image: circleci/node:10.9.0
- image: circleci/node:12.13.0
working_directory: ~/plotly.js
steps:
- checkout
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
test-jasmine:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
- image: circleci/node:12.13.0-browsers
parallelism: 2
working_directory: ~/plotly.js
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
test-jasmine2:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
- image: circleci/node:12.13.0-browsers
parallelism: 3
working_directory: ~/plotly.js
steps:
Expand All @@ -65,7 +65,7 @@ jobs:
test-jasmine3:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
- image: circleci/node:12.13.0-browsers
working_directory: ~/plotly.js
steps:
- attach_workspace:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

test-syntax:
docker:
- image: circleci/node:10.9.0
- image: circleci/node:12.13.0
working_directory: ~/plotly.js
steps:
- attach_workspace:
Expand All @@ -127,7 +127,7 @@ jobs:
test-bundle:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:10.9.0-browsers
- image: circleci/node:12.13.0-browsers
working_directory: ~/plotly.js
steps:
- attach_workspace:
Expand All @@ -138,7 +138,7 @@ jobs:

publish:
docker:
- image: circleci/node:10.9.0
- image: circleci/node:12.13.0
working_directory: ~/plotly.js
steps:
- attach_workspace:
Expand Down
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
#### Prerequisites

- git
- [node.js](https://nodejs.org/en/). We recommend using node.js v10.x, but all
versions starting from v6 should work. Upgrading and managing node versions
can be easily done using [`nvm`](https://github.com/creationix/nvm) or its
Windows alternatives.
- [`npm`](https://www.npmjs.com/) v6.x and up (which ships by default with
node.js v10.x) to ensure that the
- [node.js](https://nodejs.org/en/). We recommend using node.js v12.x (LTS).
Upgrading and managing node versions can be easily done using
[`nvm`](https://github.com/creationix/nvm) or its Windows alternatives.
- [`npm`](https://www.npmjs.com/) v6.x and up to ensure that the
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
used and updated correctly.

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
environment:
nodejs_version: "10"
nodejs_version: "12"

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"start-image_viewer": "node devtools/image_viewer/server.js",
"start": "npm run start-test_dashboard",
"baseline": "node tasks/baseline.js",
"preversion": "check-node-version --node 10 --npm 6 && npm-link-check && npm ls --prod",
"preversion": "check-node-version --node 12.13 --npm 6.13 && npm-link-check && npm ls --prod",
"version": "npm run build && git add -A dist src build",
"postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"",
"postpublish": "node tasks/sync_packages.js",
Expand Down
2 changes: 1 addition & 1 deletion src/components/fx/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ function createHoverText(hoverData, opts, gd) {
.text(s.text())
.call(Drawing.font, commonLabelFont);
var dummyBB = dummy.node().getBoundingClientRect();
if(dummyBB.width < tbb.width) {
if(Math.round(dummyBB.width) < Math.round(tbb.width)) {
s.attr('x', ltx - dummyBB.width);
}
dummy.remove();
Expand Down
6 changes: 3 additions & 3 deletions test/jasmine/tests/colorbar_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ describe('Test colorbar:', function() {
return document.querySelector('.colorbar');
}

it('can drag root-level colorbars in editable mode', function(done) {
it('@flaky can drag root-level colorbars in editable mode', function(done) {
Plotly.newPlot(gd,
[{z: [[1, 2], [3, 4]], type: 'heatmap'}],
{width: 400, height: 400},
Expand All @@ -417,7 +417,7 @@ describe('Test colorbar:', function() {
.then(done);
});

it('can drag marker-level colorbars in editable mode', function(done) {
it('@flaky can drag marker-level colorbars in editable mode', function(done) {
Plotly.newPlot(gd,
[{y: [1, 2, 1], marker: {color: [0, 1, 2], showscale: true}}],
{width: 400, height: 400},
Expand All @@ -437,7 +437,7 @@ describe('Test colorbar:', function() {
.then(done);
});

it('can drag colorbars linked to color axes in editable mode', function(done) {
it('@flaky can drag colorbars linked to color axes in editable mode', function(done) {
Plotly.newPlot(gd,
[{z: [[1, 2], [3, 4]], type: 'heatmap', coloraxis: 'coloraxis'}],
{coloraxis: {}, width: 400, height: 400},
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/hover_label_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,7 @@ describe('hover on fill', function() {
assertLabelsCorrect([237, 170], [247.7, 166], 'trace 2');

// hover on the cartesian trace in the corner
assertLabelsCorrect([363, 122], [363, 122], 'trace 38');
assertLabelsCorrect([363, 122], [367, 122], 'trace 38');
})
.catch(failTest)
.then(done);
Expand Down
16 changes: 11 additions & 5 deletions test/jasmine/tests/splom_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,18 +943,24 @@ describe('Test splom interactions:', function() {
.then(done);
});

it('@gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) {
it('@noCI @gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) {
var fig = Lib.extendDeep({}, require('@mocks/splom_iris.json'));
fig.layout.showlegend = false;

function assertDims(msg, w, h) {
var canvas = gd._fullLayout._glcanvas;
expect(canvas.node().width).toBe(w, msg);
expect(canvas.node().height).toBe(h, msg);
expect(canvas.node().width).toBe(w, msg + '| canvas width');
expect(canvas.node().height).toBe(h, msg + '| canvas height');

var gl = canvas.data()[0].regl._gl;
expect(gl.drawingBufferWidth).toBe(w, msg);
expect(gl.drawingBufferHeight).toBe(h, msg);
if(/Chrome\/78/.test(window.navigator.userAgent)) {
// N.B. for some reason 4096 is the max dimension allowed by Chrome 78
expect(gl.drawingBufferWidth).toBe(Math.min(w, 4096), msg + '| drawingBufferWidth');
expect(gl.drawingBufferHeight).toBe(Math.min(h, 4096), msg + '| drawingBufferHeight');
} else {
expect(gl.drawingBufferWidth).toBe(w, msg + '| drawingBufferWidth');
expect(gl.drawingBufferHeight).toBe(h, msg + '| drawingBufferHeight');
}
}

var methods = ['cleanPlot', 'supplyDefaults', 'doCalcdata'];
Expand Down