easyorders 0.1.10 → 0.1.14

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.
Files changed (2) hide show
  1. package/dist/bin/cli.js +3 -3
  2. package/package.json +1 -1
package/dist/bin/cli.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import "dotenv/config";
3
- import readline from "node:readline";
3
+ import { spawn } from "node:child_process";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
- import { spawn } from "node:child_process";
6
+ import readline from "node:readline";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { getCliVersion } from "../server/api.js";
9
9
  const __filename = fileURLToPath(import.meta.url);
@@ -172,7 +172,7 @@ async function checkForUpdates() {
172
172
  const localVersion = JSON.parse(fs.readFileSync(pkgPath, "utf-8")).version;
173
173
  try {
174
174
  const latestVersion = await getCliVersion();
175
- if (latestVersion !== localVersion) {
175
+ if (latestVersion.localeCompare(localVersion, undefined, { numeric: true }) > 0) {
176
176
  console.log("");
177
177
  console.log(` ${YELLOW}${BOLD}⚠ Update available!${RESET} ${DIM}${localVersion}${RESET} → ${GREEN}${BOLD}${latestVersion}${RESET}`);
178
178
  console.log(` ${DIM}Run${RESET} ${CYAN}npm install -g easyorders@latest${RESET} ${DIM}to update.${RESET}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyorders",
3
- "version": "0.1.10",
3
+ "version": "0.1.14",
4
4
  "description": "CLI tool for creating and developing Easy Orders themes",
5
5
  "type": "module",
6
6
  "bin": {