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

fix: UA string in Node no longer continuously extends #1448

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

jaredperreault-okta
Copy link
Contributor

No description provided.

beforeEach(() => {
jest.spyOn(mocked.features, 'isBrowser').mockReturnValue(false);
mocked.isBrowser.mockReturnValue(false);
(global as any).node = NODE_VERSION;
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this line do? As I understand, Node version is being read from process.versions.node

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That line actually does nothing, I just tested it 🤦

Copy link
Contributor

Choose a reason for hiding this comment

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

remove before merging if it's not doing anything

Comment on lines +1 to +2
const SDK_VERSION = (global as any).SDK_VERSION;
const NODE_VERSION = (global as any).NODE_VERSION;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we augment the global type locally with these variables so we don't need to cast to any?

beforeEach(() => {
jest.spyOn(mocked.features, 'isBrowser').mockReturnValue(false);
mocked.isBrowser.mockReturnValue(false);
(global as any).node = NODE_VERSION;
Copy link
Contributor

Choose a reason for hiding this comment

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

remove before merging if it's not doing anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants