Commit graph

609 commits

Author SHA1 Message Date
PalmDevs
17fd1ec0bd
fix(plugins/settings): correct path for SettingsNavigator patch 2025-10-13 00:45:07 +07:00
PalmDevs
d0ee081ac5
fix(lib): update filters 2025-10-12 01:27:53 +07:00
PalmDevs
210ea160ce
chore: update dependencies 2025-10-12 01:27:08 +07:00
PalmDevs
6dfeccb26a
fix(plugins/developer-kit): access property from globalThis
Prevents "Property '__REACT_DEVTOOLS__' does not exist" on builds without React DevTools.
2025-09-17 18:00:26 +07:00
PalmDevs
6df0716ec5
fix(plugins/settings): show Reload Required dialog before settings modules load 2025-09-17 17:14:25 +07:00
PalmDevs
d54623aa20
fix(plugins/developer-kit): refresh SettingsNavigator on state change 2025-09-17 17:14:23 +07:00
PalmDevs
349c23eced
fix: correct misleading terms 2025-09-17 17:14:22 +07:00
PalmDevs
4f612edda4
fix(lib/plugins): do not emit flagUpdate if new flag is same 2025-09-17 17:14:21 +07:00
PalmDevs
82153eb512
feat(lib/storage): allow set-replacing, add update mode to subscriptions 2025-09-17 17:14:20 +07:00
Palm
f89d523c0d
feat: native bridge (#4)
* feat(lib/modules/native): types for calls

* feat(lib): proper caching for `assets` and `modules` lib

* fix(lib/modules/metro/runtime): add flag once `importedAll` or `importedDefault` exports cached

* feat(lib/modules/native): add `fs`

* feat(plugins/settings): add Loader info in Revenge page

* feat: use native bridge for alerting errors

* chore(lib/modules/native): remove useless `String()` call on error

* feat(lib/modules/native/fs): rename `deleteFile` to `rm`

* feat(lib/plugins): save plugin states

* chore(preinit): correct arg name for native method
2025-09-16 01:06:04 +07:00
PalmDevs
56cb524aeb
chore(preinit): correct arg name for native method 2025-09-16 01:02:44 +07:00
PalmDevs
e4cb41fa2b
feat(lib/plugins): save plugin states 2025-09-16 01:02:29 +07:00
PalmDevs
53ba8a2975
feat(lib/modules/native/fs): rename deleteFile to rm 2025-09-16 01:02:27 +07:00
PalmDevs
4d93159632
chore(lib/modules/native): remove useless String() call on error 2025-09-16 01:02:25 +07:00
PalmDevs
5684fa9d8b
feat: use native bridge for alerting errors 2025-09-16 01:02:22 +07:00
PalmDevs
d33f68ebad
feat(plugins/settings): add Loader info in Revenge page 2025-09-16 01:02:20 +07:00
PalmDevs
97534c9d04
feat(lib/modules/native): add fs 2025-09-16 01:02:18 +07:00
PalmDevs
d8d85cfab1
fix(lib/modules/metro/runtime): add flag once importedAll or importedDefault exports cached 2025-09-16 01:02:16 +07:00
PalmDevs
dba76a9f81
feat(lib): proper caching for assets and modules lib 2025-09-16 01:02:13 +07:00
PalmDevs
67345aa82e
feat(lib/modules/native): types for calls 2025-09-16 01:02:11 +07:00
PalmDevs
280ebdc731
fix(scripts): remove side effect then chain support for as-require plugin 2025-09-16 01:01:29 +07:00
PalmDevs
f9322b7bc6
chore: update dependencies 2025-09-16 01:01:05 +07:00
PalmDevs
491b35308f
chore: install missing dependency 2025-09-10 07:21:13 +07:00
PalmDevs
fc5e776121
chore: format 2025-09-10 00:56:53 +07:00
PalmDevs
790f1f9ee3
fix(scripts/build): syntax error 2025-09-10 00:56:46 +07:00
PalmDevs
e389a6b61b
fix(lib/discord/patches/flux): bind function instead of using Reflect.apply
It may result in better performance.
2025-09-10 00:53:51 +07:00
PalmDevs
bd214823d4
fix(lib/modules/finders/get): correct types for getModules with options 2025-09-10 00:52:58 +07:00
PalmDevs
c03b87723e
fix(plugins/settings): debounce showing "Reload required" dialog 2025-09-10 00:52:13 +07:00
PalmDevs
5956d19125
chore: use import defer 2025-09-10 00:51:28 +07:00
PalmDevs
622df65cbf
chore: replace side-effect requires with imports mapping to requires
So the code editor can report errors for bad imports.
import statements are mapped to require statements via a bundler plugin.
2025-09-10 00:47:39 +07:00
PalmDevs
f8567c6e68
chore(scripts/build): refactor plugins to own files 2025-09-10 00:09:26 +07:00
PalmDevs
43ea84de29
chore: update dependencies 2025-09-10 00:07:33 +07:00
PalmDevs
790c30a6d5
fix: debug build flags 2025-09-04 01:29:18 +07:00
PalmDevs
54c6a2ffdd
fix(lib/modules/finders/filters): correctly generate key for relative.withDependencies 2025-09-04 01:29:18 +07:00
PalmDevs
d5a7ab6d7b
fix(lib/modules/finders): early return if non-dynamic filter used on uninitialized module 2025-09-04 01:29:17 +07:00
PalmDevs
3a57fe820c
fix(lib): support filtering for 297202 2025-09-04 01:29:16 +07:00
PalmDevs
0c991ae42a
chore(shims): remove bad file in tsconfig 2025-09-02 10:25:08 +07:00
PalmDevs
d842c16903
feat(plugins/api.storage): remove gotcha with load: true 2025-09-02 10:24:15 +07:00
PalmDevs
ab81c4b726
feat(plugins/settings): add optional descriptions for plugin list filters 2025-08-31 20:04:10 +07:00
PalmDevs
408c8463ac
feat(plugins/settings): exclude API plugins, turn on match all by default for plugin list 2025-08-31 20:04:03 +07:00
PalmDevs
83cd04d5b1
fix(plugins/settings): key FormSwitch to prevent animation on fast scrolls 2025-08-30 23:23:37 +07:00
Palm
5f5fc6f2b2
feat!: module finders refactor (#6)
- Renamed `byX` filters to `withX`.
  It is more correct. For example: You don't lookup, wait for, or get modules **BY** props. You lookup, wait for, and get modules **WITH** props.
- Renamed `*byImportedPath` to `*withImportedPath`
  For consistency with the above change.
- Renamed `getModule` to `getModules`.
  The API allows getting multiple modules and not just a single one. Types are renamed as well.
  `getModuleByImportedPath` remains the same as it only gets one single module with a unique imported path.
- `withX` filter **helpers** removed.
  They can now be replaced with the new capability-based `and` filter.
- `preferExports` and `moduleStateAware` filters removed.
  They can now be replaced with the new capability-based `and` filter.
- Composite finders renamed.
  `some` -> `or`, `every` -> `and`
- Composite finders takes a capability-based approach.
- Filter generators now need to attach runtime flag to let the system know whether the generated filter can be used to filter modules without proper exports or not.

## Misc.

- Removed useless unsub call in Profile Badges
- Use `queueMicrotask` with `asap`

# Features

## Capability-based approach to composite filters

```js
// Old
byProps(...).withDependencies(...)
// Old, same as: preferExports(byProps(...), byDependencies(...))
every(byDependencies(...), byProps(...))
// Old, ordering matters, this would fail unexpectedly!
every(byProps(...), byDependencies(...))

// New
withProps(...).and(withDependencies(...))
// New (as well), ordering doesn't matter, this has the same result as above
withDependencies(...).and(withProps(...))
```
2025-08-30 09:19:57 +07:00
PalmDevs
a7ba4a4391
chore(README): clarify more on how external scripts should map imports 2025-08-25 21:52:05 +07:00
Palm
2d9a791249
feat: fluent interface for finder filters (#5)
* feat(lib/modules/finders/filters): DSL-style filters implementation

* fix(lib/modules/finders/filters): extend helpers with `Function` proto

To not break compatibility with weird usages of existing filters. Allows using `apply`, `call`, etc.

* chore(lib/modules/finders/filters): add examples with helpers
2025-08-25 21:45:42 +07:00
PalmDevs
c33086435e
feat(lib/modules/finders/filters): deprecate undefined and allow null in byDependencies
`null` is more correct semantically (and also shorter to type). `undefined` should only be module IDs that cannot be found, in which case, a warning log has been added.
2025-08-25 21:22:06 +07:00
PalmDevs
d410656ec2
fix(scripts/build): only minify with dead code elimination 2025-08-25 20:10:25 +07:00
PalmDevs
497bb232ea
chore: update dependencies 2025-08-25 19:19:22 +07:00
PalmDevs
d5941354fa
fix(lib/utils/proxy): update types and documentation for destructure 2025-08-25 19:03:00 +07:00
PalmDevs
bb7b1ae05c
feat(lib/assets): micro-optimizations 2025-08-22 02:37:48 +07:00
PalmDevs
63fd1938cf
feat(lib/modules): micro-optimizations + logic fixes
FIXES:
- `getInitializedModuleExports` now returns `undefined` correctly on uninitialized modules instead of empty objects.
- `NotFoundResult` for lookups is now a frozen array
- `lookupModuleByImportedPath` now returns `LookupNotFoundResult` as a union instead of `[]`

PERFORMANCE:
- Optimized Array checks with `byDependencies` filter
- Micro-optimized finders and filters
- `ModuleDefinition`s no longer allocate their `Module` object immediately after defined
2025-08-22 02:32:07 +07:00