Skip to content

Commit 32aeac6

Browse files
committed
Merge remote-tracking branch 'origin/master' into new-d3-geo
2 parents be527cf + af226c9 commit 32aeac6

36 files changed

+21563
-8107
lines changed

.circleci/config.yml

Lines changed: 19 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,8 @@ jobs:
1515
steps:
1616
- checkout
1717
- run:
18-
name: set heap option before very first node.js call
19-
command: |
20-
export NODE_OPTIONS='--max-old-space-size=4096'
21-
- run:
22-
name: Install dependencies
23-
command: |
24-
npm ci
25-
- run:
26-
name: List dependency versions
27-
command: |
28-
echo "npm: $(npm --version)"
29-
echo "node: $(node --version)"
30-
npm ls || true
18+
name: set up build environment
19+
command: .circleci/env_build.sh
3120
- run:
3221
name: Pretest
3322
command: |
@@ -51,7 +40,7 @@ jobs:
5140
at: ~/
5241
- run:
5342
name: Run jasmine tests (part A)
54-
command: ./.circleci/test.sh no-gl-jasmine
43+
command: .circleci/test.sh no-gl-jasmine
5544

5645
webgl-jasmine:
5746
docker:
@@ -64,7 +53,7 @@ jobs:
6453
at: ~/
6554
- run:
6655
name: Run jasmine tests (part B)
67-
command: ./.circleci/test.sh webgl-jasmine
56+
command: .circleci/test.sh webgl-jasmine
6857

6958
flaky-no-gl-jasmine:
7059
docker:
@@ -76,7 +65,7 @@ jobs:
7665
at: ~/
7766
- run:
7867
name: Run jasmine tests (part C)
79-
command: ./.circleci/test.sh flaky-no-gl-jasmine
68+
command: .circleci/test.sh flaky-no-gl-jasmine
8069

8170
make-baselines:
8271
parallelism: 4
@@ -87,34 +76,11 @@ jobs:
8776
- attach_workspace:
8877
at: ~/
8978
- run:
90-
name: which pip3 version
91-
command: which pip3 && pip3 --version
92-
- run:
93-
name: install kaleido v0.2.1
94-
command: python3 -m pip install kaleido==0.2.1
95-
- run:
96-
name: install plotly.io v5.0.0
97-
command: python3 -m pip install plotly==5.0.0
98-
- run:
99-
name: install liberation2 fonts
100-
command: sudo apt-get install fonts-liberation2
101-
- run:
102-
name: install OpenSans fonts
103-
command: sudo apt-get install fonts-open-sans
104-
- run:
105-
name: install NotoSansCJK fonts
106-
command: sudo apt install fonts-noto-cjk
107-
- run:
108-
name: download google fonts e.g. Dosis, GravitasOne, NotoSansMono, NotoSans, NotoSerif, Old_Standard_TT, PT_Sans_Narrow, Raleway and Roboto
109-
command: python3 ./.circleci/download_google_fonts.py
110-
- run:
111-
name: install downloaded google fonts
112-
command: |
113-
sudo cp -r .circleci/fonts/ /usr/share/
114-
sudo fc-cache -f
79+
name: install kaleido, plotly.io and required fonts
80+
command: .circleci/env_image.sh
11581
- run:
11682
name: create all png files
117-
command: ./.circleci/test.sh make-baselines
83+
command: .circleci/test.sh make-baselines
11884
- persist_to_workspace:
11985
root: ~/
12086
paths:
@@ -129,7 +95,7 @@ jobs:
12995
at: ~/
13096
- run:
13197
name: compare pixels
132-
command: ./.circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
98+
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
13399
- store_artifacts:
134100
path: build
135101
destination: /
@@ -142,14 +108,8 @@ jobs:
142108
- attach_workspace:
143109
at: ~/
144110
- run:
145-
name: which pip3 version
146-
command: which pip3 && pip3 --version
147-
- run:
148-
name: install kaleido v0.2.1
149-
command: python3 -m pip install kaleido==0.2.1
150-
- run:
151-
name: install plotly.io v5.0.0
152-
command: python3 -m pip install plotly==5.0.0
111+
name: install kaleido, plotly.io and required fonts
112+
command: .circleci/env_image.sh
153113
- run:
154114
name: install poppler-utils to have pdftops for exporting eps
155115
command: sudo apt-get install poppler-utils
@@ -198,7 +158,7 @@ jobs:
198158
at: ~/
199159
- run:
200160
name: Run syntax tests on source files
201-
command: ./.circleci/test.sh source-syntax
161+
command: .circleci/test.sh source-syntax
202162

203163
jasmine-bundle:
204164
docker:
@@ -210,15 +170,17 @@ jobs:
210170
at: ~/
211171
- run:
212172
name: Run jasmine tests (part D)
213-
command: ./.circleci/test.sh jasmine-bundle
173+
command: .circleci/test.sh jasmine-bundle
214174

215175
publish-dist:
216176
docker:
217177
- image: circleci/node:12.22.1
218178
working_directory: ~/plotly.js
219179
steps:
220-
- attach_workspace:
221-
at: ~/
180+
- checkout
181+
- run:
182+
name: set up build environment
183+
command: .circleci/env_build.sh
222184
- run:
223185
name: Build dist/
224186
command: npm run build
@@ -242,18 +204,6 @@ jobs:
242204
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
243205
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
244206
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
245-
- persist_to_workspace:
246-
root: ~/
247-
paths:
248-
- plotly.js
249-
250-
test-dist1:
251-
docker:
252-
- image: circleci/node:12.22.1
253-
working_directory: ~/plotly.js
254-
steps:
255-
- attach_workspace:
256-
at: ~/
257207
- run:
258208
name: Test plotly.min.js import using requirejs
259209
command: npm run test-requirejs
@@ -263,20 +213,9 @@ jobs:
263213
- run:
264214
name: Test certain bundles against function constructors
265215
command: npm run no-new-func
266-
267-
test-dist2:
268-
docker:
269-
- image: circleci/node:12.22.1
270-
working_directory: ~/plotly.js
271-
steps:
272-
- attach_workspace:
273-
at: ~/
274216
- run:
275217
name: Test plotly bundles against es6
276218
command: npm run no-es6-dist
277-
- run:
278-
name: Test plotly bundles againt duplicate keys
279-
command: npm run no-dup-keys
280219

281220
workflows:
282221
version: 2
@@ -313,12 +252,5 @@ workflows:
313252
- source-syntax:
314253
requires:
315254
- install-and-cibuild
316-
- publish-dist:
317-
requires:
318-
- install-and-cibuild
319-
- test-dist1:
320-
requires:
321-
- publish-dist
322-
- test-dist2:
323-
requires:
324-
- publish-dist
255+
256+
- publish-dist

.circleci/env_build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
export NODE_OPTIONS='--max-old-space-size=4096' && \
3+
echo "node version: $(node --version)" && \
4+
echo "npm version: $(npm --version)" && \
5+
npm ci && \
6+
npm ls || true

.circleci/env_image.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
3+
sudo python3 .circleci/download_google_fonts.py && \
4+
sudo cp -r .circleci/fonts/ /usr/share/ && \
5+
sudo fc-cache -f && \
6+
sudo python3 -m pip install kaleido==0.2.1 plotly==5.1.0 --progress-bar off

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [2.2.0] -- 2021-06-28
13+
14+
### Added
15+
- Legend group titles [[#5752](https://github.com/plotly/plotly.js/pull/5752)],
16+
this feature was anonymously sponsored: thank you to our sponsor!
17+
- Add half-year directive (%h) for formatting dates and improve descriptions to include extra date formatting options [[#5762](https://github.com/plotly/plotly.js/pull/5762)],
18+
this feature was anonymously sponsored: thank you to our sponsor!
19+
20+
### Changed
21+
- Modernize the process of creating baselines using [Kaleido](https://github.com/plotly/Kaleido) and improve image & other export test systems [[#5724](https://github.com/plotly/plotly.js/pull/5724)]
22+
- Centralize jsdom utility to return Plotly object in node.js test scripts and use it in generating plot-schema [[#5755](https://github.com/plotly/plotly.js/pull/5755)]
23+
- Bump turf bbox dependency to v6.4.0 [[#5747](https://github.com/plotly/plotly.js/pull/5747)]
24+
- Bump turf area dependency to v6.4.0 [[#5748](https://github.com/plotly/plotly.js/pull/5748)]
25+
26+
### Fixed
27+
- Cache values and patterns in set_convert for axes with `rangebreaks` to improve performance [[#5659](https://github.com/plotly/plotly.js/pull/5659)],
28+
with thanks to @spasovski for the contribution!
29+
- Fix fetching geojson when ES6 import is used to load the library [[#5763](https://github.com/plotly/plotly.js/pull/5763)]
30+
- Correct readme links [[#5746](https://github.com/plotly/plotly.js/pull/5746)]
31+
32+
1233
## [2.1.0] -- 2021-06-18
1334

1435
### Added

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
5555
5656
```html
5757
<head>
58-
<script src="https://cdn.plot.ly/plotly-2.1.0.min.js"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.2.0.min.js"></script>
5959
</head>
6060
<body>
6161
<div id="gd"></div>
@@ -71,8 +71,8 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7171

7272
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
7373
```html
74-
<script>
75-
import "https://cdn.plot.ly/plotly-2.1.0.min.js"
74+
<script type="module">
75+
import "https://cdn.plot.ly/plotly-2.2.0.min.js"
7676
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
7777
</script>
7878
```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8282
### Un-minified versions are also available on CDN
8383
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
8484
```html
85-
<script src="https://cdn.plot.ly/plotly-2.1.0.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.2.0.js" charset="utf-8"></script>
8686
```
8787

8888
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.4. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.

0 commit comments

Comments
 (0)