Skip to content

Ridu v0.6.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 04:28

Ridu 0.6.0 makes Go filters shorter to write and documents much cheaper to read and save. Filter helpers take field names as strings and compare them with ordinary Go values, so query.Equal("owner", ctx.Actor.ID) replaces a path, a wrapped value and an ignored error. The CMS still builds into one Go binary with its static admin embedded.

Try Ridu

Install Go 1.25.13 or newer, Node.js 24 and Bun 1.4.0, then run:

bun create ridu@0.6.0 my-ridu-app
cd my-ridu-app
bun install
bun run dev

Choose SQLite for a local trial without a separate database service. See the quickstart and deployment guide.

What changed

  • query.Equal, NotEqual, In, GreaterThan, GreaterThanEqual, LessThan, LessThanEqual, Contains and Like take a field name such as "seo.title" and compare with strings, booleans, integers, floats and named types of those. A malformed name written in code panics; query.ParsePath still returns an error for names from input.
  • For names and values known only at run time, the same helpers accept a query.Path, such as one from ParsePath or validated once when an access rule is built, and a query.Value, such as query.Null(), query.DateTime(t) or a value decoded from a request.
  • query.Exists("image", true) matches documents that have a value for a field, and false matches documents without one.
  • query.Asc("title") and query.Desc("createdAt") build sort terms. query.NewSort remains for directions chosen at run time.
  • query.DateTime(t) converts a time.Time to the text a date-and-time field stores, so query.GreaterThan("publishedAt", query.DateTime(time.Now())) compares correctly with admin-saved values, createdAt and updatedAt.
  • And and Or share immutable condition nodes and merge nested conditions of the same kind. This reduces allocations when building filters; flattening still copies the child pointers into a new slice.
  • The API reference shows generic constraints such as query.FieldPath with their type sets.
  • Document values use a direct JSON codec with fewer intermediate objects for PostgreSQL and SQLite reads and writes of groups, arrays, blocks and rich text, and REST request bodies. The output remains compatible with encoding/json; differential tests and fuzzing check the encoding and decoding edge cases.
  • Generated typed collection handles encode each document once instead of field by field.
  • On 64-bit platforms, store.Value is 56 bytes instead of 72, reducing the memory occupied by each value.
  • Value.IsZero() reports the zero store.Value, such as a missing map entry.

Breaking changes and upgrading from 0.5.x

Run the new CLI's upgrade command from the project root, then review and commit the result:

bunx @riducms/cli@0.6.0 upgrade 0.6.0

Filters that wrap literal names and values, such as query.Equal(query.Field("status"), query.String("published")), keep working and can be shortened to query.Equal("status", "published"). Two cases need a change:

  • query.In(path) with no values cannot infer the value type. Pass an empty slice, as in query.In(path, []string{}...).
  • Integers beyond ±2^53 and NaN or infinite floats now panic in the helpers instead of losing precision. Compare such values as strings.

store.ValueKind is now a small integer type with a String() method. Comparisons with store.ValueNull and the other constants are unchanged. Replace value.Kind() == "" with value.IsZero(), and string(value.Kind()) with value.Kind().String(): a plain conversion no longer produces the kind's name.

And(And(a, b), c) now produces one And with three conditions. Adapters and code that read Expression.Node() see the flatter tree; the matched documents are unchanged.

Data and deployment compatibility

Update the Go framework, CLI, all @riducms/* packages and official plugins together to 0.6.0. Regenerate application contracts and rebuild the embedded admin before deploying.

The schema manifest, project-command protocol, REST/SDK wire contracts, plugin API markers and admin-plugin contracts retain their current formats. The JSON codec preserves the stored JSON representation. This release introduces no database migration format change or historical migration rewrite; review any migration plan caused by your own schema changes as usual.

PostgreSQL, SQLite and MongoDB retain their documented deployment boundaries. MongoDB qualification remains limited to generated starter/blank applications with MongoDB Community 8.2.9 on a writable, authenticated, TLS-verified three-member replica set on Linux x86-64.