@backblaze-labs/b2-sdk - v0.4.0
    Preparing search index...

    Variable VERSIONConst

    VERSION: string = pkg.version

    Current SDK version. Read directly from package.json so there is no second-source-of-truth to keep in sync — bumping version in package.json automatically propagates here and into the published artifact. The outbound SDK User-Agent uses the resolved product version segment so source, CI, npm pack, and prerelease builds advertise dev instead of a real-looking release number.

    Works in every runtime the SDK targets:

    • Node 22.3+, Bun, Deno: native JSON import attributes.
    • Vite builds: the JSON import is replaced with a version-only shim, and the publish path injects the release-channel define as published. Other builds leave the define absent, so runtime chunks do not carry unrelated package metadata.
    • Vitest browser mode: Vite handles the import the same way as build.