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

Move from teeny-request to standard Fetch API #2356

Closed
iRyusa opened this issue Nov 8, 2023 · 5 comments
Closed

Move from teeny-request to standard Fetch API #2356

iRyusa opened this issue Nov 8, 2023 · 5 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@iRyusa
Copy link

iRyusa commented Nov 8, 2023

Is your feature request related to a problem? Please describe.
Using this lib with Bun is crashing when uploading a file.

1 | (function (stream, autoAllocateChunkSize) {"use strict";
                       ^
TypeError: undefined is not an object
      at lazyLoadStream (:1:20)
      at getReader (:1:20)
      at readStreamIntoSink (:1:32)
      at readableStreamIntoText (:1:20)
      at /.../node_modules/teeny-request/build/src/index.js:223:8
      at processTicksAndRejections (:55:76)

Describe the solution you'd like
Now than fetch is standard in Node/Bun/Deno/... I don't see teeny-request is needed as dep.

Describe alternatives you've considered
Overriding teeny-request by rexporting fetch locally, not ideal but at least it behave the same and the error goes away.

Additional context
n/a

@iRyusa iRyusa added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Nov 8, 2023
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Nov 8, 2023
@ddelgrosso1
Copy link
Contributor

Thanks for opening an issue @iRyusa. We are currently still supporting Node 14+ which means we are unable to make the move to the NodeJS Fetch API that was added in Node 18. However, it is something we have in mind when we move to the appropriate minimum version.

@ddelgrosso1 ddelgrosso1 removed the priority: p3 Desirable enhancement or fix. May not be included in next release. label Nov 8, 2023
@ddelgrosso1
Copy link
Contributor

A quick update, we are in the planning phases of moving away from teeny-request in favor of utilizing the auth client which by extension uses gaxios under the hood. The folks working on gaxios are definitely interested in moving that library away from node-fetch in the future once the minimum supported version moves to Node 18.

@iRyusa
Copy link
Author

iRyusa commented Mar 13, 2024

Really nice to hear 🙌

@ddelgrosso1
Copy link
Contributor

Adding link for tracking / knowledge purposes googleapis/gaxios#618

@danielduhh
Copy link

Closing this as it should be fixed in gaxios: googleapis/gaxios#625

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants