Skip to content

Ridu v0.7.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 16:41

Ridu 0.7.0 types virtual fields by their resolver and adds Payload's rich-text toolbar and layout options. A computed display name now returns a plain Go string: operation.Present(first + " " + last) replaces a separate value-type argument and a store.String wrapper, and the compiler checks the type. 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.7.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

  • field.Virtual(name, resolver) takes its value type from the resolver: operation.Value[string], operation.Value[float64], operation.Value[bool], or operation.Value[store.Value] for any JSON value. .AfterRead transforms use the same type.
  • A scalar resolver can no longer return the wrong kind; that mistake is now a compile error instead of an invalid_computed_value failure at run time.
  • richtext.Config.Admin changes how a rich-text editor looks in the admin, matching Payload's editor options: FixedToolbar pins formatting controls above the editor, HideGutter removes the edge line and indent, and HideDraggableBlockElement, HideAddBlockButton, and HideInsertParagraphAtEnd hide block controls. The floating toolbar over selected text is unchanged.
  • An upload field shows a cropped preview of its image and a readable size such as "95 kB".
  • The breadcrumb shows a document's full title when the header has room.
  • The rich-text documentation is split into pages for features, toolbar and layout, custom blocks, and display.

Breaking changes and upgrading from 0.6.x

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

bunx @riducms/cli@0.7.0 upgrade 0.7.0

Update each virtual field:

// Before
field.Virtual("displayName", field.ValueString,
	func(ctx operation.Context) (operation.Value[store.Value], error) {
		return operation.Present(store.String(name)), nil
	})

// After
field.Virtual("displayName",
	func(ctx operation.Context) (operation.Value[string], error) {
		return operation.Present(name), nil
	})
  • Use float64 for field.ValueNumber, bool for field.ValueBoolean, and keep store.Value for field.ValueJSON.
  • Type .AfterRead transforms on virtual fields the same way, such as operation.Change[string].
  • field.OutputField is now field.VirtualField[T], and field.AsOutput(node) is now field.AsVirtual[T](node).
  • A virtual field declared with a nil resolver needs its type written out, as in field.Virtual[string]("label", nil).

Data and deployment compatibility

The schema manifest, generated contracts, REST/SDK wire formats and stored data are unchanged: a virtual field declares the same value type as before. This release needs no database migration.