Giter Club home page Giter Club logo

Comments (2)

seanpoulter avatar seanpoulter commented on July 20, 2024

If I understand correctly, you're asking two questions:

  • What is the earliest version of Electron that had ChromeDriver for Mac (Darwin) ARM? (tl;dr - v11)
  • What is the earliest version supported by this repo? (tl;dr - Not sure)

I'm not sure about the repo but I can help list the versions of Electron that shipped with ChromeDriver for Mac on ARM. The electron/electron Releases include assets like chromedriver-{tag}-darwin-arm64.zip. It's pretty quick to use the GitHub gh CLI tool to use the API and look for that file. In pseudocode:

For each release starting from v29 and working backwards:
    Find the release ID by tag name
    List the assets by release ID
    And filter down to only include chromedriver-<tag>-darwin-arm64.zip

    If it doesn't include the file, break

What does that look like?

#!/bin/bash

owner=electron
repo=electron

for majorVersion in $(seq 29 -1 0); do
    tag="v${majorVersion}.0.0"

    # Get release by tag name
    # https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release-by-tag-name
    #
    # Extract the "id" field using jq.
    release_id=$( gh api "/repos/${owner}/${repo}/releases/tags/${tag}" | jq -r '.id' )

    # List release assets
    # https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#list-release-assets
    #
    # Print the assets that include chromedriver-{tag}-darwin-arm64.zip.
    if ! gh api "/repos/${owner}/${repo}/releases/${release_id}/assets" | jq -r 'map(.name) | .[]' | grep "chromedriver-${tag}-darwin-arm64.zip"; then
        break
    fi
done

This outputs the following

chromedriver-v29.0.0-darwin-arm64.zip
chromedriver-v28.0.0-darwin-arm64.zip
chromedriver-v27.0.0-darwin-arm64.zip
chromedriver-v26.0.0-darwin-arm64.zip
chromedriver-v25.0.0-darwin-arm64.zip
chromedriver-v24.0.0-darwin-arm64.zip
chromedriver-v23.0.0-darwin-arm64.zip
chromedriver-v22.0.0-darwin-arm64.zip
chromedriver-v21.0.0-darwin-arm64.zip
chromedriver-v20.0.0-darwin-arm64.zip
chromedriver-v19.0.0-darwin-arm64.zip
chromedriver-v18.0.0-darwin-arm64.zip
chromedriver-v17.0.0-darwin-arm64.zip
chromedriver-v16.0.0-darwin-arm64.zip
chromedriver-v15.0.0-darwin-arm64.zip
chromedriver-v14.0.0-darwin-arm64.zip
chromedriver-v13.0.0-darwin-arm64.zip
chromedriver-v12.0.0-darwin-arm64.zip
chromedriver-v11.0.0-darwin-arm64.zip

That makes sense. The M1 was released in November 2020 and v10 was release in late August 2020.

from chromedriver.

jgresham avatar jgresham commented on July 20, 2024

Thanks for the script and info @seanpoulter! I've made changes and upgraded electron and no longer have this issue.

from chromedriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.