Skip to content

Releases: expr-lang/expr

v1.16.9

27 May 10:27
55ff9aa
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

In this release:

  • Fixed function calls with int64 params. #663

v1.16.8

25 May 21:36
b45ee4f
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`now() - created_at < duration("24h")`)

In this release:

  • Added checks for nil before string casts in VM (#654)
  • Added int overflow checks. 45c1ae7
  • Improved lexer (#653)
  • Improved error messages for index out of bounds errors. 6cf0edb
  • Fixed: invoke the Deref function as needed for the function arguments. (#651)
  • Fixed build on 386 arch. cae6003

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.

v1.16.7

08 May 20:28
1a5df77
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`now() - created_at < duration("24h")`)

In this release:

  • Improved now() and date() type validation
  • Updated documentation

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.

v1.16.6

08 May 08:11
83d67e7
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`now() - created_at < duration("24h")`)

In this release:

  • Added an option to set default timezone for date() and now() builtins with expr.Timezone("Europe/Zurich")
  • Added a new timezone("UTC") builtin
  • Fixed double-escaping of keys in map printing (#640)
  • Starting from this release, Expr has no dependencies go.mod (#618, #642)

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.

v1.16.5

16 Apr 21:32
6157395
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

output, err := expr.Eval("metric > 100", map[string]any{
    "metric": 200,
})

In this release:

  • Added compiler optimization for boolean operations between all, any, none functions (#626)
  • Added optional predicate to sum() builtin (#592)
  • Added sum() compiler optimization c2b609e edb1b5a
  • Improved WithContext to work for methods on env struct (#602)
  • Improved count() builtin: now predicate is optional 725b702
  • Fixed printing of combinations conditional with binary nodes 6157395
  • Fixed optional chaining to return proper nil 5804ccb

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.

v1.16.4

10 Apr 09:02
e7e72b9
Compare
Choose a tag to compare

This release reverts a wrong compiler optimization for all, any, one, none predicates (#555).

The optimization contains error logic which can lead to a wrong expression.

It is highly recommended to upgrade to the latest version.

v1.16.3

27 Mar 10:21
d523107
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`let x = 2 + 2; x ^ x`)
output, err := expr.Run(program, env)

In this release:

  • Improved printing for maps: {(foo + bar): 42}

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes expressions explanation, performance profiling, and more.

v1.16.2

20 Mar 22:19
3452f5b
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`now() - created_at < duration("24h")`)
output, err := expr.Run(program, env)

In this release:

  • Added spans (#584)
  • Added support for chained comparison 1 < 2 < 3 (#581)
  • Improved builtin int: unwraps underlying int value (#611)
  • Improved builtin min, max, sum, mean, median (#580, #576)
  • Improved bools comparison to be without reflect.DeepEqual (#585)
  • Fixed case with expr.Operator passes before expr.Env caused error (#606)
  • Fixed -1 not in [] expressions (#590)

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes expressions explanation, performance profiling, and more.

v1.16.1

18 Feb 09:18
3196510
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`now() - created_at < duration("24h")`)
output, err := expr.Run(program, env)

In this release:

  • Fixed recursive operator overloading bug (#548, #554)
  • Fixed AST printing of ?.[ operator (ffaec9e)
  • Fixed string literal slicing error (#543)
  • Compilation performance improvements (95084fb)
  • Improved functions call performance (ed89647)
  • Refactored groupBy() and sortBy() builtins (#562)
  • Added operator overloading with expr.Function() (#408)
  • Added concat() builtin (#565)
  • Added reverse() builtin (#553)
  • Added program.Locations() method (e53cefe)
  • Added optional array access array?.[42] (#550)
  • Added compiler optimization for jump opcodes (#545)
  • Added compiler optimization for boolean operations with all, any, one, none functions (#555)

Expr Editor

The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.

Expr Pro

Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.

v1.16.0

24 Jan 23:00
564b637
Compare
Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.

expr repl demo

In this release:

  • Improved VM speed by 5%-15% (#521)
  • Improve AST printing for boolean operators
  • Improved type checker (#527)
  • Added option to override built-ins (#522)
  • Added method to get AST tree from program: .Node() (#528)
  • Added new Valuer patcher (#525)
  • Added expr.WarnOnAny() option
  • Changed expr.As*() options behavior to accept any by default
  • Fixed type checker to visit all arguments of func even if arguments count mismatch
  • Fixed type propagation in AST for any type in type checker
  • Fixed context patcher (#526)
  • Fixed race condition in working with variables (#523)
  • Fixed pipeline and call parsing

Addition

In addition to open-source version of Expr, we have an embeddable Expr Editor and Expr Pro packages.