Skip to content

Releases: pedrokehl/caminho

v1.7.2

19 Aug 08:10
Compare
Choose a tag to compare

Bug fixes

Bug

The system had a bug which caused inconsistencies in the back-pressure system that eventually lead to stuck process.
This happened when there were many executions (.run()) for the same reused Caminho instance, so when some of the operators threw an error in the execution, the back-pressure system would not decrement the pending items for the items that has generated but haven't finished all the operators, therefore, when back-pressure system compared the maxItemsFlowing with the current number of items flowing, it was still accounting for items that were not in memory anymore.
Over time, the Caminho instance was allowing less and less items to be in memory, according to the number of items that were flowing during a failed execution, so at some point, the number of "ghost" items would reach maxItemsFlowing and stop processing completely.

Fix

The back-pressure system currently accounts all runs for a given Caminho instance, this gives a very good control of how many items can be in memory at the same time, making your process memory allocation very predictable, and even executions more efficient, the goal of this fix was to NOT change this behaviour, therefore, fixing this bug took more effort than simply changing the back-pressure to be per execution.
The fix consisted of generating a runId for each execution, so this ID allows to control the back-pressure isolated, and reset all the "pending items" for a given run whenever the flow for the given execution is ended, no matter if it had an error or not.
In the fix, the runId was intentionally not part of the ValueBag, this was done to avoid internal values of Caminho being available to the step functions, therefore, the OperatorApplierWithRunId was created.

v1.7.1

08 Aug 18:23
Compare
Choose a tag to compare

Bug fixes

errors in pipe() operator now won't cause a bad consistency in the total maxItemsFlowing controlling system for backpressure

This bug would cause the backpressure to be considering itemsFlowing more than it should, and if number of errors would reach the defined maxItemsFlowing, the Caminho run would get stuck.

Dependencies

  • Bump braces from 3.0.2 to 3.0.3

v1.7.0

18 Mar 20:51
Compare
Choose a tag to compare

Features

Allow logging for filter() functions, along with forwarding of errors from it to the onStepFinished hook

Bug fixes

reduce() now won't cause a -1 effect on the Backpressure

This bug would cause the backpressure to be considering itemsFlowing as -1 after each run that got a reduce operation.
It got fixed and tests were written to avoid this ever happening again.

v1.6.0

13 Mar 19:16
Compare
Choose a tag to compare

Features

Call onStepFinished on error, and send the error as parameter to the function

It allows a better error tracking and logging

Breaking Changes

Remove the keepLastValues parameter of run()

The parameter was just bring complexity and confusion to the usage, so it's better removed.

Bug fixes

Avoid seed mutation on .reduce() even when reduceFn does mutation to "acc" param

RxJs doesn't create a structureClone from the seed parameter when start processing, while developers can implement a reduce function that mutates the "acc", so to safely avoid conflicts between different runs, we copy the seed for new runs

v1.5.0

10 Mar 23:16
Compare
Choose a tag to compare

Full compatibility to web browsers in addition to NodeJS, Deno and Bun.
The build now generate outputs for ESM, ESM5 and CJS, which are automatically picked when imported by common package bundlers.

v1.4.2

10 Mar 16:55
Compare
Choose a tag to compare
  • Remove "base" types because JSR doesn't work well with it when generating docs

v1.4.1

10 Mar 16:42
a4bb8ce
Compare
Choose a tag to compare
  • Improve methods documentation and README
  • Remove unnecessary @types/node and engines.node
  • Stop running "prepublish" on npm install, replace with "prepublishOnly"
  • JSR now requires node_modules on publish

v1.4.0

08 Mar 08:33
9f54697
Compare
Choose a tag to compare
  • Update rxjs from 7.5.7 to 7.8.1
  • Select files for publishing to JSR
  • Update devDependencies
  • Rename from to fromGenerator
  • Improve types and naming conventions

v1.3.3

07 Mar 18:40
5de6dc3
Compare
Choose a tag to compare

Add publish to JSR

v1.3.2

05 Mar 21:37
Compare
Choose a tag to compare

Initial Release in Github

Features included