Skip to content

JavaScript client library doesn't work under Bun #2379

Description

@svix-jbrown

The JS client library can't be imported from Bun, and the tests don't work in bun:

-------------------------------
1 | import { Svix } from "..";
2 | import type { SvixRequestContext } from "../request";
3 | 
4 | export class SvixInternal extends Svix {
                                      ^
ReferenceError: Cannot access 'Svix' before initialization.
      at svix-webhooks/javascript/src/api_internal/index.ts:4:35

The test suite doesn't work because bun requires that you have a describe() block and doesn't supported nested test calls.

Ideally at the end of this ticket, the library would work equally well under Node and Bun, and the test suite would run automatically under Bun.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions