Releases: cesarParra/expression
v1.48.0
What's Changed
- Context resolution improvements by @cesarParra in #232
Full Changelog: v1.47.0...v1.48.0
v1.47.0
What's Changed
- Dependencies updates by @cesarParra in #230
- Enhance query context resolution. Expressions within queries can now … by @cesarParra in #231
Full Changelog: v1.46.0...v1.47.0
v1.46.0
v1.45.0
What's Changed
- Fix: enhance comparison operators to support Date and Datetime types by @cesarParra in #228
Full Changelog: v1.44.0...v1.45.0
v1.44.0
What's Changed
- Fix: update spread operator handling to use addIfExpr by @cesarParra in #226
- Refactoring pipeline interpretation to first completely desugar it be… by @cesarParra in #227
Full Changelog: v1.43.0...v1.44.0
v1.43.0
What's Changed
- Pipeline captures by @cesarParra in #224
New feature: Capturing piped values:
https://cesarparra.github.io/expression/docs/piping#capturing-piped-values
- $Setup global variable implementation by @cesarParra in #225
New global variable: $Setup
https://cesarparra.github.io/expression/docs/referencing-org-data#setup
Full Changelog: v1.42.0...v1.43.0
v1.42.0
What's Changed
- Fix: nested spread operator handling by @cesarParra in #221
- Function call cache by @cesarParra in #222
This is a pretty fundamental change to the way things work behind the scenes. See https://cesarparra.github.io/expression/docs/caching for documentation on this new behavior and how to turn it off if needed.
Full Changelog: v1.41.0...v1.42.0
v1.41.0
What's Changed
- Added Curved Quotation handling to scanner and Monaco Static Resource by @adc103 in #218
- miniEditor Improvements by @adc103 in #219
- Ability to provide a custom record context besides the standard record Id by @cesarParra in #220
Adds support for custom record contexts beyond the standard record Id + @context merge expression. This allows developers to define multiple named record contexts that can be referenced in expressions using custom variable names.
E.g.
Account accountRecord = new Account(Name = 'Acme');
insert accountRecord;
CustomRecordContext customRecordContext = new CustomRecordContext('TargetAccount', accountRecord.Id);
String expressionFormula = '@TargetAccount.Name';
Object result = Evaluator.run(expressionFormula, customRecordContext, new Configuration());
Other changes and improvements
- Caching: Scanner and Parser now cache results for repeated expressions
- Context variable prefix can now be defined through the
Configurationclass. So it is now possible to now define something different than@when referencing custom context variables. To continue from the example above, this is now possible:
Configuration config = new Configuration().withGlobalContextVariablePrefix('$');
CustomRecordContext context = new CustomRecordContext('TargetAccount', accountRecord.Id);
String expression = '$TargetAccount.Name';
Object result = Evaluator.run(expression, context, config);
Bug Fixes
- CONTAINS Function: Now returns
falsewhen the second argument isnullinstead of throwing an error - Documentation: Fixed malformed descriptions in multiple API documentation files
Full Changelog: v1.40.0...v1.41.0
v1.40.0
What's Changed
- Refactor packaging scripts and remove deprecated project configuration by @cesarParra in #213
- Refactor global variable management to separate global and context-sp… by @cesarParra in #216
- Fix permission namespace handling by @cesarParra in #217
Full Changelog: v1.36.0...v1.40.0