diff --git a/.circleci/config.yml b/.circleci/config.yml index 0d7242171ea..b5d94298735 100644 --- a/.circleci/config.yml +++ b/.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/devtools/regl_codegen/devtools.js b/devtools/regl_codegen/devtools.js index c1c8cf8c345..d1747965c8a 100644 --- a/devtools/regl_codegen/devtools.js +++ b/devtools/regl_codegen/devtools.js @@ -158,5 +158,3 @@ function handleOnLoad() { window.close(); }); } - -module.exports = Tabs; diff --git a/devtools/test_dashboard/devtools.js b/devtools/test_dashboard/devtools.js index 6a779e9656e..39b5bc38400 100644 --- a/devtools/test_dashboard/devtools.js +++ b/devtools/test_dashboard/devtools.js @@ -77,7 +77,7 @@ var Tabs = { }; }, - // Save a png snapshot and display it below the plot + // Save a PNG snapshot and display it below the plot snapshot: function(id) { var gd = Tabs.getGraph(id); @@ -269,4 +269,3 @@ function handleOnLoad() { plotFromHash(); } -module.exports = Tabs; diff --git a/devtools/test_dashboard/index-mathjax3.html b/devtools/test_dashboard/index-mathjax3.html index c2365f1bd12..510e839fa7f 100644 --- a/devtools/test_dashboard/index-mathjax3.html +++ b/devtools/test_dashboard/index-mathjax3.html @@ -37,7 +37,7 @@