From 7f898997994e34bff7a4f2b2f81fdc7b9a8e81bf Mon Sep 17 00:00:00 2001 From: 1024x2 Date: Fri, 26 Apr 2024 14:21:38 +0100 Subject: Fix building on Node 22 --- 0001-Remove-donator-badges.patch | 2 +- 0002-Small-rebrand.patch | 2 +- 0003-Experiments-Re-add-staging-banner.patch | 2 +- ...-t-prompt-for-updates-when-on-a-local-bra.patch | 2 +- ...SP-bypass-on-stock-discord-desktop-client.patch | 2 +- 0006-Updater-Disable-auto-update-by-default.patch | 2 +- 0007-Build-Don-t-use-import-assertions.patch | 30 ++++++++++++++++++++++ 7 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 0007-Build-Don-t-use-import-assertions.patch diff --git a/0001-Remove-donator-badges.patch b/0001-Remove-donator-badges.patch index c2c84d3..e77716c 100644 --- a/0001-Remove-donator-badges.patch +++ b/0001-Remove-donator-badges.patch @@ -1,7 +1,7 @@ From e25f5674bfbfe3d6a28f8536b857c0d1b9db6a9d Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Wed, 24 Apr 2024 23:30:05 +0100 -Subject: [PATCH 1/6] Remove donator badges +Subject: [PATCH 1/7] Remove donator badges It makes a request to an API hosted by the Vencord developer, without any option to turn it off. This raises privacy concerns. diff --git a/0002-Small-rebrand.patch b/0002-Small-rebrand.patch index 614d7fe..db4c699 100644 --- a/0002-Small-rebrand.patch +++ b/0002-Small-rebrand.patch @@ -1,7 +1,7 @@ From 1488ae2e8e1b16bfe19f93d840e9c4af2827f48d Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Sat, 9 Mar 2024 07:57:26 +0000 -Subject: [PATCH 2/6] Small rebrand +Subject: [PATCH 2/7] Small rebrand There's a litevex in here! It's got my gun!!! AHHHHHHHH --- diff --git a/0003-Experiments-Re-add-staging-banner.patch b/0003-Experiments-Re-add-staging-banner.patch index 2f3d724..91a99cb 100644 --- a/0003-Experiments-Re-add-staging-banner.patch +++ b/0003-Experiments-Re-add-staging-banner.patch @@ -1,7 +1,7 @@ From 54fb224b90ddb97807dc91072769ccebacf9e426 Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Thu, 26 Oct 2023 00:48:25 +0100 -Subject: [PATCH 3/6] Experiments: Re-add staging banner +Subject: [PATCH 3/7] Experiments: Re-add staging banner (it's funny) --- diff --git a/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch b/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch index 62fc818..3a03aa7 100644 --- a/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch +++ b/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch @@ -1,7 +1,7 @@ From 7aa6223d4b8a9a9c2e5329e5196a6a0cd23e1097 Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Sat, 9 Mar 2024 08:00:55 +0000 -Subject: [PATCH 4/6] Updater: don't prompt for updates when on a local branch +Subject: [PATCH 4/7] Updater: don't prompt for updates when on a local branch --- src/main/updater/git.ts | 7 +------ diff --git a/0005-Enable-CSP-bypass-on-stock-discord-desktop-client.patch b/0005-Enable-CSP-bypass-on-stock-discord-desktop-client.patch index a7d079a..d8a5a94 100644 --- a/0005-Enable-CSP-bypass-on-stock-discord-desktop-client.patch +++ b/0005-Enable-CSP-bypass-on-stock-discord-desktop-client.patch @@ -1,7 +1,7 @@ From ca457c1263004f0c9347e2e830a088f93b95e824 Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Wed, 27 Dec 2023 15:05:44 +0000 -Subject: [PATCH 5/6] Enable CSP bypass on stock discord desktop client +Subject: [PATCH 5/7] Enable CSP bypass on stock discord desktop client --- src/main/index.ts | 3 ++- diff --git a/0006-Updater-Disable-auto-update-by-default.patch b/0006-Updater-Disable-auto-update-by-default.patch index f46e196..0b28abf 100644 --- a/0006-Updater-Disable-auto-update-by-default.patch +++ b/0006-Updater-Disable-auto-update-by-default.patch @@ -1,7 +1,7 @@ From 111bf8d5fad4f9226122583239b38eb718b57b04 Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Sun, 21 Apr 2024 21:22:25 +0100 -Subject: [PATCH 6/6] Updater: Disable auto-update by default +Subject: [PATCH 6/7] Updater: Disable auto-update by default --- src/api/Settings.ts | 2 +- diff --git a/0007-Build-Don-t-use-import-assertions.patch b/0007-Build-Don-t-use-import-assertions.patch new file mode 100644 index 0000000..6e43e48 --- /dev/null +++ b/0007-Build-Don-t-use-import-assertions.patch @@ -0,0 +1,30 @@ +From 88417678f3b38b3f2af056f2a34f9c6eb99d591f Mon Sep 17 00:00:00 2001 +From: 1024x2 <2pow11@gmail.com> +Date: Fri, 26 Apr 2024 13:56:19 +0100 +Subject: [PATCH 7/7] Build: Don't use import assertions + +Node.js 22 removed the "assert" syntax because we obviously can't keep +things working for more than 5 minutes. +We can just call readFileSync instead, which works on all currently +supported Node.js versions. +--- + scripts/build/common.mjs | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs +index 5c34ad0..ff9b854 100644 +--- a/scripts/build/common.mjs ++++ b/scripts/build/common.mjs +@@ -25,8 +25,7 @@ import { access, readdir, readFile } from "fs/promises"; + import { join, relative } from "path"; + import { promisify } from "util"; + +-// wtf is this assert syntax +-import PackageJSON from "../../package.json" assert { type: "json" }; ++const PackageJSON = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf-8")); + import { getPluginTarget } from "../utils.mjs"; + + export const VERSION = PackageJSON.version; +-- +2.44.0 + -- cgit v1.2.3