Skip to content

Commit

Permalink
chore: use GitHub API for Java version determination logic (#1535)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Sep 26, 2024
1 parent faa4b5b commit a471655
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ async function getVersionForLanguageBinding(lang) {
return npmData['dist-tags'].latest;

case 'java':
const mavenResponse = await fetch('https://search.maven.org/solrsearch/select?q=g:com.microsoft.playwright+AND+a:playwright&rows=1&wt=json');
const mavenData = await mavenResponse.json();
return mavenData.response.docs[0].latestVersion;
const githubResponse = await fetch('https://api.github.com/repos/microsoft/playwright-java/releases');
const githubData = await githubResponse.json();
return githubData[0].tag_name;

case 'python':
const pypiResponse = await fetch('https://pypi.org/pypi/playwright/json');
Expand Down

0 comments on commit a471655

Please sign in to comment.