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

[core-util] Fix issue with Deno showing up as isNode at runtime. #27459

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

xirzec
Copy link
Member

@xirzec xirzec commented Oct 18, 2023

Packages impacted by this PR

@azure/core-util

Issues associated with this PR

Fixes #27077

Describe the problem that is addressed by this PR

Deno implemented process.versions.node, which is how we detect that we are running inside a Node environment. Since Deno actually is much closer to a browser environment, this is not what was expected at runtime and resulted in things like loading the browser version of pipeline policies that throw due to not being implemented/relevant in browsers.

I kept this really simple by making isNode check that isDeno is false. Since isNode was previously false inside Deno environments, I don't think this will break anything.

Provide a list of related PRs (if any)

#27090

@xirzec xirzec self-assigned this Oct 18, 2023
@xirzec xirzec requested a review from mpodwysocki October 18, 2023 22:08
@xirzec xirzec added the Client This issue points to a problem in the data-plane of the library. label Oct 18, 2023
@xirzec xirzec marked this pull request as ready for review October 18, 2023 22:09
@xirzec xirzec enabled auto-merge (squash) October 18, 2023 22:11
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@xirzec xirzec merged commit bee878f into main Oct 18, 2023
16 checks passed
@xirzec xirzec deleted the fixDenoDetection branch October 18, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure SDK on Deno is broking - proxyPolicy is not supported in browser environment
3 participants