Skip to content

Releases: AckeeCZ/petrus

v7.0.0

05 May 13:52
Compare
Choose a tag to compare

Added

  • ✅ Add test for isTokenExpired util [232392c]

Changed

  • ♻️ Obtain access token without relying on the current API state from redux store [c2d1c38]

💥 Breaking 💥

  • 🔥 Remove deprecated getAuthStateChannel [ef1c7e3]
  • 🔥 Remove deprecated authorizable HOC [3f8733b]
  • 🔥 Remove already depreacted apply access token externally feature [72c7c22]

v6.0.0

17 Jun 08:35
Compare
Choose a tag to compare

@ackee/[email protected]

  • ✅ Migration to TS – strict mode

  • 🎉 Setup typedoc → Auto generated Wiki with API interfaces

  • ✨ Usage example avail. within codesandbox & integrate codesandbox to CI

  • ♻️ Extend PetrusError with type: PetrusErrorType and originalError: Error props & export PetrusErrorType enum and isPetrusError(error: any): boolean util. Example

  • 💥 replace reducerKey with selector function so developer can place petrus reducer at arbitrary depth and path in redux store.

    import { configure } from '@ackee/petrus';
    
    configure({
    -      reducerKey: 'auth',
    +      selector: state => state.auth,  
    })
  • 💥 No more generics at configure method. If you want override internal interfaces (PetrusAppRootState, PetrusUser, PetrusCredentials, PetrusTokens), you can achieve it like this:

    declare module '@ackee/petrus' {
        interface ConfigurePetrusAppRootState {
            value: RootState;
        }
    
        interface ConfigurePetrusUser {
            value: AuthUser;
        }
    
        interface ConfigurePetrusCredentials {
            value: Credentials;
        }
    
        interface ConfigurePetrusTokens {
            value: Tokens;
        }
    }