Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Use SDK_VERSION for hub API version #9732

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/core/src/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { DEFAULT_ENVIRONMENT } from './constants';
import { DEBUG_BUILD } from './debug-build';
import { Scope } from './scope';
import { closeSession, makeSession, updateSession } from './session';
import { SDK_VERSION } from './version';

/**
* API compatibility version of this hub.
Expand All @@ -35,7 +36,7 @@ import { closeSession, makeSession, updateSession } from './session';
*
* @hidden
*/
export const API_VERSION = 4;
export const API_VERSION = parseFloat(SDK_VERSION);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, will this actually work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it will - the string gets coerced to a float (only taking into account major/minor)


/**
* Default maximum number of breadcrumbs added to an event. Can be overwritten
Expand Down