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

Support for Deno broke in the 1.6.0 update to the @azure/core-util package. Several places in the code only allow node to be used. #28101

Closed
eikooc opened this issue Dec 22, 2023 · 1 comment
Assignees
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)

Comments

@eikooc
Copy link

eikooc commented Dec 22, 2023

Support for Deno broke in the 1.6.0 update to the @azure/core-util package. Several places in the code only allow node to be used.

This propagates to the @azure/storage-blob@12.14.0 library where I can't login with a connection string anymore (AzureBlob.BlobServiceClient.fromConnectionString). It now fails with:

Account connection string is only supported in Node.js environment

It worked fine when the SDK thought Deno was just Node, so it broke at this commit it looks like bee878f

Originally posted by @eikooc in #13281 (comment)

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 22, 2023
@xirzec xirzec added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) Azure.Core and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 27, 2023
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 27, 2023
mpodwysocki added a commit that referenced this issue Mar 27, 2024
### Packages impacted by this PR

- @azure/core-util

### Issues associated with this PR

- #28101

### Describe the problem that is addressed by this PR

Reverts the behavior of `isNode` checks to ensure that it can still
return true for Bun and Deno. Introducing `isNodeLike` to also have the
same behavior as `isNode` so we can deprecate the former function. We
have also added `isNodeRuntime` which then checks for an explicit
Node.js runtime.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

The previous attempt was to create a `isNodeLike` and be opt-in, versus
this PR which gives the old behavior and new opt-in for strict Node
runtimes.

### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_

- #29083

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)

---------

Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>
@mpodwysocki
Copy link
Member

@eikooc we are reverting the change that broke folks and introducing some non-breaking opt-in changes so that we can support any Node-like environment such as Bun and Deno. Thanks for the heads up.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

3 participants