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

Commits on May 19, 2021

  1. chore(stream-transform-from): create directory for `@sounisi5011/stre…

    …am-transform-from` package
    sounisi5011 committed May 19, 2021
    Configuration menu
    Copy the full SHA
    5b703eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b2f95c View commit details
    Browse the repository at this point in the history

Commits on May 20, 2021

  1. Configuration menu
    Copy the full SHA
    7bead5c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    529d175 View commit details
    Browse the repository at this point in the history
  3. feat(stream-transform-from): add transformFrom() function and `Tran…

    …sformFromAsyncIterable` class
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    ad40522 View commit details
    Browse the repository at this point in the history
  4. fix(stream-transform-from): change the complex createSource() metho…

    …d to a simple `createSource()` function
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    9d5522a View commit details
    Browse the repository at this point in the history
  5. test(stream-transform-from): fix the tests

    + Re-create the `Transform` object every time testing.
    + Simplify tests that differ only in options with `describe.each()`.
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    ddcc202 View commit details
    Browse the repository at this point in the history
  6. refactor(stream-transform-from): use the catch() method instead of …

    …the `try ... catch` statement
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    fdb758c View commit details
    Browse the repository at this point in the history
  7. fix(stream-transform-from): don't call the callback multiple times & …

    …call the callback passed to `_flush()` method after finish
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    26c1fee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3f42981 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b85833e View commit details
    Browse the repository at this point in the history
  10. refactor(stream-transform-from): refactoring the `TransformFromAsyncI…

    …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
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    2056ed3 View commit details
    Browse the repository at this point in the history
  11. test(stream-transform-from): add tests

    + Added a test that returns multiple chunks
    + Added a test for the type of chunks contained in the source
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    5d7c52c View commit details
    Browse the repository at this point in the history
  12. fix(stream-transform-from): fix the type definition of return values

    If there is a possibility that either the `objectMode` or the `readableObjectMode` option is not `true`, the return value should not be `unknown`.
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    112097c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    65e352b View commit details
    Browse the repository at this point in the history
  14. fix(stream-transform-from): transformCallback should be called when…

    … the next chunk is needed, not after transforming a chunk
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    e5e961d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6c4d977 View commit details
    Browse the repository at this point in the history
  16. fix(stream-transform-from): fix InputChunkType

    Index signatures and `boolean` types are now supported.
    sounisi5011 committed May 20, 2021
    Configuration menu
    Copy the full SHA
    b789611 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    39538f2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    8344c03 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d1397da View commit details
    Browse the repository at this point in the history

Commits on May 21, 2021

  1. test(stream-transform-from): fix the timing test for data flowing in …

    …the stream
    
    I noticed that the timing of the flow changes when using the asynchronous API.
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    0280830 View commit details
    Browse the repository at this point in the history
  2. test(stream-transform-from): eliminate the PromiseRejectionHandledWar…

    …ning
    
    Promise objects should only be created in tests.
    Creating it during test case generation could cause Promise errors to affect unrelated code.
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    e0a882e View commit details
    Browse the repository at this point in the history
  3. test(stream-transform-from): fix the timing test for data flowing in …

    …the stream
    
    We have not found a way to control when data is read from the Readable stream.
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    551485b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e44a275 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c1eb3d View commit details
    Browse the repository at this point in the history
  6. refactor(stream-transform-from): reduce Cognitive Complexity in the `…

    …TransformFromAsyncIterable#finish()` method
    
    Code Climate reported:
    
    + Function `finish` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    38d4cfe View commit details
    Browse the repository at this point in the history
  7. test(stream-transform-from): add tests that inherit from the `Transfo…

    …rmFromAsyncIterable` class
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    28e9901 View commit details
    Browse the repository at this point in the history
  8. revert:"test(stream-transform-from): add tests that inherit from the …

    …`TransformFromAsyncIterable` class
    
    This reverts commit 28e9901.
    sounisi5011 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    5a87d04 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    631e02d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    86ce878 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    768b841 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2021

  1. Configuration menu
    Copy the full SHA
    2830d23 View commit details
    Browse the repository at this point in the history
  2. test(stream-transform-from): the bug with not being able to get error…

    …s after processing all chunks has been fixed in Node v15
    sounisi5011 committed May 22, 2021
    Configuration menu
    Copy the full SHA
    e56a0fa View commit details
    Browse the repository at this point in the history
  3. test(stream-transform-from): fix the bug that no error occurs after g…

    …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.
    sounisi5011 committed May 22, 2021
    Configuration menu
    Copy the full SHA
    40406fc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    934e9a1 View commit details
    Browse the repository at this point in the history
  5. test(stream-transform-from): make the conditional branches of the tes…

    …t code readable and organized
    sounisi5011 committed May 22, 2021
    Configuration menu
    Copy the full SHA
    62033f1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    394a23e View commit details
    Browse the repository at this point in the history
  7. build(stream-transform-from): disable the inlineSources option in Typ…

    …eScript
    
    The size of the package is now smaller if `src` directory contents are included.
    sounisi5011 committed May 22, 2021
    Configuration menu
    Copy the full SHA
    6875a8a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    86475fb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ba85879 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    29d53cb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    beef9d4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8ef282c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f516fd0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9a83da9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    62d0f73 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4be84c4 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    8d33a5a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c307fad View commit details
    Browse the repository at this point in the history