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

Streams do not provide the full Node.js stream API (Lack of Symbol.asyncIterator) #789

Closed
novemberborn opened this issue Nov 1, 2019 · 2 comments · Fixed by #843
Closed
Assignees
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@novemberborn
Copy link
Contributor

Query#stream() returns a stream that doesn't quite implement the Node.js stream API. For instance [Symbol.asyncIterator] is missing.

Environment details

  • Node.js version: 12.13.0
  • npm version: 6.12.1
  • @google-cloud/firestore version: 2.5.0

Steps to reproduce

  1. Create a query and call stream() on it
  2. On the resulting object, invoke [Symbol.asyncIterator]()
  3. This crashes, since that property is undefined
@bcoe bcoe added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Nov 1, 2019
@bcoe
Copy link
Contributor

bcoe commented Nov 1, 2019

@novemberborn 👋 small world 😄 thanks for the bug report 👍 have you found a reasonable workaround for the time being for the work you're doing?

@novemberborn
Copy link
Contributor Author

Hey @bcoe! Yea, I've got some code to read the stream and provide an async iterator over it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants