Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Webpack): Immediate finds using waitFor and complete rewrite of module patching #2409

Open
wants to merge 835 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
835 commits
Select commit Hold shift + click to select a range
3f059e1
Merge branch 'dev' into immediate-finds
Nuckyz Jun 29, 2024
c1b4eb5
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jun 29, 2024
a04ccd0
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jun 29, 2024
ea859f5
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jun 29, 2024
cc536bd
Merge branch 'dev' into immediate-finds
Nuckyz Jul 2, 2024
1297408
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 2, 2024
a985286
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 2, 2024
614cbc1
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 2, 2024
b333deb
improve settings ui (again)
Vendicated Jul 1, 2024
bc34d72
Support regex in webpack finds
Nuckyz Jul 2, 2024
3331ed2
forgot this
Nuckyz Jul 2, 2024
c7e4967
Merge branch 'dev' into immediate-finds
Nuckyz Jul 2, 2024
771d51b
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 2, 2024
d90bcdb
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 2, 2024
99e21ad
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 2, 2024
a95037d
cleanup
Nuckyz Jul 2, 2024
3005798
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 2, 2024
b5fdb43
Merge branch 'dev' into immediate-finds
Nuckyz Jul 3, 2024
f6147c6
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 3, 2024
8abb68c
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
0d0c63f
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
2506ba1
feat(plugins): ConsoleJanitor (#2659)
Nuckyz Jul 3, 2024
b3ab321
Merge branch 'dev' into immediate-finds
Nuckyz Jul 3, 2024
e0cb724
Merge branch 'dev' into immediate-finds
Nuckyz Jul 3, 2024
208882e
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 3, 2024
edba931
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
c784bc5
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
ea6fccb
fix setting parsed regex as filter logging props
Nuckyz Jul 3, 2024
4e09e34
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
b377cad
fix reporter trying to JSON.stringify regex
Nuckyz Jul 3, 2024
2a1684d
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 3, 2024
8c19794
Add patch timings testing to reporter
Nuckyz Jul 5, 2024
dd25044
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 5, 2024
aa29e47
Merge branch 'dev' into immediate-finds
Nuckyz Jul 5, 2024
24795ba
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 5, 2024
65013f0
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 5, 2024
763b24a
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 5, 2024
438b3e0
Merge branch 'dev' into immediate-finds
Nuckyz Jul 7, 2024
920fb20
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 7, 2024
ddd5d9e
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 7, 2024
021baa5
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 7, 2024
c835657
crazy
Nuckyz Jul 7, 2024
cce8f14
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 7, 2024
fde823f
Merge branch 'dev' into immediate-finds
Nuckyz Jul 10, 2024
4389b78
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 10, 2024
710f627
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 10, 2024
42c4845
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 10, 2024
aa35602
Merge branch 'dev' into immediate-finds
Nuckyz Jul 11, 2024
8159937
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 11, 2024
293b90a
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 11, 2024
104f193
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 11, 2024
56477d4
Fix testing factory filters on non factories
Nuckyz Jul 11, 2024
6213fca
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 11, 2024
6ffa969
Merge branch 'dev' into immediate-finds
Nuckyz Jul 12, 2024
3edc36d
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 12, 2024
0506505
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 12, 2024
8bf98be
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 12, 2024
2b99f4e
Merge branch 'dev' into immediate-finds
Nuckyz Jul 14, 2024
187ece1
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 14, 2024
e35d0f6
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 14, 2024
3f5491d
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 14, 2024
62d4add
Merge branch 'dev' into immediate-finds
Nuckyz Jul 15, 2024
bd25e0c
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 15, 2024
2fb616e
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 15, 2024
70df451
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 15, 2024
fb3ae98
Merge branch 'dev' into immediate-finds
Nuckyz Jul 15, 2024
d869b2d
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 15, 2024
3bc71c6
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 15, 2024
27fd143
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 15, 2024
974953b
Fix mapMangledModule for primitives
Nuckyz Jul 17, 2024
81a1822
Merge branch 'dev' into immediate-finds
Nuckyz Jul 17, 2024
9dadde6
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 17, 2024
5462bb1
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 17, 2024
d58d8ae
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 17, 2024
8fa1965
fix grammar
Nuckyz Jul 17, 2024
e9328ca
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 17, 2024
a3612dd
Merge branch 'dev' into immediate-finds
Nuckyz Jul 17, 2024
e57c993
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 17, 2024
09447d5
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 17, 2024
efd48e0
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 17, 2024
654a271
eeee
Nuckyz Jul 19, 2024
01bd414
FriendsSince: Fix broken patch
Nuckyz Jul 19, 2024
cd3534f
Merge branch 'dev' into immediate-finds
Nuckyz Jul 19, 2024
dc116fc
Merge branch 'dev' into modules-proxy-patches
Nuckyz Jul 19, 2024
2df13a2
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 19, 2024
5f7c44f
Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
Nuckyz Jul 19, 2024
4235337
mapMangledModule: Properly support component finds
Nuckyz Jul 20, 2024
129b770
fixes
Nuckyz Jul 20, 2024
9fd1682
oops
Nuckyz Jul 20, 2024
15a3694
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 20, 2024
be6209e
why is this still here
Nuckyz Jul 20, 2024
f676613
Merge branch 'immediate-finds' into immediate-finds-modules-proxy
Nuckyz Jul 20, 2024
465dd15
boop (please work I cant test)
Nuckyz Jul 24, 2024
fb394c6
it didnt
Nuckyz Jul 24, 2024
1f20074
🧹🧹🧹
Nuckyz Jul 24, 2024
75a8098
I love not having a linter
Nuckyz Jul 24, 2024
9e6f24c
work
Nuckyz Jul 24, 2024
026e716
aaaaa
Nuckyz Jul 24, 2024
1905aa0
e
Nuckyz Jul 26, 2024
4a590d3
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 2, 2024
633a845
fix lint
Nuckyz Aug 2, 2024
6bdd0ba
L overload react
Nuckyz Aug 2, 2024
ca3768c
🧹🧹🧹🧹🧹🧹
Nuckyz Aug 2, 2024
4d03a69
Fix broken patches
Nuckyz Aug 3, 2024
4bcefb7
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 3, 2024
e24bdc2
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 3, 2024
76f8b0e
Make getUserSetting not return undefined
Nuckyz Aug 3, 2024
ed32b79
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 3, 2024
4677ac7
Add findComponentByFields and filters.componentByFilter
Nuckyz Aug 3, 2024
e801c71
Add back top level destructuring for backwards compabitlity
Nuckyz Aug 3, 2024
64e1f29
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 3, 2024
1f1e3e8
rename find
Nuckyz Aug 3, 2024
2429c28
this should be webpackDependantLazy
Nuckyz Aug 3, 2024
eeb4d26
forgot this
Nuckyz Aug 3, 2024
4d88a13
clean
Nuckyz Aug 3, 2024
45a876a
more fixes
Nuckyz Aug 3, 2024
f9c11a1
unexplode console shortcuts
Nuckyz Aug 3, 2024
c183018
fix logged in dependant find
Nuckyz Aug 3, 2024
f05d462
last one
Nuckyz Aug 3, 2024
b22d462
for real now
Nuckyz Aug 3, 2024
9871e16
fix error spam in non app discord websites
Nuckyz Aug 3, 2024
f398a1c
fix breaking settings :sob:
Nuckyz Aug 4, 2024
473109b
idk anymore
Nuckyz Aug 5, 2024
44785d3
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 11, 2024
a8f77a1
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 13, 2024
3f0d915
NoTrack: Fix on encoded assets
Nuckyz Aug 14, 2024
18c5ca2
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 14, 2024
f9776ce
NoTrack: Fix another issue related to proxies
Nuckyz Aug 14, 2024
6cc2f53
Merge branch 'dev2' into immediate-finds-modules-proxy
Nuckyz Aug 17, 2024
50bb6d8
Add $$vencordPatchedSource
Nuckyz Aug 18, 2024
93d450a
Make it dev only
Nuckyz Aug 18, 2024
22a81ab
Merge branch 'dev2' into immediate-finds-modules-proxy
Nuckyz Aug 18, 2024
e8f017b
bruh
Nuckyz Aug 18, 2024
cfbe4af
Merge branch 'dev2' into immediate-finds-modules-proxy
Nuckyz Aug 18, 2024
84c78a4
Deprecate more unused apis
Nuckyz Aug 18, 2024
0e2c0b9
Cleanup extractAndLoadChunksLazy error handling
Nuckyz Aug 18, 2024
9a48454
better like this
Nuckyz Aug 18, 2024
3546632
Remove dead workaround
Nuckyz Aug 18, 2024
5c7773c
apply suggestion and fix bug
Nuckyz Aug 18, 2024
edc87ac
fix for real now
Nuckyz Aug 18, 2024
e4bc7f2
Merge branch 'dev' into immediate-finds
Nuckyz Aug 18, 2024
e3d9b20
Fix persisting $$vencordPatchedSource when a module is loaded again
Nuckyz Aug 20, 2024
e896586
Restore with value instead of getter/setter
Nuckyz Aug 20, 2024
464dddf
Only add ifs if IS_DEV
Nuckyz Aug 20, 2024
ade9a52
Merge branch 'dev2' into immediate-finds-modules-proxy
Nuckyz Aug 20, 2024
30ef534
Make findModuleFactory reporter testable
Nuckyz Aug 20, 2024
2f806dd
of course I forgot this
Nuckyz Aug 20, 2024
301b0e7
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 22, 2024
4a9f258
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 23, 2024
b1ad0a0
Clarify loading of chunksLeft
Nuckyz Aug 23, 2024
26a71ca
minor cleanup
Nuckyz Aug 23, 2024
7d4fc5e
more cleanie
Nuckyz Aug 23, 2024
fae5f9b
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 23, 2024
13ada86
Ignore another useless error
Nuckyz Aug 23, 2024
0379beb
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 23, 2024
262319a
who cares about logging in :)
Nuckyz Aug 23, 2024
a9a8c33
token not required anymore
Nuckyz Aug 23, 2024
8bfacc1
Clarify mapMangledModule can be used for primitive values
Nuckyz Aug 24, 2024
7fcd9c3
why
Nuckyz Aug 24, 2024
96b8c4d
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 28, 2024
42238c7
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 29, 2024
687c3f8
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 30, 2024
0f277bc
Add ts-pattern as common
Nuckyz Aug 30, 2024
7238d96
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Aug 30, 2024
20b7a81
Better _cacheFind return type
Nuckyz Aug 30, 2024
4ae693b
skill issue coding
Nuckyz Aug 30, 2024
0a09ee1
Cleanup custom regex parsing
Nuckyz Aug 30, 2024
4320e60
better implementation
Nuckyz Aug 30, 2024
68d3aa9
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Sep 1, 2024
294f73f
Merge branch 'dev' into immediate-finds-modules-proxy
Nuckyz Sep 1, 2024
e810944
Merge branch 'dev' into immediate-finds
Nuckyz Sep 2, 2024
b5a271e
oops
Nuckyz Sep 2, 2024
db1a1b6
Merge branch 'dev' into immediate-finds
Nuckyz Sep 2, 2024
d922f38
Merge branch 'dev' into immediate-finds
Nuckyz Sep 2, 2024
845bfef
Merge branch 'dev' into immediate-finds
Nuckyz Sep 3, 2024
b7f2004
Merge branch 'dev' into immediate-finds
Nuckyz Sep 4, 2024
3338b38
Merge branch 'dev' into immediate-finds
Nuckyz Sep 5, 2024
af1bbe8
Merge branch 'dev' into immediate-finds
Nuckyz Sep 6, 2024
8b2e8d1
Merge branch 'dev' into immediate-finds
Nuckyz Sep 6, 2024
d56328c
Merge branch 'dev' into immediate-finds
Nuckyz Sep 6, 2024
1758eab
Merge branch 'dev' into immediate-finds
Nuckyz Sep 11, 2024
926ae50
BetterFolders: Fix pending clan applications (#2867)
sadan4 Sep 12, 2024
9605426
Merge branch 'dev' into immediate-finds
Nuckyz Sep 12, 2024
3e00d52
Merge branch 'dev' into immediate-finds
Nuckyz Sep 12, 2024
bae9f8c
UserVoiceShow: Fix for simplified profiles
Nuckyz Sep 16, 2024
bebb98d
Merge branch 'dev' into immediate-finds
Nuckyz Sep 16, 2024
8dc2133
Merge branch 'dev' into immediate-finds
Nuckyz Sep 16, 2024
a6976a8
fix wreq.n typings
Nuckyz Sep 17, 2024
dc7b3db
Merge branch 'dev' into immediate-finds
Nuckyz Sep 17, 2024
7eeaa32
oops
Nuckyz Sep 17, 2024
126f2df
Lazy components are always functions
Nuckyz Sep 18, 2024
15b7982
yes
Nuckyz Sep 18, 2024
67175b5
fix
Nuckyz Sep 18, 2024
4722851
Merge branch 'dev' into immediate-finds
Nuckyz Sep 18, 2024
a493d56
Add AnyComponentTypeWithChildren
Nuckyz Sep 18, 2024
5dbe81e
help
Nuckyz Sep 18, 2024
b1f3925
last one I promise
Nuckyz Sep 18, 2024
f9ef683
fix what I broke
Nuckyz Sep 18, 2024
2722090
lol
Nuckyz Sep 18, 2024
0953ba8
that's wrong actually
Nuckyz Sep 18, 2024
a697128
now it's right
Nuckyz Sep 18, 2024
adf7bd0
clean
Nuckyz Sep 18, 2024
356586d
I swear
Nuckyz Sep 18, 2024
a0a1aaf
I'm not gonna comment
Nuckyz Sep 18, 2024
07a9279
incredible
Nuckyz Sep 18, 2024
ddeca19
Merge branch 'dev' into immediate-finds
Nuckyz Sep 19, 2024
19c87b6
how many times?
Nuckyz Sep 19, 2024
00c9aa9
UserVoiceShow: Fix setting name
Nuckyz Sep 19, 2024
f7dfc18
Merge branch 'dev' into immediate-finds
Nuckyz Sep 19, 2024
efcd4ca
Merge branch 'dev' into immediate-finds
Nuckyz Sep 19, 2024
29f56b1
Merge branch 'dev' into immediate-finds
Nuckyz Sep 20, 2024
c2b211e
UserVoiceShow: Show in messages
Nuckyz Sep 20, 2024
bbf924d
Merge branch 'dev' into immediate-finds
Nuckyz Sep 20, 2024
10188ea
UserVoiceShow: Show in messages
Nuckyz Sep 20, 2024
72ff429
Merge branch 'dev' into immediate-finds
Nuckyz Sep 20, 2024
53cd82c
UserVoiceShow: Show in messages
Nuckyz Sep 20, 2024
ba59358
ReviewDB: Fix in panel profile (again)
Nuckyz Sep 21, 2024
3335ec1
Merge branch 'dev' into immediate-finds
Nuckyz Sep 21, 2024
3778a40
UserVoiceShow: Show in messages
Nuckyz Sep 20, 2024
2ee0989
ReviewDB: Fix in panel profile (again)
Nuckyz Sep 21, 2024
4dd2627
Merge branch 'dev' into immediate-finds
Nuckyz Sep 21, 2024
0840069
I swear
Nuckyz Sep 21, 2024
d5c77c8
UserVoiceShow: Show in messages
Nuckyz Sep 20, 2024
adf9eee
ReviewDB: Fix in panel profile (again)
Nuckyz Sep 21, 2024
e3c29c3
OpenInApp: Fix opening in spotify activity cards for web (#2894)
Masterjoona Sep 21, 2024
6c1a220
ReplaceGoogleSearch: Fix DuckDuckGo URL (#2895)
MrDiamondDog Sep 21, 2024
bece919
CopyFileContents: Add padding to button (#2848)
DokterKaj Sep 21, 2024
cf1b7e2
Merge branch 'dev' into immediate-finds
Nuckyz Sep 21, 2024
5ba21bd
Merge branch 'dev' into immediate-finds
Nuckyz Sep 21, 2024
a9db3e4
ConsoleJanitor: Ignore all loggers with whitelist (#2896)
sadan4 Sep 22, 2024
517f751
Fix plugin settings inconsistency regarding setting names (#2884)
TheGreenPig Sep 22, 2024
f61b5ae
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
2595bc6
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
10e8545
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
ced26f2
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
b952830
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
4760f13
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
2ec5a92
FullSearchContext: Re-add Copy Author ID
Nuckyz Sep 22, 2024
87e6635
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
9239afd
FullSearchContext: Re-add Copy Author ID
Nuckyz Sep 22, 2024
dabe8b9
Merge branch 'dev' into immediate-finds
Nuckyz Sep 22, 2024
1defaac
FakeNitro: Fix wrongfully allowed emojis in voice calls (#2901)
sadan4 Sep 23, 2024
b37b0d5
RoleColorEverywhere: Fix unneeded restart on setting change (#2899)
lewisakura Sep 23, 2024
8e453e5
Merge branch 'dev' into immediate-finds
Nuckyz Sep 23, 2024
3a314bf
Merge branch 'dev' into immediate-finds
Nuckyz Sep 23, 2024
7534cc5
Merge branch 'dev' into immediate-finds
Nuckyz Sep 24, 2024
4540251
Merge branch 'dev' into immediate-finds
Nuckyz Sep 26, 2024
d23a33e
Merge branch 'dev' into immediate-finds
Nuckyz Sep 26, 2024
67264cc
Merge branch 'dev' into immediate-finds
Nuckyz Sep 27, 2024
7e30481
I wonder
Nuckyz Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ export default tseslint.config(
"no-invalid-regexp": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-duplicate-imports": "error",
"dot-notation": "error",
"@typescript-eslint/dot-notation": [
"error",
{
"allowPrivateClassPropertyAccess": true,
"allowProtectedClassPropertyAccess": true
}
],
"no-useless-escape": [
"error",
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export const commonOpts = {
logLevel: "info",
bundle: true,
watch,
minify: !watch,
minify: !watch && !IS_REPORTER,
sourcemap: watch ? "inline" : "",
legalComments: "linked",
banner,
Expand Down
22 changes: 6 additions & 16 deletions scripts/generateReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { readFileSync } from "fs";
import pup, { JSHandle } from "puppeteer-core";

for (const variable of ["DISCORD_TOKEN", "CHROMIUM_BIN"]) {
for (const variable of ["CHROMIUM_BIN"]) {
if (!process.env[variable]) {
console.error(`Missing environment variable ${variable}`);
process.exit(1);
Expand All @@ -37,7 +37,8 @@ const CANARY = process.env.USE_CANARY === "true";

const browser = await pup.launch({
headless: true,
executablePath: process.env.CHROMIUM_BIN
executablePath: process.env.CHROMIUM_BIN,
args: ["--no-sandbox"]
});

const page = await browser.newPage();
Expand Down Expand Up @@ -214,7 +215,7 @@ page.on("console", async e => {

switch (tag) {
case "WebpackInterceptor:":
const patchFailMatch = message.match(/Patch by (.+?) (had no effect|errored|found no module) \(Module id is (.+?)\): (.+)/)!;
const patchFailMatch = message.match(/Patch by (.+?) (had no effect|errored|found no module|took [\d.]+?ms) \(Module id is (.+?)\): (.+)/)!;
if (!patchFailMatch) break;

console.error(await getText());
Expand All @@ -225,7 +226,7 @@ page.on("console", async e => {
plugin,
type,
id,
match: regex.replace(/\[A-Za-z_\$\]\[\\w\$\]\*/g, "\\i"),
match: regex,
error: await maybeGetError(e.args()[3])
});

Expand Down Expand Up @@ -291,28 +292,17 @@ page.on("error", e => console.error("[Error]", e.message));
page.on("pageerror", e => {
if (e.message.includes("Sentry successfully disabled")) return;

if (!e.message.startsWith("Object") && !e.message.includes("Cannot find module")) {
if (!e.message.startsWith("Object") && !e.message.includes("Cannot find module") && !/^.{1,2}$/.test(e.message)) {
console.error("[Page Error]", e.message);
report.otherErrors.push(e.message);
} else {
report.ignoredErrors.push(e.message);
}
});

async function reporterRuntime(token: string) {
Vencord.Webpack.waitFor(
"loginToken",
m => {
console.log("[PUP_DEBUG]", "Logging in with token...");
m.loginToken(token);
}
);
}

await page.evaluateOnNewDocument(`
if (location.host.endsWith("discord.com")) {
${readFileSync("./dist/browser.js", "utf-8")};
(${reporterRuntime.toString()})(${JSON.stringify(process.env.DISCORD_TOKEN)});
}
`);

Expand Down
8 changes: 4 additions & 4 deletions src/Vencord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export * as Util from "./utils";
export * as QuickCss from "./utils/quickCss";
export * as Updater from "./utils/updater";
export * as Webpack from "./webpack";
export * as WebpackPatcher from "./webpack/patchWebpack";
export { PlainSettings, Settings };

import "./utils/quickCss";
import "./webpack/patchWebpack";

import { openUpdaterModal } from "@components/VencordSettings/UpdaterTab";
import { StartAt } from "@utils/types";
Expand All @@ -39,7 +39,7 @@ import { localStorage } from "./utils/localStorage";
import { relaunch } from "./utils/native";
import { getCloudSettings, putCloudSettings } from "./utils/settingsSync";
import { checkForUpdates, update, UpdateLogger } from "./utils/updater";
import { onceReady } from "./webpack";
import { onceDiscordLoaded } from "./webpack";
import { SettingsRouter } from "./webpack/common";

if (IS_REPORTER) {
Expand Down Expand Up @@ -86,7 +86,7 @@ async function syncSettings() {
}

async function init() {
await onceReady;
await onceDiscordLoaded;
startAllPlugins(StartAt.WebpackReady);

syncSettings();
Expand Down Expand Up @@ -125,7 +125,7 @@ async function init() {
const pendingPatches = patches.filter(p => !p.all && p.predicate?.() !== false);
if (pendingPatches.length)
PMLogger.warn(
"Webpack has finished initialising, but some patches haven't been applied yet.",
"Webpack has finished initializing, but some patches haven't been applied yet.",
"This might be expected since some Modules are lazy loaded, but please verify",
"that all plugins are working as intended.",
"You are seeing this warning because this is a Development build of Vencord.",
Expand Down
5 changes: 2 additions & 3 deletions src/api/Badges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import ErrorBoundary from "@components/ErrorBoundary";
import { ComponentType, HTMLProps } from "react";

import Plugins from "~plugins";

Expand All @@ -30,7 +29,7 @@ export interface ProfileBadge {
/** The tooltip to show on hover. Required for image badges */
description?: string;
/** Custom component for the badge (tooltip not included) */
component?: ComponentType<ProfileBadge & BadgeUserArgs>;
component?: React.ComponentType<ProfileBadge & BadgeUserArgs>;
/** The custom image to use */
image?: string;
link?: string;
Expand All @@ -39,7 +38,7 @@ export interface ProfileBadge {
/** Should the user display this badge? */
shouldShow?(userInfo: BadgeUserArgs): boolean;
/** Optional props (e.g. style) for the badge, ignored for component badges */
props?: HTMLProps<HTMLImageElement>;
props?: React.ComponentPropsWithoutRef<"img">;
/** Insert at start or end? */
position?: BadgePosition;
/** The badge name to display, Discord uses this. Required for component badges */
Expand Down
5 changes: 2 additions & 3 deletions src/api/ChatButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import "./ChatButton.css";

import ErrorBoundary from "@components/ErrorBoundary";
import { Logger } from "@utils/Logger";
import { waitFor } from "@webpack";
import { findByProps } from "@webpack";
import { Button, ButtonLooks, ButtonWrapperClasses, Tooltip } from "@webpack/common";
import { Channel } from "discord-types/general";
import { HTMLProps, MouseEventHandler, ReactNode } from "react";

let ChannelTextAreaClasses: Record<"button" | "buttonContainer", string>;
waitFor(["buttonContainer", "channelTextArea"], m => ChannelTextAreaClasses = m);
const ChannelTextAreaClasses = findByProps<Record<"button" | "buttonContainer", string>>("buttonContainer", "channelTextArea");

export interface ChatBarProps {
channel: Channel;
Expand Down
4 changes: 2 additions & 2 deletions src/api/Commands/commandHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*/

import { mergeDefaults } from "@utils/mergeDefaults";
import { findByCodeLazy } from "@webpack";
import { findByCode } from "@webpack";
import { MessageActions, SnowflakeUtils } from "@webpack/common";
import { Message } from "discord-types/general";
import type { PartialDeep } from "type-fest";

import { Argument } from "./types";

const createBotMessage = findByCodeLazy('username:"Clyde"');
const createBotMessage = findByCode('username:"Clyde"');

export function generateId() {
return `-${SnowflakeUtils.fromTimestamp(Date.now())}`;
Expand Down
7 changes: 3 additions & 4 deletions src/api/MessagePopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@
import ErrorBoundary from "@components/ErrorBoundary";
import { Logger } from "@utils/Logger";
import { Channel, Message } from "discord-types/general";
import type { ComponentType, MouseEventHandler } from "react";

const logger = new Logger("MessagePopover");

export interface ButtonItem {
key?: string,
label: string,
icon: ComponentType<any>,
icon: React.ComponentType<AnyRecord>,
message: Message,
channel: Channel,
onClick?: MouseEventHandler<HTMLButtonElement>,
onContextMenu?: MouseEventHandler<HTMLButtonElement>;
onClick?: React.MouseEventHandler<HTMLButtonElement>,
onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
}

export type getButtonItem = (message: Message) => ButtonItem | null;
Expand Down
9 changes: 4 additions & 5 deletions src/api/Notices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { waitFor } from "@webpack";
import { find } from "@webpack";

let NoticesModule: any;
waitFor(m => m.show && m.dismiss && !m.suppressAll, m => NoticesModule = m);
const Notices = find(m => m.show && m.dismiss && !m.suppressAll);

export const noticesQueue = [] as any[];
export let currentNotice: any = null;

export function popNotice() {
NoticesModule.dismiss();
Notices.dismiss();
}

export function nextNotice() {
currentNotice = noticesQueue.shift();

if (currentNotice) {
NoticesModule.show(...currentNotice, "VencordNotice");
Notices.show(...currentNotice, "VencordNotice");
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/api/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export interface Settings {
autoUpdate: boolean;
autoUpdateNotification: boolean,
useQuickCss: boolean;
enableReactDevtools: boolean;
themeLinks: string[];
eagerPatches: boolean;
enabledThemes: string[];
enableReactDevtools: boolean;
frameless: boolean;
transparent: boolean;
winCtrlQ: boolean;
Expand Down Expand Up @@ -81,6 +82,7 @@ const DefaultSettings: Settings = {
autoUpdateNotification: true,
useQuickCss: true,
themeLinks: [],
eagerPatches: IS_REPORTER,
enabledThemes: [],
enableReactDevtools: false,
frameless: false,
Expand Down Expand Up @@ -116,7 +118,6 @@ const saveSettingsOnFrequentAction = debounce(async () => {
}
}, 60_000);


export const SettingsStore = new SettingsStoreClass(settings, {
readOnly: true,
getDefaultValue({
Expand Down
4 changes: 2 additions & 2 deletions src/api/Styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export const isStyleEnabled = (name: string) => requireStyle(name).dom?.isConnec
* // -- plugin.ts --
* import pluginStyle from "./plugin.css?managed";
* import { setStyleVars } from "@api/Styles";
* import { findByPropsLazy } from "@webpack";
* const classNames = findByPropsLazy("thin", "scrollerBase"); // { thin: "thin-31rlnD scrollerBase-_bVAAt", ... }
* import { findByProps } from "@webpack";
* const classNames = findByProps("thin", "scrollerBase"); // { thin: "thin-31rlnD scrollerBase-_bVAAt", ... }
*
* // Inside some plugin method like "start()"
* setStyleClassNames(pluginStyle, classNames);
Expand Down
16 changes: 6 additions & 10 deletions src/api/UserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*/

import { proxyLazy } from "@utils/lazy";
import { Logger } from "@utils/Logger";
import { findModuleId, proxyLazyWebpack, wreq } from "@webpack";
import { findByFactoryCode } from "@webpack";

interface UserSettingDefinition<T> {
/**
Expand All @@ -43,20 +42,15 @@ interface UserSettingDefinition<T> {
userSettingsAPIName: string;
}

export const UserSettings: Record<PropertyKey, UserSettingDefinition<any>> | undefined = proxyLazyWebpack(() => {
const modId = findModuleId('"textAndImages","renderSpoilers"');
if (modId == null) return new Logger("UserSettingsAPI ").error("Didn't find settings module.");

return wreq(modId as any);
});
export const UserSettings = findByFactoryCode<Record<PropertyKey, UserSettingDefinition<any>>>('"textAndImages","renderSpoilers"');

/**
* Get the setting with the given setting group and name.
*
* @param group The setting group
* @param name The name of the setting
*/
export function getUserSetting<T = any>(group: string, name: string): UserSettingDefinition<T> | undefined {
export function getUserSetting<T = any>(group: string, name: string): UserSettingDefinition<T> {
if (!Vencord.Plugins.isPluginEnabled("UserSettingsAPI")) throw new Error("Cannot use UserSettingsAPI without setting as dependency.");

for (const key in UserSettings) {
Expand All @@ -66,10 +60,12 @@ export function getUserSetting<T = any>(group: string, name: string): UserSettin
return userSetting;
}
}

throw new Error(`UserSettingsAPI: Setting ${group}.${name} not found.`);
}

/**
* {@link getUserSettingDefinition}, lazy.
* Lazy version of {@link getUserSetting}
*
* Get the setting with the given setting group and name.
*
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import { findByPropsLazy } from "@webpack";
import { findByProps } from "@webpack";
import { Parser } from "@webpack/common";

const CodeContainerClasses = findByPropsLazy("markup", "codeContainer");
const CodeContainerClasses = findByProps("markup", "codeContainer");

/**
* Renders code in a Discord codeblock
Expand Down
6 changes: 3 additions & 3 deletions src/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import { Logger } from "@utils/Logger";
import { Margins } from "@utils/margins";
import { LazyComponent } from "@utils/react";
import { LazyComponent, LazyComponentType } from "@utils/react";
import { React } from "@webpack/common";

import { ErrorCard } from "./ErrorCard";
Expand Down Expand Up @@ -104,8 +104,8 @@ const ErrorBoundary = LazyComponent(() => {
}
};
}) as
React.ComponentType<React.PropsWithChildren<Props>> & {
wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): React.FunctionComponent<T>;
LazyComponentType<React.PropsWithChildren<Props>> & {
wrap<T extends AnyRecord>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): React.FunctionComponent<T>;
};

ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => (
Expand Down
11 changes: 5 additions & 6 deletions src/components/PluginSettings/PluginModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ import { classNameFactory } from "@api/Styles";
import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex";
import { gitRemote } from "@shared/vencordUserAgent";
import { proxyLazy } from "@utils/lazy";
import { Margins } from "@utils/margins";
import { classes, isObjectEmpty } from "@utils/misc";
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { OptionType, Plugin } from "@utils/types";
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "@webpack/common";
import { find, findByProps, findComponentByCode } from "@webpack";
import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserUtils } from "@webpack/common";
import { User } from "discord-types/general";
import { Constructor } from "type-fest";

Expand All @@ -50,9 +49,9 @@ import { GithubButton, WebsiteButton } from "./LinkIconButton";

const cl = classNameFactory("vc-plugin-modal-");

const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers");
const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
const UserRecord: Constructor<Partial<User>> = proxyLazy(() => UserStore.getCurrentUser().constructor) as any;
const UserSummaryItem = findComponentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers");
const AvatarStyles = findByProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
const UserRecord = find<Constructor<Partial<User>>>(m => m?.prototype?.getAvatarURL && m?.prototype?.hasHadPremium);

interface PluginModalProps extends ModalProps {
plugin: Plugin;
Expand Down
Loading
Loading