We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 96a3ced + bff5c8b commit 5730c19Copy full SHA for 5730c19
commands/core/version.js
@@ -0,0 +1,19 @@
1
+export async function getLatestVersion() {
2
+ try {
3
+ const latestVersion = "0.1.0";
4
+ console.log(latestVersion);
5
+ return latestVersion;
6
+ } catch (error) {
7
+ console.error(`Error while retrieving the latest version. No release found.\n ${error}`);
8
+ }
9
+}
10
+
11
+export function checkVersion(currentVersion) {
12
+ getLatestVersion().then((latestVersion) => {
13
+ if (currentVersion < latestVersion) {
14
+ console.log(`A new update is available: ${latestVersion}`);
15
+ } else {
16
+ console.log(`You have the latest version of the code.`);
17
18
+ });
19
0 commit comments