Purpose
The pure core compares versions and resolves disabled, up-to-date, recommended and required update states. A hook factory adapts platform-specific fetch/open behavior. Loading and network errors do not force an update wall.
Public exports
| Subpath | Target |
|---|---|
. | ./src/index.ts |
./core | ./src/core.ts |
./create-hook | ./src/create-hook.ts |
These paths come from packages/app-update/package.json. A . entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.
How to extend
Keep policy testable in core and platform effects in the adapter. Distinguish an optional recommendation from a required supported-version boundary. Verify malformed and unavailable remote configuration.
Read the native update policy guide for the full flow.