diff --git a/.circleci/config.yml b/.circleci/config.yml index 008e8c1bea5..b5d94298735 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - browser-tools: circleci/browser-tools@1.4.8 + browser-tools: circleci/browser-tools@1.5.1 # Inspired by: # https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml @@ -44,7 +44,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -83,7 +83,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -105,7 +105,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -127,7 +127,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -168,7 +168,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -189,7 +189,7 @@ jobs: install-firefox: false install-geckodriver: false install-chrome: true - chrome-version: "127.0.6533.119" + chrome-version: "132.0.6834.110" - attach_workspace: at: ~/ - run: @@ -407,7 +407,7 @@ jobs: name: Run syntax tests on source files command: .circleci/test.sh source-syntax - publish-dist: + publish-dist: &publish-dist docker: - image: cimg/node:18.20.4 working_directory: ~/plotly.js @@ -465,6 +465,11 @@ jobs: name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff") command: diff --unified --color dist/plot-schema.json test/plot-schema.json + publish-dist-node-v22: + <<: *publish-dist + docker: + - image: cimg/node:22.14.0 + test-stackgl-bundle: docker: - image: cimg/node:18.20.4 @@ -552,4 +557,6 @@ workflows: - publish-dist + - publish-dist-node-v22 + - test-stackgl-bundle diff --git a/.circleci/download_google_fonts.py b/.circleci/download_google_fonts.py index 6a2a55816ce..8dc9dd7daa6 100644 --- a/.circleci/download_google_fonts.py +++ b/.circleci/download_google_fonts.py @@ -1,90 +1,82 @@ +import os + import requests -dirOut = '.circleci/fonts/truetype/googleFonts/' +dir_out = ".circleci/fonts/truetype/googleFonts/" + + +def download(repo, family, types, overwrite=True): + for t in types: + name = family + t + ".ttf" + url = repo + name + "?raw=true" + out_file = dir_out + name + print("Getting: ", url) + if os.path.exists(out_file) and not overwrite: + print(" => Already exists: ", out_file) + continue + req = requests.get(url, allow_redirects=False) + if req.status_code != 200: + # If we get a redirect, print an error so that we know to update the URL + if req.status_code == 302 or req.status_code == 301: + new_url = req.headers.get("Location") + print(f" => Redirected -- please update URL to: {new_url}") + raise RuntimeError(f""" +Download failed. +Status code: {req.status_code} +Message: {req.reason} +""") + open(out_file, "wb").write(req.content) -def download(repo, family, types) : - for t in types : - name = family + t + '.ttf' - url = repo + name + '?raw=true' - print(url) - req = requests.get(url, allow_redirects=True) - open(dirOut + name, 'wb').write(req.content) download( - 'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/', - 'NotoSansMono', - [ - '-Regular', - '-Bold' - ] + "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMono/hinted/ttf/", + "NotoSansMono", + ["-Regular", "-Bold"], ) download( - 'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/', - 'NotoSans', - [ - '-Regular', - '-Italic', - '-Bold' - ] + "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/hinted/ttf/", + "NotoSans", + ["-Regular", "-Italic", "-Bold"], ) download( - 'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/', - 'NotoSerif', + "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSerif/hinted/ttf/", + "NotoSerif", [ - '-Regular', - '-Italic', - '-Bold', - '-BoldItalic', - ] + "-Regular", + "-Italic", + "-Bold", + "-BoldItalic", + ], ) download( - 'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/', - 'OldStandard', - [ - '-Regular', - '-Italic', - '-Bold' - ] + "https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/oldstandardtt/", + "OldStandard", + ["-Regular", "-Italic", "-Bold"], ) download( - 'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/', - 'PT_Sans-Narrow-Web', - [ - '-Regular', - '-Bold' - ] + "https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/ptsansnarrow/", + "PT_Sans-Narrow-Web", + ["-Regular", "-Bold"], ) download( - 'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/', - 'Raleway', - [ - '-Regular', - '-Regular-Italic', - '-Bold', - '-Bold-Italic' - ] + "https://raw.githubusercontent.com/impallari/Raleway/refs/heads/master/fonts/v3.000%20Fontlab/TTF/", + "Raleway", + ["-Regular", "-Regular-Italic", "-Bold", "-Bold-Italic"], ) download( - 'https://github.com/googlefonts/roboto/blob/main/src/hinted/', - 'Roboto', - [ - '-Regular', - '-Italic', - '-Bold', - '-BoldItalic' - ] + "https://raw.githubusercontent.com/googlefonts/roboto-2/refs/heads/main/src/hinted/", + "Roboto", + ["-Regular", "-Italic", "-Bold", "-BoldItalic"], ) download( - 'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/', - 'GravitasOne', - [ - '_400Regular' - ] + "https://raw.githubusercontent.com/expo/google-fonts/refs/heads/main/font-packages/gravitas-one/400Regular/", + "GravitasOne", + ["_400Regular"], ) diff --git a/.circleci/env_image.sh b/.circleci/env_image.sh index 4b684aa1599..47b5d530545 100755 --- a/.circleci/env_image.sh +++ b/.circleci/env_image.sh @@ -1,9 +1,10 @@ #!/bin/sh +set -e # install required fonts -sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \ -sudo python3 .circleci/download_google_fonts.py && \ -sudo cp -r .circleci/fonts/ /usr/share/ && \ -sudo fc-cache -f && \ +sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji +sudo python3 .circleci/download_google_fonts.py +sudo cp -r .circleci/fonts/ /usr/share/ +sudo fc-cache -f # install kaleido & plotly sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off # install numpy i.e. to convert arrays to typed arrays diff --git a/.circleci/fonts/truetype/googleFonts/.gitignore b/.circleci/fonts/truetype/googleFonts/.gitignore deleted file mode 100644 index 72e8ffc0db8..00000000000 --- a/.circleci/fonts/truetype/googleFonts/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/.circleci/fonts/truetype/googleFonts/GravitasOne_400Regular.ttf b/.circleci/fonts/truetype/googleFonts/GravitasOne_400Regular.ttf new file mode 100644 index 00000000000..f964cf264fa Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/GravitasOne_400Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSans-Bold.ttf b/.circleci/fonts/truetype/googleFonts/NotoSans-Bold.ttf new file mode 100644 index 00000000000..aae7546dc19 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSans-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSans-Italic.ttf b/.circleci/fonts/truetype/googleFonts/NotoSans-Italic.ttf new file mode 100644 index 00000000000..7f531333438 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSans-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSans-Regular.ttf b/.circleci/fonts/truetype/googleFonts/NotoSans-Regular.ttf new file mode 100644 index 00000000000..f27f4ff5956 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSans-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSansMono-Bold.ttf b/.circleci/fonts/truetype/googleFonts/NotoSansMono-Bold.ttf new file mode 100644 index 00000000000..9218a79c0cd Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSansMono-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSansMono-Regular.ttf b/.circleci/fonts/truetype/googleFonts/NotoSansMono-Regular.ttf new file mode 100644 index 00000000000..159ca4b1d4f Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSansMono-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSerif-Bold.ttf b/.circleci/fonts/truetype/googleFonts/NotoSerif-Bold.ttf new file mode 100644 index 00000000000..352b8073581 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSerif-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSerif-BoldItalic.ttf b/.circleci/fonts/truetype/googleFonts/NotoSerif-BoldItalic.ttf new file mode 100644 index 00000000000..f0fbb6fb9d6 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSerif-BoldItalic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSerif-Italic.ttf b/.circleci/fonts/truetype/googleFonts/NotoSerif-Italic.ttf new file mode 100644 index 00000000000..ee42fc10ee9 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSerif-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/NotoSerif-Regular.ttf b/.circleci/fonts/truetype/googleFonts/NotoSerif-Regular.ttf new file mode 100644 index 00000000000..123a8c5763e Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/NotoSerif-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/OldStandard-Bold.ttf b/.circleci/fonts/truetype/googleFonts/OldStandard-Bold.ttf new file mode 100644 index 00000000000..4e138db49ea Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/OldStandard-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/OldStandard-Italic.ttf b/.circleci/fonts/truetype/googleFonts/OldStandard-Italic.ttf new file mode 100644 index 00000000000..c6bd25f9dd0 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/OldStandard-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/OldStandard-Regular.ttf b/.circleci/fonts/truetype/googleFonts/OldStandard-Regular.ttf new file mode 100644 index 00000000000..655abd75073 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/OldStandard-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Bold.ttf b/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Bold.ttf new file mode 100644 index 00000000000..f0e2068a03c Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Regular.ttf b/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Regular.ttf new file mode 100644 index 00000000000..b881447b368 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/PT_Sans-Narrow-Web-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Raleway-Bold-Italic.ttf b/.circleci/fonts/truetype/googleFonts/Raleway-Bold-Italic.ttf new file mode 100644 index 00000000000..1d1c6dd6cfe Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Raleway-Bold-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Raleway-Bold.ttf b/.circleci/fonts/truetype/googleFonts/Raleway-Bold.ttf new file mode 100644 index 00000000000..7aa37f014fe Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Raleway-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Raleway-Regular-Italic.ttf b/.circleci/fonts/truetype/googleFonts/Raleway-Regular-Italic.ttf new file mode 100644 index 00000000000..e46ac30ba02 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Raleway-Regular-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Raleway-Regular.ttf b/.circleci/fonts/truetype/googleFonts/Raleway-Regular.ttf new file mode 100644 index 00000000000..c6ec2f0ac1a Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Raleway-Regular.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Roboto-Bold.ttf b/.circleci/fonts/truetype/googleFonts/Roboto-Bold.ttf new file mode 100644 index 00000000000..8869666f245 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Roboto-Bold.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Roboto-BoldItalic.ttf b/.circleci/fonts/truetype/googleFonts/Roboto-BoldItalic.ttf new file mode 100644 index 00000000000..f7f845aea4b Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Roboto-BoldItalic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Roboto-Italic.ttf b/.circleci/fonts/truetype/googleFonts/Roboto-Italic.ttf new file mode 100644 index 00000000000..a76d286d56f Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Roboto-Italic.ttf differ diff --git a/.circleci/fonts/truetype/googleFonts/Roboto-Regular.ttf b/.circleci/fonts/truetype/googleFonts/Roboto-Regular.ttf new file mode 100644 index 00000000000..ddee473e020 Binary files /dev/null and b/.circleci/fonts/truetype/googleFonts/Roboto-Regular.ttf differ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..22fa58233a8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: No CI Test + +on: push + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: browser-actions/setup-chrome@v1 + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: chrome --version + - run: ls + - run: npm run pretest + - run: npm ci + - run: npm run cibuild + - name: Run headless test + uses: coactions/setup-xvfb@v1 + with: + run: ./tasks/noci_test.sh jasmine diff --git a/CHANGELOG.md b/CHANGELOG.md index 464e8626b3d..c9c320f9820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ To see all merged commits on the master branch that will be part of the next plo where X.Y.Z is the semver of most recent plotly.js release. +## [3.0.1] -- 2025-02-18 + +### Changed +- Update `color-rgba` from 2.1.1 to 3.0.0 to fix hsl color conversion bug [[#7325](https://github.com/plotly/plotly.js/pull/7325)] + +### Fixed +- Fix click event handling for plots in shadow DOM elements [[#7357](https://github.com/plotly/plotly.js/pull/7357)] +- Fix hoverlabels and other text labels with null values templated in [[#7360](https://github.com/plotly/plotly.js/pull/7360)] +- Fix importing plotly.js via require on pages with [AMD](https://en.wikipedia.org/wiki/Asynchronous_module_definition) [[#7367](https://github.com/plotly/plotly.js/pull/7367)] +- Update Romanian locale [[#7351](https://github.com/plotly/plotly.js/pull/7351)] +- Update Italian locale [[#4425](https://github.com/plotly/plotly.js/pull/4425)] +- Update Turkish locale [[#7352](https://github.com/plotly/plotly.js/pull/7352)] + ## [3.0.0] -- 2025-01-27 ### Removed diff --git a/CITATION.cff b/CITATION.cff index 9e3a8874b66..1ce46b78c4f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,7 +9,7 @@ authors: - family-names: "Samimi" given-names: "Mojtaba" title: "Open source Plotly charting library" -version: 3.0.0 +version: 3.0.1 doi: 10.5281/zenodo.13964707 date-released: 2025-01-27 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index fec8e4f68cc..ac93d04e6bf 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo ```html
- + @@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag. ```html ``` @@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more at