Update ytjs version

This commit is contained in:
WardPearce
2025-04-26 01:28:05 +12:00
parent ac91e190ad
commit 79ff9450ad
3 changed files with 28 additions and 18 deletions
+10 -10
View File
@@ -1,12 +1,12 @@
{
"name": "materialious",
"version": "1.7.20",
"version": "1.7.21",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "materialious",
"version": "1.7.20",
"version": "1.7.21",
"hasInstallScript": true,
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
@@ -38,7 +38,7 @@
"svelte-infinite-loading": "^1.4.0",
"svelte-persisted-store": "^0.12.0",
"terser": "^5.34.1",
"youtubei.js": "^13.3.0"
"youtubei.js": "^13.4.0"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
@@ -8344,9 +8344,9 @@
}
},
"node_modules/jintr": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/jintr/-/jintr-3.3.0.tgz",
"integrity": "sha512-ZsaajJ4Hr5XR0tSPhOZOTjFhxA0qscKNSOs41NRjx7ZOGwpfdp8NKIBEUtvUPbA37JXyv1sJlgeOOZHjr3h76Q==",
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/jintr/-/jintr-3.3.1.tgz",
"integrity": "sha512-nnOzyhf0SLpbWuZ270Omwbj5LcXUkTcZkVnK8/veJXtSZOiATM5gMZMdmzN75FmTyj+NVgrGaPdH12zIJ24oIA==",
"funding": [
"https://github.com/sponsors/LuanRT"
],
@@ -14399,16 +14399,16 @@
}
},
"node_modules/youtubei.js": {
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-13.3.0.tgz",
"integrity": "sha512-tbl7rxltpgKoSsmfGUe9JqWUAzv6HFLqrOn0N85EbTn5DLt24EXrjClnXdxyr3PBARMJ3LC4vbll100a0ABsYw==",
"version": "13.4.0",
"resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-13.4.0.tgz",
"integrity": "sha512-+fmIZU/dWAjsROONrASy1REwVpy6umAPVuoNLr/4iNmZXl84LyBef0n3hrd1Vn9035EuINToGyQcBmifwUEemA==",
"funding": [
"https://github.com/sponsors/LuanRT"
],
"license": "MIT",
"dependencies": {
"@bufbuild/protobuf": "^2.0.0",
"jintr": "^3.3.0",
"jintr": "^3.3.1",
"tslib": "^2.5.0",
"undici": "^5.19.1"
}
+2 -2
View File
@@ -70,6 +70,6 @@
"svelte-infinite-loading": "^1.4.0",
"svelte-persisted-store": "^0.12.0",
"terser": "^5.34.1",
"youtubei.js": "^13.3.0"
"youtubei.js": "^13.4.0"
}
}
}
+16 -6
View File
@@ -3,15 +3,19 @@ import os
import re
from datetime import datetime
LATEST_VERSION = "1.7.21"
LATEST_VERSION = "1.7.22"
RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
WORKING_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "materialious"
)
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")
ELECTRON_PACKAGE = os.path.join(WORKING_DIR, "electron", "package.json")
ANDROID_PACKAGE = os.path.join(WORKING_DIR, "android", "app", "build.gradle")
METAINFO_FILE = os.path.join(WORKING_DIR, "electron", "materialious.metainfo.xml")
METAINFO_FILE = os.path.join(
WORKING_DIR, "electron", "materialious.metainfo.xml"
)
def package_json_update_ver(location: str) -> None:
@@ -34,9 +38,13 @@ def update_android_version() -> None:
if version_code_match and version_name_match:
version_code = int(version_code_match.group(1)) + 1
contents = re.sub(r"versionCode\s+\d+", f"versionCode {version_code}", contents)
contents = re.sub(
r'versionName\s+"[^"]+"', f'versionName "{LATEST_VERSION}"', contents
r"versionCode\s+\d+", f"versionCode {version_code}", contents
)
contents = re.sub(
r'versionName\s+"[^"]+"',
f'versionName "{LATEST_VERSION}"',
contents,
)
with open(ANDROID_PACKAGE, "w") as f_:
@@ -58,7 +66,9 @@ def update_metainfo_release() -> None:
</release>"""
# Insert the new release after the opening <releases> tag
updated_contents = re.sub(r"(<releases>\s*)", rf"\1{new_release}\n", contents)
updated_contents = re.sub(
r"(<releases>\s*)", rf"\1{new_release}\n", contents
)
with open(METAINFO_FILE, "w") as f_:
f_.write(updated_contents)