From 61b3bdeb5e67eaeab0a9587c0fa83b87c2ae26de Mon Sep 17 00:00:00 2001 From: xenos <66328734+xenos1337@users.noreply.github.com> Date: Sat, 29 Nov 2025 00:08:02 +0100 Subject: [PATCH] chore(version): update version to 2.0.8 and add author information in package.json; remove unused version comparison documentation in index.js Signed-off-by: xenos <66328734+xenos1337@users.noreply.github.com> --- index.js | 10 ++-------- package.json | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index b25950f..ff0c6ac 100644 --- a/index.js +++ b/index.js @@ -96,12 +96,6 @@ function fetchJson(url) { }); } -/** - * Compare two semver version strings - * @param {string} v1 - * @param {string} v2 - * @returns {number} 1 if v1 > v2, -1 if v1 < v2, 0 if equal - */ function compareVersions(v1, v2) { const normalize = (/** @type {string} */ v) => v.replace(/^v/, "").split(".").map(Number); const parts1 = normalize(v1); @@ -133,8 +127,8 @@ async function checkForUpdates() { if (compareVersions(latestVersion, LOCAL_VERSION) > 0) { console.log(chalk.yellowBright`\n╔════════════════════════════════════════════════════════════╗`); - console.log(chalk.yellowBright`║` + chalk.white` A new version is available: ` + chalk.greenBright`v${latestVersion}` + chalk.white` (current: ` + chalk.gray`v${LOCAL_VERSION}` + chalk.white`) ` + chalk.yellowBright`║`); - console.log(chalk.yellowBright`║` + chalk.white` Update: ` + chalk.cyanBright`https://github.com/${GITHUB_REPO}` + chalk.white` ` + chalk.yellowBright`║`); + console.log(chalk.yellowBright`║` + chalk.white` A new version is available: ` + chalk.greenBright`v${latestVersion}` + chalk.white` (current: ` + chalk.gray`v${LOCAL_VERSION}` + chalk.white`) ` + chalk.yellowBright` ║`); + console.log(chalk.yellowBright`║` + chalk.white` Update: ` + chalk.cyanBright`https://github.com/${GITHUB_REPO}` + chalk.white` ` + chalk.yellowBright`║`); console.log(chalk.yellowBright`╚════════════════════════════════════════════════════════════╝\n`); } } catch (e) { diff --git a/package.json b/package.json index 73d2c7d..158b3ad 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "httptoolkit-patcher", - "version": "2.0.5", + "version": "2.0.8", "description": "HTTP Toolkit Pro Patcher", "main": "index.js", "type": "module", "bin": "index.js", + "author": "xenos1337", "scripts": { "start": "node index.js", "patch": "node index.js patch",