Skip to content

VSKI v0.5.5

  • Better filter operator parsing - Reordered regex alternation to match longer operators first (>=, <=, !=) before shorter ones (>, <, =).
  • Parentheses handling - Added stripParens() function to properly remove parentheses from grouped filter conditions.
  • internal/services/records.go - Fixed filter being ignored in field rules bypass path (line 131)
  • internal/utils/query.go - Fixed regex operator order and added parentheses stripping
// Comparison operators
client.collection("posts").getList(1, 30, { filter: "views >= 100" });
client.collection("posts").getList(1, 30, { filter: "views <= 500" });
// Logical operators
client.collection("posts").getList(1, 30, {
filter: "published = true AND views > 100"
});
client.collection("posts").getList(1, 30, {
filter: "category = 'drafts' OR views >= 1000"
});
// Parentheses grouping
client.collection("posts").getList(1, 30, {
filter: "(category = 'tech' OR category = 'news') AND published = true"
});
// LIKE operator
client.collection("posts").getList(1, 30, {
filter: "title ~ 'Post'"
});

New e2e test added: 52_filters_test.ts - Comprehensive test coverage for:

  • Equality operators (=, !=)
  • Comparison operators (>, <, >=, <=)
  • Logical operators (AND, OR)
  • LIKE operator (~)
  • Parentheses grouping
  • Combined filters with sorting
  • Combined filters with pagination
  • Filters now work correctly when field rules are active (admin or defined field rules)
  • Filter parser correctly handles >= and <= operators
  • Parentheses in filter expressions are properly handled
  • stripParens() helper function in internal/utils/query.go
  • E2E test suite for filter functionality (52_filters_test.ts)
  • Regex operator alternation reordered to match longer operators first