2025-03-30 23:32:17 +07:00
|
|
|
{
|
|
|
|
|
"name": "@revenge-mod/modules",
|
|
|
|
|
"private": true,
|
|
|
|
|
"type": "module",
|
|
|
|
|
"exports": {
|
|
|
|
|
"./finders/filters": {
|
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
|
|
|
"default": "./src/finders/filters/index.ts"
|
2025-03-30 23:32:17 +07:00
|
|
|
},
|
2025-08-13 01:27:49 +07:00
|
|
|
"./finders": {
|
|
|
|
|
"default": "./src/finders/index.ts"
|
2025-03-30 23:32:17 +07:00
|
|
|
},
|
|
|
|
|
"./metro/subscriptions": {
|
|
|
|
|
"default": "./src/metro/subscriptions/index.ts"
|
|
|
|
|
},
|
2025-07-17 16:55:08 +07:00
|
|
|
"./metro/patches": {
|
|
|
|
|
"default": "./src/metro/patches.ts"
|
|
|
|
|
},
|
2025-05-09 19:05:31 +07:00
|
|
|
"./metro/utils": {
|
|
|
|
|
"default": "./src/metro/utils.ts"
|
|
|
|
|
},
|
2025-03-30 23:32:17 +07:00
|
|
|
"./native": {
|
2025-08-19 22:02:17 +07:00
|
|
|
"default": "./src/native/index.ts"
|
|
|
|
|
},
|
2025-04-29 18:25:46 +07:00
|
|
|
"./types": {
|
2025-06-08 18:47:42 +07:00
|
|
|
"types": "./src/types.ts"
|
2025-03-30 23:32:17 +07:00
|
|
|
}
|
|
|
|
|
}
|
2025-09-10 00:56:53 +07:00
|
|
|
}
|