Skip to content

Add runtime checks to ensure Sentry dependencies have matching versions #5310

Closed
@timfish

Description

@timfish

Problem Statement

When users upgrade Sentry, it's key that all the Sentry dependencies get updated to the same version otherwise weird hard-to-debug things happen.

This could be checked at runtime.

Solution Brainstorm

Currently, SDK_VERSION exists only in @sentry/core.

We could add a checkVersion(version: String) function to core that is called from the packages further up the dependency tree and throws if the versions don't match. The packages further up the dependency tree would need their own SDK_VERSION to call this function with.

This wouldn't check any versions "below" core in the dependency tree although I doubt this will be an issue since users rarely depend on anything below core directly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions