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: support injecting globals for supporting platforms that do not have whatwg fetch as globals (e.g. Node.js) #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

n1ru4l
Copy link

@n1ru4l n1ru4l commented Nov 29, 2022

I came across this library while noticing that @aws-sdk/s3-client does not work on Cloudflare Workers. (aws/aws-sdk-js-v3#3104)

I am writing isomorphic code that should work both on Cloudflare Worker runtimes and Node.js runtimes.
Currently, this library only supports Node.js by polyfilling globals, which is a practice I would love to avoid.

Instead, this PR adds new parameters for passing fetch, Request, Headers, crypto, and TextEncoder implementations to the AwsClient and AwsV4Signer constructors.


Related Links:

Closes #22
PR in which I use @aws-sdk/s3-client (but want to move to aws4fetch) 😇

@n1ru4l
Copy link
Author

n1ru4l commented Jan 9, 2023

hey @mhart, just wanted to ask again if you are planning to consider this.

@qwerzl
Copy link

qwerzl commented Jan 6, 2025

Hi @mhart, any updates on this PR? It will also fix #61.

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.

Node.js support?
2 participants