-
Notifications
You must be signed in to change notification settings - Fork 369
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 iterables in file#save (#2202) #2203
Conversation
@matthieusieben thank you for the contribution, we always appreciate getting them. Let me check regarding the disabling of retries but I think we will have to find another way around as this would not adhere to the documentation and would probably be pretty specific to Node storage when compared to our other languages. |
24a8131
to
5d229ed
Compare
Here is a summary of the changes that were added:
|
5d229ed
to
36f1547
Compare
I think this is looking pretty good. Looks like some issues with tests on Node 12. Ideally I would like to get this in before the move to 14. |
36f1547
to
9f4e7e5
Compare
The reason node-12 is failing is that https://nodejs.org/docs/latest-v12.x/api/stream.html#stream_stream_pipeline_streams_callback How should I adapt to this limitation of Node 12 ? |
One approach would be to add the following when // In node 12, pipeline() only supports "Stream"s
if (!('pipe' in data) || typeof data.pipe !== 'function') {
const nodeVersion = Number(process.versions.node.split('.')[0]);
if (!nodeVersion || nodeVersion < 14) {
throw new Error('Saving using an iterable requires Node 14 (or higher)');
}
} And to catch that particular error in tests. What do you think ? |
Removed do not merge as |
* feat: support iterables in file#save (#2202) (#2203) * Revert "feat: support iterables in file#save (#2202) (#2203)" (#2270) This reverts commit c0d9d58. * Revert "Revert "feat: support iterables in file#save (#2202) (#2203)" (#2270)" This reverts commit 49327ff. --------- Co-authored-by: Matthieu <matthieusieben@users.noreply.github.com>
…eapis#2203)" (googleapis#2270) This reverts commit c0d9d58.
…"" (googleapis#2271) * feat: support iterables in file#save (googleapis#2202) (googleapis#2203) * Revert "feat: support iterables in file#save (googleapis#2202) (googleapis#2203)" (googleapis#2270) This reverts commit c0d9d58. * Revert "Revert "feat: support iterables in file#save (googleapis#2202) (googleapis#2203)" (googleapis#2270)" This reverts commit 49327ff. --------- Co-authored-by: Matthieu <matthieusieben@users.noreply.github.com>
BEGIN_COMMIT_OVERRIDE |
…eapis#2203)" (googleapis#2270) This reverts commit c0d9d58.
…"" (googleapis#2271) * feat: support iterables in file#save (googleapis#2202) (googleapis#2203) * Revert "feat: support iterables in file#save (googleapis#2202) (googleapis#2203)" (googleapis#2270) This reverts commit c0d9d58. * Revert "Revert "feat: support iterables in file#save (googleapis#2202) (googleapis#2203)" (googleapis#2270)" This reverts commit 49327ff. --------- Co-authored-by: Matthieu <matthieusieben@users.noreply.github.com>
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #2202 🦕
BEGIN_COMMIT_OVERRIDE
feat: support iterables in file@save
END_COMMIT_OVERRIDE