v2.0.0
Breaking risk
Breaking changes
- Remove string-mode from can and cannot
- Remove ctx. alias for contextual operands
- Rename can/cannot to allow/deny
Notable features
- Add batch permission checks
- Throw error on missing condition keys (core)
Full changelog
🚀 Enhancements
- ⚠️ Remove string-mode from can and cannot (ac2491d)
- ⚠️ Remove ctx. alias for contextual operands (eebd795)
- core: Throw error on missing condition keys (925435d)
- Add batch permission checks (8a49f31)
- ⚠️ Add type-safe condition builder DSL (23be1e4)
🩹 Fixes
- Handle BigInt and Date in cache serialization (3aa0fa5)
- Clean stableStringify set and improve types (86c32b7)
- docs: Rename condition column, add getRules (76e16f9)
- docs: Correct column name in SQL query (792583c)
💅 Refactors
- ⚠️ Drop strict mode, always validate conditions (1435f5f)
- storage: ⚠️ Make cache.has required (2e603b6)
- ⚠️ Remove clearRules and make setRules atomic (23581d4)
- ⚠️ Remove Context generic and rename types (7565575)
- ⚠️ Rename can/cannot to allow/deny (4528d0c)
- tests: Restructure test suite, eliminate
as any, and reach 100% coverage (37c22b8)
📖 Documentation
- Add index on rules table example (bca4d54)
- Add assignRuleToRole method to ScopedStorage example (d7e5d64)
- Remove dead links (cc9dd89)
🏡 Chore
⚠️ Breaking Changes
- ⚠️ Remove string-mode from can and cannot (ac2491d)
- ⚠️ Remove ctx. alias for contextual operands (eebd795)
- ⚠️ Add type-safe condition builder DSL (23be1e4)
- ⚠️ Drop strict mode, always validate conditions (1435f5f)
- storage: ⚠️ Make cache.has required (2e603b6)
- ⚠️ Remove clearRules and make setRules atomic (23581d4)
- ⚠️ Remove Context generic and rename types (7565575)
- ⚠️ Rename can/cannot to allow/deny (4528d0c)
❤️ Contributors
- Herdi Tr. (@Hrdtr)