github VoltAgent/voltagent @voltagent/supabase@0.1.20

Patch Changes

  • #496 0dcc675 Thanks @omeraplak! - fix: resolve SupabaseClient ESM import error

    Fixed an issue where SupabaseClient was not available as a runtime export in the ESM build of @supabase/supabase-js v2.54.0. The type is exported in TypeScript definitions but not in the actual ESM runtime.

    What Changed

    • Changed SupabaseClient to a type-only import using import { type SupabaseClient }
    • Replaced P.instanceOf(SupabaseClient) pattern matching with P.not(P.nullish) since the class is not available at runtime
    • Added type assertion to maintain TypeScript type safety

    Before

    import { SupabaseClient, createClient } from "@supabase/supabase-js";
    // ...
    .with({ client: P.instanceOf(SupabaseClient) }, (o) => o.client)

    After

    import { createClient, type SupabaseClient } from "@supabase/supabase-js";
    // ...
    .with({ client: P.not(P.nullish) }, (o) => o.client as SupabaseClient)

    This ensures compatibility with both CommonJS and ESM module systems while maintaining full type safety.

  • Updated dependencies [5968cef]:

    • @voltagent/internal@0.0.9
    • @voltagent/logger@0.1.4

Don't miss a new voltagent release

NewReleases is sending notifications on new releases.