From ab5a1150842030bdea08dfa8043ec9b9c0cd3c77 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 2 Nov 2023 13:38:39 +0800 Subject: [PATCH] Replace semver with compare-versions Also, semver wasn't even in package.json, it worked because a lot of deps use it --- package-lock.json | 11 +++++++++++ package.json | 1 + src/utils/supports.js | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index f0547e11..80bb36af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@justinribeiro/lite-youtube": "~1.5.0", "@szhsin/react-menu": "~4.1.0", "@uidotdev/usehooks": "~2.4.1", + "compare-versions": "~6.1.0", "dayjs": "~1.11.10", "dayjs-twitter": "~0.5.0", "fast-blurhash": "~1.1.2", @@ -3870,6 +3871,11 @@ "node": ">=4.0.0" } }, + "node_modules/compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -10185,6 +10191,11 @@ "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true }, + "compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", diff --git a/package.json b/package.json index 8906965a..0d26897a 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@justinribeiro/lite-youtube": "~1.5.0", "@szhsin/react-menu": "~4.1.0", "@uidotdev/usehooks": "~2.4.1", + "compare-versions": "~6.1.0", "dayjs": "~1.11.10", "dayjs-twitter": "~0.5.0", "fast-blurhash": "~1.1.2", diff --git a/src/utils/supports.js b/src/utils/supports.js index 5f7e8163..02b1a496 100644 --- a/src/utils/supports.js +++ b/src/utils/supports.js @@ -1,4 +1,4 @@ -import { satisfies } from 'semver'; +import { satisfies } from 'compare-versions'; import features from '../data/features.json';