@nevermorelove/ompp 0.3.1 → 0.3.2
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/ompp.js +5 -7
- package/package.json +1 -1
package/ompp.js
CHANGED
|
@@ -64,16 +64,14 @@ function isNewerVersion(current, latest) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function printUpdateBanner(current, latest) {
|
|
67
|
-
const line = `Update available! ${current}
|
|
67
|
+
const line = `Update available! ${current} -> ${latest}`;
|
|
68
68
|
const hint = `Run "npm i -g @nevermorelove/ompp" to update`;
|
|
69
|
-
const
|
|
70
|
-
const pad = (s) => "
|
|
71
|
-
console.error("┌" + "─".repeat(
|
|
72
|
-
console.error("│" + " ".repeat(width) + "│");
|
|
69
|
+
const inner = Math.max(line.length, hint.length) + 2;
|
|
70
|
+
const pad = (s) => " " + s + " ".repeat(inner - 1 - s.length);
|
|
71
|
+
console.error("┌" + "─".repeat(inner) + "┐");
|
|
73
72
|
console.error("│" + pad(line) + "│");
|
|
74
73
|
console.error("│" + pad(hint) + "│");
|
|
75
|
-
console.error("
|
|
76
|
-
console.error("└" + "─".repeat(width) + "┘");
|
|
74
|
+
console.error("└" + "─".repeat(inner) + "┘");
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
async function checkForUpdate() {
|