#๐พ-core-development
1 messages ยท Page 16 of 1
hmm, nodejs has a crypto built-in lib
that could be used, but it is way overkill at this point
what about base64? we do have atob("...")
Isn't this just a lack of proper wayland support in sudo and doas? I just tested and sudo (by default) preserves DISPLAY but not WAYLAND_DISPLAY. You can configure both sudo and doas to keep more environment variables so you could add those there
oh I think this is because Xorg sessions run as root, whereas wayland usually runs as normal user?
(I don't mind adding this, I'm just curious since this seems like an oversight in sudo/doas)
oh I think this is because Xorg sessions run as root, whereas wayland usually runs as normal user?
basically this, but also WAYLAND_DISPLAY isn't the full socket path so it has to be set to $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY (which also only works for root, because root is the only user who also has permission to read anything in another user's XDG_RUNTIME_DIR)
I guess ideally the installer should only use root perms when it needs to, but that's probably out of scope here
Yes, the way to verify if it is being ran on Flatpak looks bad and it requires more testing, specifically with updating it. Also, it needs checking to see if it works without Flatpak
Roadmap:
[ ] Runs with Discord not installed with Flatpak
[ ] Updates successfully with or without Flatpak
- The installer should do this
- I think this command straight up gives full host access to the host which some users might find undesirable. Would be useful to find out if there's a way to restrict it to git in a specific directory. Perhaps we could somehow expose a shell script to the flatpak
- it appears flatpak-spawn is in the
flatpak-xdg-utilspackage which not everyone might have installed (I don't)
good morning github
I want that but how do i integrate sudo/doas into the gui
password prompt and stuff
i think i could prompt the user for password but i don't really want to do that
probably requires messing with pam
I'd rather use some framework like PAM
but not everyone will have that
not all systems have pam
ye I'm not sure if there's a portable and safe way to do it
- Going to add it if I can't find a way to realize 2
- Yeah, looks like a better option, but i have no idea how to do that. Time to google
- Huh, if I knew how to allow access to git (like what com.visualstudio.code does), I would do that
As of now, get this commit
i think the only portable way is prompting the password from the user in ur app then making sudo read the password from stdin
but i dont think doas can read password from stdin
oh my god why do you do this doas
man doas
uh, what if you run it w/o args?
but ye i hate when clis do that
meanwhile gnu coreutils only support --help and not -h
"no help for u read man or gtfo"
xd
well doas doesnt have a way to read password from stdin

honestly i'd never even heard of doas until the other day lmao
sounds like a pain
it is
why do people use it
so limited
"security"

sudo is very bloated and had a bunch of bad cves in the past
sorry i ont have the mental capacity to use sudo
as if such an important thing doesn't get scrutinised constantly by security researchers tho
rewrite sudo in rust 
blazing fast
i tried using doas but
- it prompts for password every time (i know i can change it with config but why would i mess with its config if sudo does what i want ouf of the box)
- it has no support for environent variables:
doas VARIABLE=hi sh -c 'echo $VARIABLE' - just generally very limited
i use 2 a bunch
permit persist :wheel in /etc/doas.conf
from opendoas readme
!!
u also have to configure sudo to do that but you probably forgot
funny config
i bet one of those NOPASSWD ones is somehow abusable to spawn a root shell
but idc

xdd
security through obscurity is very real and safe didnt u know /s
reckless ๐
how
all of those are there cause i automated them with scripts
so i cant really enter my password
wtf is ceserver i dont remember
it's my backdoor i forgot in your system mb
LOL
lmfao
oh you probably use those cmds a lot and entering password must be annoying each time and are generally safe
oh yeah i was using cheatengine to do cursed shit in plants vs zombies with wine
Bloons*
tldr: getting cheat engine to work in wine is absolutely cursed
I never actually use sudoedit
owo
it runs the editor as your own user instead of root
sudo ven --hug
more secure and has the great benefit that it uses your own config of whatever editor youre using instead of the root user's config
owo
nope i will su -c "echo 'key1=value1\nkey2=value2' > /etc/veryimportantconfig"
husk
rm /root/.config -rf && ln -s /home/username/.config /root/.config
NOOOOO
thats such a terrible idea for security lmao
might as well just run everything as root then xd
but its also kinda annoying cause it doesnt allow editing files that are symlinks and doesnt alow editing files in non root owned directories
idk why
explode
explo
explod
wayland wont let me
basically you can create symlinks to anywhere so you could bypass sudoedit restrictions by symlinking arbitrary files to ur home director
makes a lot of sense :w
you're using vim commands in discord
vim /home/megu/ven
:: packages not in the AUR: catppuccin-gtk-theme
:: marked out of date: android-apktool citra-qt-canary-bin klogg-bin riseup-vpn spotify ttf-twemoji-color
:: orphans: xf86-input-joystick

whats more unsafe:
- symlinking your .config to /root/.config
- installing flutter
(its the latter)
lmfao
every time i install flutter i feel like im installing 3 viruses to my system
im a virus
so your pr in install script works for running as root on wayland ? @woeful sable
yea
mm okay
i would much rather just not run as root and instead only escalate the actual commands
but shrug
5341902 fix executing gui as root in wayland (#7) - dzshn
According to here, flatpak apps are isolated to other apps, and they can't access anything other than what their package bundles provides. A.K.A. node and git would need to be provided by the flatpack package if you would like to make it 100% sandboxed. As I understood, 2 is impossible to do without literally slapping git in it
For 3, due to the restrictions of 2, there isn't much to do without using flatpak-spawn or...
As a way to kinda met the concerns with 2, maybe we could prompt that the installation will disable sandbox for Discord, and ask if he is fine with that
apfel
who is the ajrx person
@quaint sapphire
ah
teal did u ever get this cleared up cus i can explain it to you
yea
kinda
i think u misunderstand functional components
and what rerendering means with them
uhh, you might have misunderstood what i meant by using that word
a rerender of a FC doesnt mean a new lifetime / instance
i meant that the component would be discarded and recreated if the text was to change
that would be a remount
it wouldnt be updated
thats not true
cause the text is not stateful
the tokens wont change if the source code is not stateful
the tokens will change if the theme changes
thats an oversight from me ig
also im pretty sure that props are part of the components "state"
which is why fibers keep track of memoized props
not entirely certain about that because i havent read the source code for that but i think its true
uhh, iirc only if the props passed, themselves, are also stateful
from what I see, the tokens are not stateful
they just get regenerated when the theme changes bc the component is called again
anyways this is a pointless convo
and i aint a react expert
what do u think state is
because thats all that state does with FCs
thats ok
I'm just a brainless user of the lib
thats okay lol, idk if u like knowing things but if u did a convo would help
anyways time to address code review
I like knowing things
I just don't control what they are
My brain works at random
when i made the first iteration of this plugin like 2y ago discord's hljs only had an html output, i'll see if it has an AST output in its current state
@austere talon is it necessary that signal is a state
in useAwaiter
oh i didnt see pending
my b
.highlight("js", "console.log('owo')", true).emitter.rootNode.children returns an AST like structure but you'd have to format that yourself so probably not really usable. It's fine to use dangerouslySetInnerHTML since hljs is safe but it's just a bit terrifying to look at
discord uses dangerouslySetInnerHTML too right?
signal?
i think setSignal was just for forceUpdate
it's a very dirty hack
just remove it and replace with dependency array
oh i thought it was for cancel
the signal was for
const [res, err, pending, refetch] = useAwaiter(() => fetch(...));
// on demand
refetch()
feel free to change it as necessary
so taht if deps change pending will go back to true
just make sure it still works the same as before
death
oh yeah that should definitely be done
i'll change it and save the testing for later
that was an oversight by me
what is this
React.createElement replacement
it is react createElement with slight changes
basically because createElement has some performance bottlenecks
and they didnt want to do breaking change
they made a new api
nooo not a breaking change in a major release
the difference is that children are now an array in props instead of being passed as varargs and the key is now passed as third argument
did they deprecate
breaking changes are a pain to work with
that makes sense
whenever you return an array it uses jsxs if i understood correctly
in dev it shows the key warning
in prod jsx = jsxs
ah
no
interesting?
React.createElement is still what you should use
jsx is only to be used by the compiler
but jsx() is way more painful to regex match than createElement
๐
f
cause children are so cursed
what compiler uses .jsx format
wdym
or supports
like jsx in general or do you mean the function
babel, swc and esbuild i think?
makes sense
is ref still in props
oh also jsx() has the benefit that you dont need to import React anymore
Although React 17 doesnโt contain new features, it will provide support for a new version of the JSX transform. In this post, we will describe what it is and how to try it. Whatโs a JSX Transform? Browsers donโt understand JSX out of the box, so most React users rely on a compiler like Babel or TypeScript to transform JSX code into regular Java...
wha
before you had to have React in scope
to use jsx
so you had to import React in every jsx file
yea
see that article i linked
@austere talon where should i put useIntersection
idk tbh
util/react.ts?
also no worries
kk
should i move useAwaiter there too
yeah
i should clean up utils
xd
actually probably dont move useAwaiter
cause it might conflict with other prs
oh true ok
i'll leave that for u
well
im already updating useAwaiter that breaks people using refetch
or onError
what did u change
maybe use an object instead
sounds good
useAwaiter(
() => fetch(),
{
onError: e => ...,
deps: []
}
)```
so its easier to add new stuff in the future
fallbackValue as well
and not pain to use if you only want onError
yea
i did ya
i made a dirtyRefetch for reviewdb inside the plugin
that u can change later
refs are so weird
how do i set the initial value of a ref
const ref = useRef()
return <input ref={ref} />
how do i set the initial input???
None
None
Failed to load resource: the server responded with a status of 404 () ```
dzshn:nya/ % z v
dzshn:is-even/ (main) % z ven
dzshn:is-even/ (main) % z venc
dzshn:vencord/ (main) %
fastest cd'ing
idk sounds fishy
no
@austere talon when u said named functions over arrow functions
did u mean like named rather than anonymous
or using the function keyword for named functions
i hope ven didnt go to sleep
he sleeped
liar
- const foo = () => {
+ function foo() {

you decide
I usually still use function inside closures
but doesn't really matter 
unfortunately read this in the ERB voice
@austere talon merge or die
very beautiful
show
because raw
does that make a fiber for each svg path
did you just copy that patch from hide attachments lmao
Yes ๐คซ
MiniPopover api would be useful
u should just
wait i do need to check if they're compatible lol
use the input context menu
yeah
theres already the send message button toggle
does that makeItem support onContextMenu?
error in console? 
i'm not sure
Also hide attachments only shows up on messages with images
oh
check console then
nothign
Also ^
not sure
I mean assuming makeItem supports context menu it'll be a piece of cake
wait quickmention also uses that patch
pretty sure this won't work? even if the state changes, useAwaiter won't rerun its body. Did you forget to add the refetch count as dependency?
i'm looking at the regex, it should be compatible
now i refreshed again and hideattachments is shown
really make a api
both work?
lmk when ur done reviewing so i can push
Make context menu api smh
ugh

what exactly do these do?
description: "How to show language icons on codeblocks",
(?) I'm not sure what devicons stands for
its the library i use for lang icons, this is prob better since its user-facing text
i love how you both are talking in github
oh yeah the old code also uses unknown
I think someone else added that code
I would never use unknown
unknown is like very pain
const text = err?.message || String(err)```
if it's any this works, if unknown you gotta cast 
i don't even wanna know how you're making shiki with plaintext patching
it's just one single patch
just replace discords codeblock react method
and return ur own component

Decides when to use hljs highlighter rather than shiki
Primary uses hljs if the language exists in hljs, otherwise use shiki
Secondary uses shiki if the language exists in shiki, otherwise use hljs
yea the old plugin was functionally an instead patch too i think
Always is the same as disabling the plugin? If so, why even have that option
Would be nice to change the labels to a more descriptive text so it's easier to Understand. If it looks weird because too much text you could use the settingsAboutComponent prop
Always still has the shiki theme background and the copy button, in the future i plan on adding a language switcher too
unknown is nice as an input since its typesafe
i guess thats if ur trying to write type safety in a verbose way
yes but type safety should be optional, not forced
this code is perfectly safe (unless message is a cursed getter but then cast won't save you either)
casting to Error is obsolete
so having err as any is nicer (imo)
i would agree if we werent using strict mode
also i wouldnt say thats perfectly safe since err.message could be a non string
const text = err instanceof Error ? err.message : String(err) is not much more lengthy imo
although not a perfect solution if u care about err.message being empty
The arRPC plugin isn't working for me using the userscript in a browser.
I see this in my browser's console:
Starting plugin WebRichPresence (arRPC)
but not any other relevant output/errors.
I've confirmed that pasting bridge_mod.js directly into my browser's console gets arRPC working so it seems like a Vencord issue.
Browser: Brave
OS: macOS 13.0.1
Userscript version: 1.0.0.1669865203194
brave problems
horror
that's true ig but I trust myself not to throw some random object with a non string message

real
I think instead of Use shiki instead of, it would make more sense to say Prefer shiki over
cause otherwise it sounds like it's using either or
II've confirmed that it doesn't work in Chrome as well a few days ago as well.
instead of sounds like either or to me lol
maybe like "Use HLJS with Shiki as a fallback"
yeah that's why I'm saying change it to Prefer 
yeah that's good as well
my god
lmao
vendicatedddmachineee what do i do #๐งฉ-plugin-development
Actually, I just checked Chrome again, and though it doesn't work, it's at least showing an error:
Uncaught (in promise) TypeError: Rp.lookupApp is not a function
at Ep (userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52:5695)
at wt.onmessage (userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52:6801)
Ep @ userscript.html?name=Vencord.user.js&id=983c6b8f-575f-415e-b54a-e9b78d2d09e8:52
wt.onmessage @ userscript.html?name...
looks good now I think but I'm too tired to think
gonna check it out tmrw and probably merge then
thanks for fixes!!
too tired to think but thinks that it looks good now
looks like it just needs update for the get asset finding
not sure
Might be something with your log levels in the console? not sure
i think its because it runs on dom load
and the those modules are in lazy loaded chunks
so if the websocket readys quick enough
it wont find them
**arRPC.tsx: **Line 33
const rpcManager = findByCodeLazy(".APPLICATION_RPC(");
this seems to find the wrong module
try this filter with a findAll in the console, I bet it'll find multiple
i figured it was async transpilation stuff hehe
probably just needs a more precise filter and it'll work again
- create file in src/api that exports methods to interact with it
- create complementary api plugin if needed that does patches
maybe get them to run it
they're plugins for simplicity
hmm
exactly what pc- was
but does it have a lookupApp method
cmon
I guess but at least this time we aren't cluttering people's plugin folders
the idea is to hide api plugins from plugins page soon
idk why I even showed them in the first place lol
yea my thoughts
I wish they weren't plugins but then I'd have to reimplement all the life cycle logic and so on
reusing the api is much better imo and u even had a required field
but from my perspective showing them is like showing all the utils and other api things
@Vap0r1ze ah that's a good thought. I put the log level to verbose and now see the error in Brave.
So now we know this is the same issue that the arRPC userscript and extension is having, feel free to close this issue if it makes sense.
I think I will introduce a "hidden" flag on the plugins object that hides plugins from settings (moves them in its own "hidden" category)
or well we could just make that flag push them to the very bottom
so they still show up but all the way down ๐ ๐ ๐
like in a different category like the required ones
use case?
i'm confused what does this do
toggleable apis?
ah was just gonna ask if theres deps
but some users may still want to enable some apis without enabling plugins
that makes sense then
to for example use them in the console
ya
just inserts Element into the array
Also some apis may have their own settings (potentially)
for example I want to make a keybind api at some point where plugins can register their own keybinds and then users can customise those
**viewIcons.tsx: **Line 38
dependencies = ["MenuItemDeobfuscatorAPI"];
omfg
Classes good
no sadly
typescript could have made classes so much better
What's wrong with them
interface IFoo {
bar: SomeComplexType;
}
class Foo implements IFoo {
bar = {} // WHERE INTELLISENSE TYPESCRIPT
}```
you literally have to type twice with classes
the definePlugin function on the other hand gives you full intellisense
wtf how does this function work
you can use functions as replacements
The replace() method returns a new string with one, some, or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function called for each match. If pattern is a string, only the first occurrence will be replaced. The original string is left unchanged.
Doesn't seem like a deal breaker to me but whatever
it is
Also is it different with abstract classes
no
you lose all intellisense for commands, patches, etc unless
- we use terrible builder patterns like discord.js which is ugly
- we use a defineCommands and definePatches function which is ugly
- you type them manually which is ugly
another option would be specifying the entire data in the constructor super call but like now it's basically the same as the old definePlugin
vs code or jetbrains?
the only benefit of using class is better this in nested objects but you can just work around that by just storing your plugin in a variable instead of directly exporting it
so I'm still against classes
you can use classes in ur plugins if u want tho lol

VuewIcons shows its possible
@austere talon just checked, contextmenu does work
neat
i mean you do have the required flag
ye but only settings and NoTrack and notices api are required
but does it always insert in that exact position or can you choose position
both are fine imo but the latter would be cooler
too lazy

it isn't changing the icon or text tho
https://github.com/Vendicated/Vencord/pull/275 @austere talon api there, gotta fix that bug tho
copyraw plugin done?
Because there are so few differences between manifest v2 and v3 aside
from header rewriting i just wrote two different manifests. We also generate a .xpi file that gets added to the nightly releases on main pushes. I am aware of #69, however that PR does not support manifest v2 (yet?), and it is still a few months till firefox releases manifest v3, so I think until then this would be a worthwhile effort to maintain.
This needs setting WEBEXT_USER and WEBEXT_SECRET from https://addons.mozilla.org/en-US/developers/addon/api/key in order to work with the signed releases
๐ i wonder why ppl hit the fork button instead of the star button
They're about to make a token logger and submit it as a pull request /s
interesting that there is 17 PRs to be merged
open PRs does not mean they're ready to be merged
lmfao
as i see, some, or most of them are waiting to be approved mostly
after they did all the requests
could this use pnpx? this way we don't have to depend on web-ext which is absolutely massive
basically
did you add modal?
@austere talon VEN PLS REVIEW MY CHANGES AAAAAAAA
(yes i have anxiety for my prs to be merged)
just steal from juby 
Lazy
Nice, got a link to install it?
Pr
sorry i don't understand what Pr is
just wait for merge soon
it shouldn't be hard cause we already export all Modal Components from utils/modals
for parsing codeblock it's just Parser.parse(String) from commons
I mean i can also help with modal later
but it shouldn't take longer than 5 minutes
Lazy
Pull request
oh okay ๐
which is absolutely massive
@austere talon stop talking about my mother
shouldn't this try to find an existing one first? otherwise we'll have duplicate headers
setContentTypeOnStylesheets, { urls: ["https://raw.githubusercontent.com/*"] }, ["blocking", "responseHeaders"]
instead of will, i would much rather this be a question. Also perhaps link to https://docs.flatpak.org/en/latest/libflatpak-api-reference.html#gdbus-org.freedesktop.Flatpak.Development? It might also be possible to give permission to only org.freedesktop.Flatpak.Development instead of the entire Flatpak namespace
it works as expected for me, even with the experiment. the dono and button cards are themed correctly and the plugin cards while being ugly are themed the same as the highlight which is the expected behaviour
![]()
Not for me ๐คท
 and actual named functions over arrow function assignments for consistency?

Apparently no. I wonder what talk-name

If I could take a wild guess it would be org.freedesktop.portal.Flatpak
that was vencord itself as soon as it got an auto updater 
@austere talon ven pwwease check mah new pushes ๐๐
RCE plugin - execute random code on another vencord person's client
UGEHGWUGHEWE THIS NEW FONT SUCKS WTF
wgeFEWH
FUCK
I used #1000955971650195588

3
2
1
pushed
some stuff
on copy raw
@austere talon ^^
also rce I still wanted to color other things
color them
Yea ber
Bet
Also what code did
Did you use
Tsesr
wha
I opened #๐จ-css-snippets
just see what timestamp I commented that at to figure out what the latest message was
it was consistent crashing
One dark theme
other settings unchanged
I can debug it for you if you can't reproduce it, but tomorrow not now, I'm gonna sleep
armcord btw
oh i thought stick was like nearby snap
ye not intended
nah it means you can only select the markers and not area between
can u repro?
oh wait is it armcord problem
idk haavenrt tested
hmm im not sure if I have the very latest version that had ur csp change
maybe it's that
that it can't load worker?
uh
but that doesn't make any sense, why would there be null tokens, so doubt
it would stop at init
yeah that's what I thought
lol what
my nails
None
None
Failed to load resource: the server responded with a status of 404 () ```
404
arrpc
@austere talon ah i wasnt destructuring useAwaiter properly
was
tokens = [tokens: null, error: null, pending: false]
should have been
[tokens] = [tokens: null, error: null, pending: false]
i really wanna find out why typescript didnt catch that
oh lol
tokens is supposed to be null or an array?
if so, both are valid values for it
but since its random code you dont know which user you are targeting
Yes
token roulette
is it some random's token or is it ven's token that you got

they dont exist as just json files in their repo they are built, so i might have to either add vsix support later or just suggest people extract jsons from themes like this into a gist
vsix support would be cringe unless discord has some sort of zip file reader library already
in b4 fflate simping
It has a zlib implementation bundled
It is used for the gateway websocket
@austere talon https://github.com/Vendicated/Vencord/pull/238 is there a problem with this pr? im willing to not depend on the other pr if thats the problem. please answer
Once again stupid Mozilla not having a cool api
oh i forgot to comment on it MB
it's mainly that there's basically no point in doing that since the use of userplugins is extremly niche and not really comfortable rn. I want to remove it eventually in favour of basic plugin support without having to build from source
i wanted to that as well
by introducing async loading of plugins
so you can load them from localstorage
@austere talon meow what do you think of the changes on my pr
SKULL
imo indexeddb would be way better for this
you can bundle zip in like ~8kb bundle size but no need just don't load extensions
we already bundle a zip lib but it's in main
you could use ipc to unzip stuff if you really wanted
but eh no need imo
this one btw https://github.com/101arrowz/fflate
it's really nice
i'd just need inflate so 3kb actualy
also last night debugging that shit was so hard
the source maps actually made it harder
devtools was breaking hard
anyways i pushed the stuff
lol what
wait localstorage is sync
yes
well that makes that user plugins installing trivial
nothing would show except for the innermost block vars
same with the vars panel on the right
i guess ill do a pr for that
but non source mapped debugger was working
localStorage = synchronous, ~4mb limit (or lower)
indexeddb = asynchronous, infinite limit but at 50mb the user gets a Popup "do you want to allow example.com to write large data" or something like that and if they choose no that's where it ends
oh yeah i meant indexeddb
I put a 4gb blob in indexeddb once to test and it works
lmao
it just explodes the discord folder's size
like the cache doesnt already do that enough!!!
i dont do a lot of javascript, im usually hired for backend qa or devops
indexeddb is absolute pain to work with
this makes it nice
true it has some pitfalls i think though
ill be fine with indexeddb, i think
none really apply if ur using it as a keyval tho
now
sorry
not now
i think i want to use indexdb in the next plugin
and take advantage of structured data
if i make a util it would be funny
there's a few plugins already using idb
namespacing
custom stores would be better honestly (but also maybe not worth it because usually a plugin will only write a single row)
Well it's just idb-keyval which has support for custom stores on all methods
uh mine will definitely write many many rows
what are u gonna do 
but honestly it could just not
the impl in my head was dumb
a cache for spotify tracks albums etc
no need for a row per entity
oh you wanna do custom embeds
why do u even wanna cache those, shouldn't chromium by default cache most of it?
assuming Spotify sets the right cache headers which I assume they do
ye
oh maye i shouldnt share device id
7200seconds
the device id
2 hours
2 hours is ok i guess
caching is hard because have fun with cache invalidation xd
i was
i was gonna have fun
but now its simple
simple is good though so lets go
still need to make sure im bucketing requests
praise lodash debounce
actually theres a better one for that
lodash my hatred ๐
i made my own debounce
cause we load before lodash is a thing
oh also cause i use it in all electron contexts
inb4 discord also bundles lodash in node
check those node_modules u might be surprised
that's also why it's in its own file btw
it was originally in misc but misc has react stuff and for that it imports react from webpack commons and webpack commons has side effects (calling a lot of finds())
so esbuild was bundling like the whole webpack code into the main bundle xd
oopsie
lolololol
did u fix shiki pr now?
*good
how did that crash even slip past you
only happens under certain circumstances?
plaintext
what
ignore that message i didnt send that
anyways it was because i didnt test 
and i forgot to write that i was waiting to test
but u did it for me that was so cool
why does discord's node_modules include tslib
LOL
some packages depend on it
..>
it's like shared ts runtime right
i think the purpose is so that if there's multiple packages use it it isn't duplicated
yeah it's to avoid having the same typescript helpers in every module
swc has the same
yea that makes sense
its just
so funny to see all these
es5 targeting node packages
in a node 16 electron app
vencord has a bunch of those helpers too
discord moment
their browser bundle is even worse
we will never surpass the cjs/esm ones
uses es6 features
polyfills lots of es6 features with bloated worse performing polyfills

I LOVE REGENERATORRUNTIME
this is my favourite module
it reduced bundle size by like 20kb
that produces discord bundles
you love how they actually use async/await in some places
with no polyfills
do it
i will try one day i found the part of swc that generates them so i think generating signatures will be easy
honestly
in my modding time i have found so much deranged code in discords bundle
they use this for printing the banner https://github.com/sindresorhus/devtools-detect
and it is so terrible
it runs an interval that checks for devtools stuff every 500ms
oh my god
is that the one that uses screensize
me using detatched devtools
hold up!
discord when they worsen everyone's performance by checking if devtools are open every 500ms just to spam some stupid banner

i love
https://github.com/sindresorhus?page=2&tab=repositories horror who the hell is this guy
he has 1.1k repos
and most of them have at least 500 stars
so if you enable the plugin, does it make perf better?
(I only looked first pages)
he is responsible for npm packages being so bloated
yes
i love when my dns dies
thats just standard javascript, making a whole ass package for one function
but i still get gateway events
he has three million npm packages and all of them depend on 10 of his other packages
the npmbro
so you install camelcase and get 40 packages you didnt ask for
this guy is insane
he's the devilbro of npm
he is one of the reasons npm sucks
the npmbro






