Skip to content

Commit 3b17a90

Browse files
merge with master branch
2 parents dd3cc91 + 2b58ca2 commit 3b17a90

File tree

280 files changed

+21778
-16948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+21778
-16948
lines changed

.circleci/config.yml

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version: 2.0
1010
jobs:
1111
install-and-cibuild:
1212
docker:
13-
- image: circleci/node:12.13.0
13+
- image: circleci/node:12.22.1
1414
working_directory: ~/plotly.js
1515
steps:
1616
- checkout
@@ -43,8 +43,8 @@ jobs:
4343
no-gl-jasmine:
4444
docker:
4545
# need '-browsers' version to test in real (xvfb-wrapped) browsers
46-
- image: circleci/node:12.13.0-browsers
47-
parallelism: 2
46+
- image: circleci/node:12.22.1-browsers
47+
parallelism: 8
4848
working_directory: ~/plotly.js
4949
steps:
5050
- attach_workspace:
@@ -56,8 +56,8 @@ jobs:
5656
webgl-jasmine:
5757
docker:
5858
# need '-browsers' version to test in real (xvfb-wrapped) browsers
59-
- image: circleci/node:12.13.0-browsers
60-
parallelism: 3
59+
- image: circleci/node:12.22.1-browsers
60+
parallelism: 8
6161
working_directory: ~/plotly.js
6262
steps:
6363
- attach_workspace:
@@ -69,7 +69,7 @@ jobs:
6969
no-gl-flaky-jasmine:
7070
docker:
7171
# need '-browsers' version to test in real (xvfb-wrapped) browsers
72-
- image: circleci/node:12.13.0-browsers
72+
- image: circleci/node:12.22.1-browsers
7373
working_directory: ~/plotly.js
7474
steps:
7575
- attach_workspace:
@@ -93,7 +93,7 @@ jobs:
9393
npm run docker -- setup
9494
- run:
9595
name: Run image tests (part A)
96-
command: ./.circleci/test.sh stable-image
96+
command: ./.circleci/test.sh stable-image ; find build -maxdepth 1 -type f -delete
9797
- store_artifacts:
9898
path: build
9999
destination: /
@@ -112,14 +112,28 @@ jobs:
112112
npm run docker -- setup
113113
- run:
114114
name: Run image tests (part B)
115-
command: ./.circleci/test.sh flaky-image
115+
command: ./.circleci/test.sh flaky-image ; find build -maxdepth 1 -type f -delete
116116
- store_artifacts:
117117
path: build
118118
destination: /
119119

120+
mock-validation:
121+
docker:
122+
- image: circleci/node:12.22.1
123+
working_directory: ~/plotly.js
124+
steps:
125+
- attach_workspace:
126+
at: ~/
127+
- run:
128+
name: Test validation using node.js and jsdom
129+
command: npm run test-plain-obj
130+
- run:
131+
name: Validate mocks
132+
command: npm run test-mock
133+
120134
source-syntax:
121135
docker:
122-
- image: circleci/node:12.13.0
136+
- image: circleci/node:12.22.1
123137
working_directory: ~/plotly.js
124138
steps:
125139
- attach_workspace:
@@ -131,7 +145,7 @@ jobs:
131145
jasmine-bundle:
132146
docker:
133147
# need '-browsers' version to test in real (xvfb-wrapped) browsers
134-
- image: circleci/node:12.13.0-browsers
148+
- image: circleci/node:12.22.1-browsers
135149
working_directory: ~/plotly.js
136150
steps:
137151
- attach_workspace:
@@ -142,7 +156,7 @@ jobs:
142156

143157
publish-dist:
144158
docker:
145-
- image: circleci/node:12.13.0
159+
- image: circleci/node:12.22.1
146160
working_directory: ~/plotly.js
147161
steps:
148162
- attach_workspace:
@@ -170,9 +184,18 @@ jobs:
170184
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
171185
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
172186
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
173-
- run:
174-
name: Test validation using node.js and jsdom
175-
command: npm run test-plain-obj
187+
- persist_to_workspace:
188+
root: ~/
189+
paths:
190+
- plotly.js
191+
192+
test-dist1:
193+
docker:
194+
- image: circleci/node:12.22.1
195+
working_directory: ~/plotly.js
196+
steps:
197+
- attach_workspace:
198+
at: ~/
176199
- run:
177200
name: Test plotly.min.js import using requirejs
178201
command: npm run test-requirejs
@@ -182,13 +205,19 @@ jobs:
182205
- run:
183206
name: Test certain bundles against function constructors
184207
command: npm run no-new-func
208+
209+
test-dist2:
210+
docker:
211+
- image: circleci/node:12.22.1
212+
working_directory: ~/plotly.js
213+
steps:
214+
- attach_workspace:
215+
at: ~/
185216
- run:
186217
name: Test plotly bundles against es6
187218
command: npm run no-es6-dist
188219
- run:
189220
name: Test plotly bundles againt duplicate keys
190-
environment:
191-
NODE_OPTIONS: --max_old_space_size=4096
192221
command: npm run no-dup-keys
193222

194223
workflows:
@@ -214,9 +243,18 @@ workflows:
214243
- flaky-image:
215244
requires:
216245
- install-and-cibuild
246+
- mock-validation:
247+
requires:
248+
- install-and-cibuild
217249
- source-syntax:
218250
requires:
219251
- install-and-cibuild
220252
- publish-dist:
221253
requires:
222254
- install-and-cibuild
255+
- test-dist1:
256+
requires:
257+
- publish-dist
258+
- test-dist2:
259+
requires:
260+
- publish-dist

.circleci/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ case $1 in
4545
set_tz
4646

4747
SUITE=$(circleci tests glob "$ROOT/test/jasmine/tests/*" | circleci tests split)
48-
npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
48+
MAX_AUTO_RETRY=2
49+
retry npm run test-jasmine -- $SUITE --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
4950

5051
exit $EXIT_STATE
5152
;;
@@ -55,7 +56,7 @@ case $1 in
5556

5657
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split))
5758
for s in ${SHARDS[@]}; do
58-
MAX_AUTO_RETRY=1
59+
MAX_AUTO_RETRY=2
5960
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI --doNotFailOnEmptyTestSuite
6061
done
6162

CHANGELOG.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,25 @@ where X.Y.Z is the semver of most recent plotly.js release.
1212
## [2.0.0] -- UNRELEASED
1313

1414
### Added
15-
- Removed usage of function constructors from `basic`, `cartesian`, `finance`, `geo`, and `mapbox`
15+
- CSP safety: refactored to avoid usage of function constructors from `basic`, `cartesian`, `finance`, `geo`, and `mapbox`
1616
partial bundles and added tests to ensure that they will not again do so in the future [[#5359](https://github.com/plotly/plotly.js/pull/5359), [#5383](https://github.com/plotly/plotly.js/pull/5383), [#5387](https://github.com/plotly/plotly.js/pull/5387)],
1717
with thanks to [Equinor](https://www.equinor.com) for sponsoring the related development!
1818
- Add `strict` partial bundle [[#5413](https://github.com/plotly/plotly.js/pull/5413), [#5444](https://github.com/plotly/plotly.js/pull/5444)], which includes
1919
the maximal subset of the library which does not rely on function constructors
20+
- Add `partial-bundle` script to facilitate generation of custom bundles [[#5527](https://github.com/plotly/plotly.js/pull/5527), [#5508](https://github.com/plotly/plotly.js/pull/5508)]
2021
- Implement "fast" `zsmooth` option for `image` trace [[#5354](https://github.com/plotly/plotly.js/pull/5354), [#5386](https://github.com/plotly/plotly.js/pull/5386)],
2122
with thanks to @almarklein for the contribution!
23+
- Implement various `marker.pattern` options in `histogram`, `bar` and `barpolar` traces [[#5520](https://github.com/plotly/plotly.js/pull/5520), [#5537](https://github.com/plotly/plotly.js/pull/5537)]
24+
with thanks to @s417-lama for the contribution!
25+
- Implement `ticklabeloverflow` options on cartesian axes and colorbars to drop tick labels going outside div or domain [[#5584](https://github.com/plotly/plotly.js/pull/5584)]
26+
- Implement `(x|y|z)hoverformat`, `(u|v|w)hoverformat` and `valueformat` to cartesian and gl3d traces [[#5563](https://github.com/plotly/plotly.js/pull/5563)]
2227

2328
### Removed
24-
- Drop support for old browsers IE9 and IE10 [[#5376](https://github.com/plotly/plotly.js/pull/5376), [#5380](https://github.com/plotly/plotly.js/pull/5380), [#5460](https://github.com/plotly/plotly.js/pull/5460)]
29+
- Drop support for old browsers IE9 and IE10 [[#5376](https://github.com/plotly/plotly.js/pull/5376), [#5380](https://github.com/plotly/plotly.js/pull/5380), [#5460](https://github.com/plotly/plotly.js/pull/5460), [#5491](https://github.com/plotly/plotly.js/pull/5491)]
2530
- Stop exporting v3 of d3 under `Plotly.d3` [[#5400](https://github.com/plotly/plotly.js/pull/5400), [#5406](https://github.com/plotly/plotly.js/pull/5406)]
2631
- Stop attaching `_has*` plot types to `fullLayout` [[#5409](https://github.com/plotly/plotly.js/pull/5409)]
32+
- Stop injecting MathJax config by default [[#5514](https://github.com/plotly/plotly.js/pull/5514)]
33+
- Remove `sane-topojson` and MathJax v2.3 files from dist folder and change supported MathJax version to v2.7.5 [[#5487](https://github.com/plotly/plotly.js/pull/5487), [#5492](https://github.com/plotly/plotly.js/pull/5492), [#5494](https://github.com/plotly/plotly.js/pull/5494)]
2734
- Reduce the number of exported methods from `Plotly.Fx` and `Plotly.Plots` in the API [[#5420](https://github.com/plotly/plotly.js/pull/5420)]
2835
- Drop `Plotly.plot` from the API [[#5412](https://github.com/plotly/plotly.js/pull/5412), [#5370](https://github.com/plotly/plotly.js/pull/5370), [#5393](https://github.com/plotly/plotly.js/pull/5393)]
2936
- Drop `Plotly.Queue` from the API [[#5423](https://github.com/plotly/plotly.js/pull/5423)]
@@ -40,7 +47,12 @@ where X.Y.Z is the semver of most recent plotly.js release.
4047
- Add major versions e.g. "latest-v2" when publishing latest to CDN and keep "latest" for v1 [[#5462](https://github.com/plotly/plotly.js/pull/5462)]
4148
- Switch to `native-promise-only` module to handle es6 promises [[#5358](https://github.com/plotly/plotly.js/pull/5358)]
4249
- Switch to `probe-image-size` module to get width and height of images [[#5388](https://github.com/plotly/plotly.js/pull/5388)]
43-
- Relax test for plain objects to enable validation in node.js and multiple window contexts [[#5411](https://github.com/plotly/plotly.js/pull/5411)]
50+
- Relax test for plain objects to enable validation in node.js and multiple window contexts [[#5411](https://github.com/plotly/plotly.js/pull/5411), [#5498](https://github.com/plotly/plotly.js/pull/5498)]
51+
- Display latitudes before longitudes in hoverlabels to comply with ISO 6709 (Standard representation of geographic point location by coordinates) [[#5485](https://github.com/plotly/plotly.js/pull/5485)]
52+
- Adjust text shadow color in respect to `paper_bgcolor` for better dark mode display of
53+
`sankey`, `parcoords` and `parcats` traces [[#5506](https://github.com/plotly/plotly.js/pull/5506)]
54+
- Improve `sankey` text namely support pseudo-html, fix `textfont.color` and avoid clipping [[#5531](https://github.com/plotly/plotly.js/pull/5531)]
55+
- Make selection event data of `scattergl` on par with `scatter` traces [[#5534](https://github.com/plotly/plotly.js/pull/5534)]
4456
- Fire `plotly_unhover` event when dragging [[#5407](https://github.com/plotly/plotly.js/pull/5407)],
4557
with thanks to @rreusser for the contribution!
4658
- Include transforms and calendars in partial bundles [[#5379](https://github.com/plotly/plotly.js/pull/5379), [#5422](https://github.com/plotly/plotly.js/pull/5422)]
@@ -56,10 +68,19 @@ where X.Y.Z is the semver of most recent plotly.js release.
5668
with thanks to @ruijin for the contribution!
5769
- Fix element targeting on hover in shadow DOM [[#5256](https://github.com/plotly/plotly.js/pull/5256)],
5870
with thanks to @dbluhm for the contribution!
71+
- Hide gridlines and ticks overlapping "inside" ticklabels [[#5550](https://github.com/plotly/plotly.js/pull/5550), [#5586](https://github.com/plotly/plotly.js/pull/5586), [#5589](https://github.com/plotly/plotly.js/pull/5589)]
72+
- Fix hover filter to display close period points [[#5543](https://github.com/plotly/plotly.js/pull/5543)]
73+
- Fix spike on `bar`-like traces [[#5542](https://github.com/plotly/plotly.js/pull/5542)]
5974
- Fix displaying zero `threshold` for `indicator` trace [[#5430](https://github.com/plotly/plotly.js/pull/5430)]
75+
- Fix axis constraints for `heatmapgl` [[#5476](https://github.com/plotly/plotly.js/pull/5476)]
76+
- Fix setTimeout functions to return in the case of undefined layouts [[#5482](https://github.com/plotly/plotly.js/pull/5482)]
6077
- Avoid duplicate keys in object literals within plotly builds [[#5458](https://github.com/plotly/plotly.js/pull/5458)]
6178
- Improve attribute compression and avoid redundant copyright comments in non-minified
6279
bundles [[#5426](https://github.com/plotly/plotly.js/pull/5426), [#5429](https://github.com/plotly/plotly.js/pull/5429), [#5439](https://github.com/plotly/plotly.js/pull/5439)]
80+
- Provide links to all pull requests in the changelog [[#5469](https://github.com/plotly/plotly.js/pull/5469)]
81+
- Fix syntax test on the dist files [[#5471](https://github.com/plotly/plotly.js/pull/5471)]
82+
- Publish partial bundles using relevant tag from the package e.g. `latest` or `rc` [[#5467](https://github.com/plotly/plotly.js/pull/5467)]
83+
- Place CDN publish script inside plotly.js repository [[#5468](https://github.com/plotly/plotly.js/pull/5468), [#5470](https://github.com/plotly/plotly.js/pull/5470)]
6384

6485

6586
## [1.58.4] -- 2020-12-21

0 commit comments

Comments
 (0)