Upgrading
← Documentation home · Installation
This guide covers version-to-version changes. For migrating from other libraries, see Comparisons.
0.4 → 1.0
Breaking: the asyncConditions engine option has been removed.
Runtime async detection already handles async conditions — use evaluateAsync(), explainAsync(), or permittedAsync() when rules contain promise-returning conditions.
Before (0.4.x):
typescript
const engine = new AccessEngine<MySchema>({
schema: {} as MySchema,
asyncConditions: true,
});
await engine.evaluateAsync(user, "invoice:approve", "invoice");After (1.0.0):
typescript
const engine = new AccessEngine<MySchema>({
schema: {} as MySchema,
});
await engine.evaluateAsync(user, "invoice:approve", "invoice");If you call sync methods (evaluate, explain, permitted) against async conditions, the engine throws with a message pointing to the async API — no opt-in flag required.
→ AccessEngine reference · Async conditions
0.3 → 0.4
Behavior change: async conditions no longer fail silently when used with sync APIs.
evaluateAsync()andexplainAsync()work without theasyncConditionsflag- Calling
evaluate()on async conditions throws a clear error (or use*Asyncmethods) - The
asyncConditionsoption was deprecated in 0.4.0 and removed in 1.0.0
Migration:
- Replace
engine.evaluate(...)withengine.evaluateAsync(...)wherever conditions return promises - Remove
asyncConditions: truefrom engine options (required before 1.0.0)