Skip to content

Commit

Permalink
Merge pull request #255 from SwapnilSoni1999/bugfix/github-rate-limit
Browse files Browse the repository at this point in the history
Update version-checker.js
  • Loading branch information
phyzical authored Aug 2, 2024
2 parents 7628790 + 9bd54c0 commit 3cbe190
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@swapnilsoni1999/spotify-dl",
"productName": "Spotify Downloader",
"version": "1.2.0",
"version": "1.2.1",
"description": "Spotify Songs, Playlist & Album Downloader",
"main": "app.js",
"bin": {
Expand Down
11 changes: 8 additions & 3 deletions util/version-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import axios from 'axios';
import meow from 'meow';

const checkVersion = async () => {
const res = await axios.default(
'https://api.github.com/repos/SwapnilSoni1999/spotify-dl/tags'
);
try {
const res = await axios.default(
'https://api.github.com/repos/SwapnilSoni1999/spotify-dl/tags'
);
} catch (_e) {
console.log("Could not check current version, have checked too many times skipping");
return;
}
const latestVersion = res.data[0].name;
const pkg = meow('', { importMeta: import.meta }).pkg;

Expand Down

0 comments on commit 3cbe190

Please sign in to comment.