From a67d60268b04476ca6fe7be34c629268a3a3741f Mon Sep 17 00:00:00 2001 From: Jack <5182053+phyzical@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:52:53 +0800 Subject: [PATCH 1/2] Update version-checker.js --- util/version-checker.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/util/version-checker.js b/util/version-checker.js index cc901ed..1ab5171 100644 --- a/util/version-checker.js +++ b/util/version-checker.js @@ -6,23 +6,23 @@ const checkVersion = async () => { const res = await axios.default( 'https://api.github.com/repos/SwapnilSoni1999/spotify-dl/tags' ); + const latestVersion = res.data[0].name; + const pkg = meow('', { importMeta: import.meta }).pkg; + + if (pkg.version !== latestVersion) { + console.log( + [ + '\n========Update Available========', + 'Use npm install -g spotify-dl', + 'to update the package.', + '================================\n', + ].join('\n') + ); + } } 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; - - if (pkg.version !== latestVersion) { - console.log( - [ - '\n========Update Available========', - 'Use npm install -g spotify-dl', - 'to update the package.', - '================================\n', - ].join('\n') - ); - } }; export default checkVersion; From 766a4276885f7b7dde4b48431e72ab923a81e5ce Mon Sep 17 00:00:00 2001 From: Jack <5182053+phyzical@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:53:44 +0800 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ebba79d..25cf9ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swapnilsoni1999/spotify-dl", "productName": "Spotify Downloader", - "version": "1.2.1", + "version": "1.2.2", "description": "Spotify Songs, Playlist & Album Downloader", "main": "app.js", "bin": {