mirror of
https://github.com/xenos1337/httptoolkit-patcher.git
synced 2026-07-15 16:20:02 +02:00
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>
This commit is contained in:
@@ -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) {
|
function compareVersions(v1, v2) {
|
||||||
const normalize = (/** @type {string} */ v) => v.replace(/^v/, "").split(".").map(Number);
|
const normalize = (/** @type {string} */ v) => v.replace(/^v/, "").split(".").map(Number);
|
||||||
const parts1 = normalize(v1);
|
const parts1 = normalize(v1);
|
||||||
@@ -133,8 +127,8 @@ async function checkForUpdates() {
|
|||||||
|
|
||||||
if (compareVersions(latestVersion, LOCAL_VERSION) > 0) {
|
if (compareVersions(latestVersion, LOCAL_VERSION) > 0) {
|
||||||
console.log(chalk.yellowBright`\n╔════════════════════════════════════════════════════════════╗`);
|
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` 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` Update: ` + chalk.cyanBright`https://github.com/${GITHUB_REPO}` + chalk.white` ` + chalk.yellowBright`║`);
|
||||||
console.log(chalk.yellowBright`╚════════════════════════════════════════════════════════════╝\n`);
|
console.log(chalk.yellowBright`╚════════════════════════════════════════════════════════════╝\n`);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "httptoolkit-patcher",
|
"name": "httptoolkit-patcher",
|
||||||
"version": "2.0.5",
|
"version": "2.0.8",
|
||||||
"description": "HTTP Toolkit Pro Patcher",
|
"description": "HTTP Toolkit Pro Patcher",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": "index.js",
|
"bin": "index.js",
|
||||||
|
"author": "xenos1337",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js",
|
"start": "node index.js",
|
||||||
"patch": "node index.js patch",
|
"patch": "node index.js patch",
|
||||||
|
|||||||
Reference in New Issue
Block a user