Open
Conversation
- To make mocking things for unit test easier, change the functions (that were already `function` and not arrow functions) to use `this` instead of `ls`. This allows us to easily mock the functions that send the data to S3 or various other places without having to re-implement the streams module. - ensured the unit tests all passed before and after - only test modified was one from the mock SDK, none that exercise the real pipelines
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
czirker
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
functionand not arrow functions) to usethisinstead ofls. This allows us to easily mock the functions that send the data to S3 or various other places without having to re-implement the streams module.Note
Medium Risk
Touches core stream pipeline assembly (
load/enrich/offloadandputEvent) and changes method binding semantics, which could break callers that relied on the previous closure-boundlsbehavior or unbound function references.Overview
Refactors
leo-stream.jspipeline builders (load,enrich,offload, andputEvent) to usethis(captured asself) instead of the closed-overls, so overridden stream methods are honored during runtime and testing.Updates the public SDK (
index.js) tobindload/enrich/offloadto the underlying stream instance, and simplifieslib/mock-sdk.tsby deleting the customenrich/offloadreimplementations and explicitly binding mockenrich/offloadsothisresolves tomockStreams(plus a small unit test adjustment arounddisableS3: false).Written by Cursor Bugbot for commit 788894a. This will update automatically on new commits. Configure here.