Skip to content

Commit

Permalink
Merge pull request SwapnilSoni1999#255 from SwapnilSoni1999/bugfix/gi…
Browse files Browse the repository at this point in the history
…thub-rate-limit

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

2 comments on commit 3cbe190

@Hx-Regex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phyzical i think you called res outside the try/catch its causing a prolbem

@phyzical
Copy link
Owner Author

@phyzical phyzical commented on 3cbe190 Aug 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry brain was in the wrong language >< thats what i get for editing via mobile, should be fixed now

Please sign in to comment.