Skip to content

Releases: ryupold/vode

1.8.0

09 Mar 20:17

Choose a tag to compare

  • rename SubStateContext to SubContext
  • add mergeProps utility
  • JSDoc in vode.d.ts

1.7.4

07 Mar 10:24

Choose a tag to compare

  • fix exports in package.json

1.7.3

06 Mar 18:28

Choose a tag to compare

  • add declaration file dist/vode.d.ts
  • fix exports in package.json

1.7.2

24 Feb 23:59

Choose a tag to compare

improve compatibility with node ecosystem

1.7.1

13 Dec 18:18

Choose a tag to compare

  • add ProxySubContext for easier state context forking

1.7.0

13 Dec 14:10

Choose a tag to compare

  • add type-safe state context API with Proxy
    Replaces the key based state context with a proxy-based
    implementation to simplify the API and provide a more
    intuitive way to access and manipulate nested state.
    const state = createState<StateType>({
        user: {
            profile: {
                settings: { theme: 'dark', lang: 'es' }
            }
        }
    });
    
    const settingsCtx = context(state).user.profile.settings;
    
    const settings = settingsCtx.get()!; // { theme: 'dark', lang: 'en' }
  • deprecate KeyStateContext (KeyPath) as it lead to a dramatically increased compile time

1.6.8

10 Dec 13:15

Choose a tag to compare

  • improve types by using interfaces where recommended

1.6.7

05 Dec 14:56

Choose a tag to compare

  • allow optional path objects for KeyPaths
    this eliminates the need to have non-nullable keys in sub-states that are addressed by KeyStateContext
    export type AppExampleState = {
        foobar: {
            example1: {
                app: { counter: number; text: string; },
            },
            example2?: {
                app: { counter: number; text: string; },
            },
            example3?: {
                app?: { counter: number; text: string; },
            },
        },
    };
    
    const state = createState<AppExampleState>({
        foobar: {
            example1: {
                app: {
                    counter: 0,
                    text: 'Hello, World!',
                },
            },
        }
    });
    
    const ctx1 = new KeyStateContext<typeof state, { counter: number; text: string; }>(state, "foobar.example1.app");
    const ctx2 = new KeyStateContext<typeof state, { counter: number; text: string; }>(state, "foobar.example2.app");
    const ctx3 = new KeyStateContext<typeof state, { counter: number; text: string; }>(state, "foobar.example3.app");
    in this example foobar.example1.app, foobar.example2.app and foobar.example3.app are the only valid keys

1.6.6

01 Dec 20:51

Choose a tag to compare

  • add ES5 & AMD builds for older browsers

1.6.5

29 Nov 23:23

Choose a tag to compare

  • defuse nested Vodes during container defusal