Skip to content

Avoid parameter mutation during deref; add test for parameter mutation across runs#67

Open
daniellmorrisGP wants to merge 27 commits into
valtech-sd:masterfrom
GiganticPlayground:feature/improve-closure-execution-speed
Open

Avoid parameter mutation during deref; add test for parameter mutation across runs#67
daniellmorrisGP wants to merge 27 commits into
valtech-sd:masterfrom
GiganticPlayground:feature/improve-closure-execution-speed

Conversation

@daniellmorrisGP
Copy link
Copy Markdown

Summary

  • Replace cloneDeep usage with a shallow copy + deref in the closure
    handler to prevent mutating original parameters.
  • Make deref of arrays/objects operate on copied inputs.
  • Add a test ensuring closure parameter mutation does not persist
    across runs.

Details

  • src/index.ts: switch to { ...(contextExt?.parameters ?? {}) }
    before deref; copy arrays/objects in dereferenceSingleValue.
  • tests/unit/rules_worker.test.ts: new test Closure parameter
    mutation does not persist across runs.

daniellmorrisGP and others added 26 commits December 7, 2023 12:26
…one_support

Add timezone support scheduler input
Wait for any pending tasks to complete before exiting

- ClickUp: CU-86dtk2747
…eg-Rowe/title-data-change-detection

wait for pending tasks on exit
…g-Rowe/v2.16.1

Fixed missing version update in package.json
@daniellmorrisGP daniellmorrisGP changed the title Avoid parameter mutation during deref; add test for parameter mutation across runs Avoid parameter mutation during deref; add test for parameter mutation across runs Jan 16, 2026
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.

3 participants