Commit graph

32 commits

Author SHA1 Message Date
PalmDevs
13722b994b
fix(plugins/no-track): crash on 310205+
Discord updated Sentry and now Sentry attempts also to set __SENTRY__ each attempt it tries to get the value, so now we fake the carrier instead.
2025-12-13 22:43:02 +07:00
PalmDevs
da8c535544
fix(plugins/settings): clear storage properly on errored plugins
Previous code did not handle API being undefined after plugin is stopped.
Code has also been abstracted to be inside the storage API provider.
2025-10-23 17:05:25 +07:00
PalmDevs
cb3b12f2ee
fix(plugins/no-track): correctly block AnalyticsTrackingActionCreators 2025-10-17 17:47:43 +07:00
PalmDevs
67c3d9ec8d
chore(lib/plugins): update internal names with correct terminology 2025-10-14 00:37:24 +07:00
PalmDevs
5956d19125
chore: use import defer 2025-09-10 00:51:28 +07:00
PalmDevs
d842c16903
feat(plugins/api.storage): remove gotcha with load: true 2025-09-02 10:24:15 +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
c2d12321f6
chore(lib/modules): simplify imports 2025-08-13 01:27:49 +07:00
PalmDevs
d386035342
chore(lib/storage): move Storage#use initialization back to library 2025-08-12 16:56:10 +07:00
PalmDevs
dcfe40c1d7
feat(lib/storage): add Storage#subscribe 2025-08-11 16:39:23 +07:00
PalmDevs
578b78dd7e
feat(lib/modules/finders/waits): cached-only waits 2025-07-31 19:15:08 +07:00
PalmDevs
00e9794baf
chore(plugins/no-track): make AnalyticsActionHandlers patch more readable 2025-07-30 20:17:57 +07:00
PalmDevs
b27fd9221a
fix(plugins/no-track): remove immediate discord lib dependency 2025-07-22 19:12:54 +07:00
PalmDevs
f5ed49d4e2
fix: declare unscoped storage API using decorators instead 2025-07-21 14:06:51 +07:00
PalmDevs
2e455cf2c5
feat: add ability to decorate plugin APIs, move private properties to WeakMap stores 2025-07-20 23:06:56 +07:00
PalmDevs
7b99a59a73
chore(lib/plugins): improve plugin manifest consistencies 2025-07-18 18:29:50 +07:00
PalmDevs
8ca50309eb
chore(plugins/logging): only register on dev builds 2025-07-18 02:03:26 +07:00
PalmDevs
7f88185d55
chore(plugins/no-track): reset color in warn log 2025-07-13 19:23:01 +07:00
PalmDevs
8d00748a6a
chore(plugins/no-track): do not implicitly return 2025-07-13 15:59:45 +07:00
PalmDevs
09114af96f
chore(plugins/logging): log start stage in dev builds 2025-07-13 00:26:11 +07:00
PalmDevs
0c5e636cb5
fix(plugins/no-track): wait for discord analytics modules during start stage 2025-07-13 00:16:41 +07:00
PalmDevs
5e06aa831d
feat: move hardcoded values to build constants, display source repo & license + remove github org in settings 2025-07-12 02:51:07 +07:00
PalmDevs
4b2a612374
chore(lib/utils): do not pluralize submodules 2025-07-11 17:33:06 +07:00
PalmDevs
c66dace21b
chore: cleanup questionable code 2025-07-11 15:53:12 +07:00
PalmDevs
f4c5ea15a2
fix(plugins/logging): remove __BUILD_ENV__ references 2025-07-11 15:19:57 +07:00
PalmDevs
c63e6cebc8
fix(plugins/no-track): use hooks instead of modifying directly 2025-07-10 12:40:47 +07:00
PalmDevs
705225f05a
fix(plugins/no-track): patch SentryUtils 2025-07-09 23:29:14 +07:00
PalmDevs
dd0ee59f94
feat(plugins/no-track): improve sentry blocking, noop AnalyticsTrackActionCreators 2025-07-09 20:15:46 +07:00
PalmDevs
f1869de92a
fix(plugins/no-track): only cleanup waits 2025-06-16 18:14:32 +07:00
PalmDevs
23d250d163
feat(plugins/no-track): use noop from lib, add ReloadRequired flag when enabling late, unmark essential 2025-06-14 17:55:08 +07:00
PalmDevs
2b905801c3
chore: format 2025-06-03 16:24:58 +07:00
PalmDevs
fe43fd14d4
feat: import plugins using import.meta.glob 2025-05-22 00:06:36 +07:00