mushroom-cli 1.1.0-alpha.12 → 1.1.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mr.js +4 -4
- package/package.json +2 -2
package/mr.js
CHANGED
|
@@ -5,12 +5,12 @@ const config = require("./config.js");
|
|
|
5
5
|
const gen = require("./gen.js");
|
|
6
6
|
const help = require("./help.js");
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const pkg = require("./package.json");
|
|
9
9
|
const checkUpdate = require("./check-update");
|
|
10
10
|
|
|
11
|
-
const versionGroup =
|
|
11
|
+
const versionGroup = pkg.version.match(/([^-]+)(-(\w+).*)?/);
|
|
12
12
|
const currentDistTag = versionGroup[3] ? versionGroup[3] : "latest";
|
|
13
|
-
console.log("Mushroom CLI version " +
|
|
13
|
+
console.log("Mushroom CLI version " + pkg.version);
|
|
14
14
|
|
|
15
15
|
async function run(args) {
|
|
16
16
|
let debugMode = false;
|
|
@@ -63,7 +63,7 @@ async function run(args) {
|
|
|
63
63
|
if (checkUpdateTask !== null)
|
|
64
64
|
try {
|
|
65
65
|
var data = await checkUpdateTask;
|
|
66
|
-
if (data["dist-tags"] && data["dist-tags"][currentDistTag] && data["dist-tags"][currentDistTag] !==
|
|
66
|
+
if (data["dist-tags"] && data["dist-tags"][currentDistTag] && data["dist-tags"][currentDistTag] !== pkg.version) {
|
|
67
67
|
console.warn(`YOUR mushroom-cli VERSION IS NOT LATEST (dist-tags: ${currentDistTag}). PLEASE RUN: npm i mushroom-cli@${data["dist-tags"][currentDistTag]}`);
|
|
68
68
|
}
|
|
69
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mushroom-cli",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.13",
|
|
4
4
|
"description": "Mushroom CLI",
|
|
5
5
|
"main": "mr.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"jsdom": "^19.0.0",
|
|
21
21
|
"json5": "^2.2.1",
|
|
22
|
-
"node-fetch": "^
|
|
22
|
+
"node-fetch": "^2.6.7",
|
|
23
23
|
"open": "^8.4.0",
|
|
24
24
|
"readline-sync": "^1.4.10",
|
|
25
25
|
"targz": "^1.0.1"
|