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(stream-transform-from): create a new package #68

Merged
merged 50 commits into from
May 22, 2021

Conversation

sounisi5011
Copy link
Owner

No description provided.

+ Re-create the `Transform` object every time testing.
+ Simplify tests that differ only in options with `describe.each()`.
…call the callback passed to `_flush()` method after finish
…terable` class

+ Rename the `done` property to `transformCallback
+ Rename the `callDoneFn` method to `callTransformCallback`
+ Remove the `pushError` method and add `finish` method in its place
+ Added a test that returns multiple chunks
+ Added a test for the type of chunks contained in the source
If there is a possibility that either the `objectMode` or the `readableObjectMode` option is not `true`, the return value should not be `unknown`.
… the next chunk is needed, not after transforming a chunk
Index signatures and `boolean` types are now supported.
packages/stream-transform-from/src/index.ts Show resolved Hide resolved
packages/stream-transform-from/src/utils.ts Outdated Show resolved Hide resolved
packages/stream-transform-from/src/utils.ts Outdated Show resolved Hide resolved
…the stream

I noticed that the timing of the flow changes when using the asynchronous API.
…ning

Promise objects should only be created in tests.
Creating it during test case generation could cause Promise errors to affect unrelated code.
…the stream

We have not found a way to control when data is read from the Readable stream.
…TransformFromAsyncIterable#finish()` method

Code Climate reported:

+ Function `finish` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
…`TransformFromAsyncIterable` class

This reverts commit 28e9901.
…s after processing all chunks has been fixed in Node v15
…etting all the chunks

This bug has been fixed in Node.js v15.

+ https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V15.md#15.0.0
+ nodejs/node#34314

However, we have found a workaround that works for anything less than Node.js v15, so we will attempt to fix this bug in this package.
…eScript

The size of the package is now smaller if `src` directory contents are included.
@codeclimate
Copy link

codeclimate bot commented May 22, 2021

Code Climate has analyzed commit c307fad and detected 0 issues on this pull request.

View more on Code Climate.

@sounisi5011 sounisi5011 marked this pull request as ready for review May 22, 2021 13:07
@sounisi5011 sounisi5011 merged commit 2d7d879 into main May 22, 2021
@sounisi5011 sounisi5011 deleted the packages/node-stream-transform-from branch May 22, 2021 13:13
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.

1 participant