- Delay initializing unimportant parts until index module (ID 0) is required
- Lower memory usage by interacting with Metro's internal module list directly
- Lookup caches have been fully implemented
- Wait caches will not exist
- Wait APIs should simply wait until a matching module is initialized. Caching is useless when the API is for this purpose.
- Get APIs will inherit the benefits from using Lookup APIs
- Filter generators now expose a `keyFor` method to generate filter keys.
- Dependency filtering is now more usable
- Destructure helpers from `byDependencies` instead:
- `looseDeps` -> `byDependencies.loose`
- `relativeDep` -> `byDependencies.relative`
- Nested dependencies check can now be done with relative checks via `byDependencies.relative.withDependencies`
- Dependency filtering is now more performant
- Relative dependencies are done by bit manipulation instead
- Reverted from stack system to recursion
- Skip relative dependencies resolution (there is no need for it)
- Filter keys for `byDependencies` fixed
Plugins
- Settings: Plugins page is now semi-functional
- No Track: Added new plugin
- Developer Settings: Clean up properly
- Logging: Log in preInit stage
- Staff Settings: Add ReloadRequired flags when late-running
@revenge-mod/init
- Moved to the top-level src/index.ts instead
@revenge-mod/modules
- Switch `exports` and `id` parameters in finders APIs
- Lookups now return an array of exports and ID instead of just exports
- Lookup ID APIs have been removed
- Add `finders.get` helper, a new alternative for `finders.find`
- Corrected documentation for subscription APIs
@revenge-mod/plugins
- Added new APIs for plugins to allow running during pre-init stages
- Added `unscoped.modules.finders.get*`
- Added `unscoped.react.native`
@revenge-mod/react
- native: Added `onRunApplication` and `onRunApplicationFinished`
@revenge-mod/utils
- callbacks: Add `noopFalse`
- promises: Fix `allSettled`
- promises: Add `sleep`
- `find` APIs are merely a wrapper for `wait` and `lookup` APIs. I think the developer should already know whether the module they're trying to get is initialized already or not by the time their plugin runs.
In the `init` phase, most important packages such as React, React Native, React JSX Runtime, Native modules, etc. are already initialized. So, the `lookup` APIs can be used here instead.
- While I am not sure what exactly gets initialized after `init` until `start`, you can simply do trial and error to see if the module is initialized or not. If it is not, you can use `wait` API to wait for it to be initialized.
- `lookup` can also be used inside `wait` if you know a certain module would be initialized after another module.
With all the above reasons, I think the `find*` APIs are redundant and should be removed.