github silverbulletmd/silverbullet 2.6.1

7 hours ago

SilverBullet 2.6 is a big one. Under the hood, the entire TypeScript/client codebase has migrated from Deno to Node.js (now using vitest for tests), with bundle size optimizations via chunked ESBuild builds and JIT loading of larger modules. On top of that, there's a brand new (experimental) Runtime API and accompanying CLI that let you programmatically drive a remote SilverBullet server, evaluating Lua expressions, running scripts, and fetching console logs against a full client running in headless Chrome. The Outlines commands have been thoroughly reworked to be more robust and now handle numbered items, headers, and paragraphs. And Space Lua gets meaningful performance improvements through interpreter hot-path optimizations.

Changes

  • Technical: Deno → Node.js migration: The TypeScript/client codebase has been migrated from Deno to Node.js, now using vitest for tests.
    • Bundle size optimization: chunked builds with ESBuild, JIT loading of larger modules (vim, syntax modes).
  • Runtime API and accompanying CLI (Experimental) programmatically interact with a (remote) SilverBullet server over via silverbullet-cli or a HTTP API: evaluate Lua expressions, run scripts, and retrieve console logs. Powered by a headless Chrome instance running the full SilverBullet client via CDP, so all results reflect live client state.
  • New query shortcuts: index.contentPages() (pages excluding meta pages) and index.metaPages() (only meta pages) for convenient querying without manual tag filtering.
  • Outlines commands have been thoroughly reworked. Should now be more robust and better tested outline move/indent operations. New features:
    • Now also works with numbered items (and renumbers them)
    • Now works with headers (moves around entire sections)
    • Now works with paragraphs
    • When ending an list item with a :, and pressing Enter, the next item will be indented one level
  • Markdown support enhancements:
    • Markdown/Footnotes: both reference-style ([^1]) and inline (^[text]) footnotes with syntax highlighting, live preview on hover, reference completion, and invalid reference linting.
    • Live Preview for HTML tags
    • Custom markdown syntax extensions (==Experimental==): define custom inline syntax via API/syntax that gets parsed, highlighted, and rendered in live preview.
  • Space Lua enhancements:
    • Performance: Lua interpreter hot-path optimizations, tree traversal and page index optimizations.
    • Performance: LuaTable internals tuned for faster Lua execution.
  • Space Lua/Lua Integrated Query improvements (courtesy of Matouš Jan Fialka):
    • Unified field list syntax for from, select, and group by clauses, enabling multi-source cross-joins
    • Implicit single group for aggregates without group by
    • offset clause support
    • Intra-aggregate order by support
    • 13 new aggregate functions (product, string_agg, yaml_agg, json_agg, bit_and, bit_or, bit_xor, bool_and, bool_or, stddev_pop, stddev_samp, var_pop, var_samp), aggregate.alias API for custom aliases, and index.aggregates queryable collection
  • Client upgrade notification: if the server is updated but the client version doesn't match, a notification will appear instructing the user to reload.
  • The Table of contents widget is now collapsible, defaults to open (by Dobli).
  • Improved Lua widget rendering (by Matouš Jan Fialka): ${...} expressions now render scalars, arrays, records, and arrays-of-tables with better HTML and markdown output.
  • Task Task: Clean Completed now handles more scenarios, and leaves a cleaner outline.
  • Panels now use Shadow DOM elements instead of iframes (by onespaceman).
  • editor.flashNotification now supports an optional third argument with timeout (use 0 for persistent notifications) and actions (buttons with callbacks).
  • Fix: table cell alignment for missing and misaligned cells
  • Fix: handle tagged floats before plain object check in renderCellContent (by Matouš Jan Fialka).
  • Fix: document file opening with URL prefix.
  • Fix: autofocus on authentication page.
  • Fix: mini editor regressions.
  • Mobile: "lock" button to toggle read-only, useful for navigating without accidentally editing.
  • Action Button enhancements:
    • standalone option: only show certain action buttons in standalone/PWA mode (e.g. forward/back navigation buttons)
    • Support for opting out action buttons from the mobile dropdown menu
  • Fix: "No such header #boot" errors in PWA mode.
  • Fix: Edit buttons now work correctly for Lua expressions and code widgets whose bodies appear multiple times in the same page.
  • Fix: attribute rendering.
  • Fix: Markdown table rendering and removal of deprecated command button remnants.
  • Task improvements (by Matouš Jan Fialka):
  • shell.run now accepts an optional stdin parameter (by Brett Anthoine).
  • Sync: further edge case fixes (timestamp/content-length mismatch, service worker activation).
  • Subtle breaking change: template.each now returns an empty string on empty results instead of nil.
  • Fix: only #meta and #meta/ prefixed tags are now considered meta tags, not e.g. #metabase.
  • Fix: TOC rendering when headers contain a numbered list item.
  • Fix: edge case where the markdown link regex could go into infinite loop (links with escaped square brackets).
  • Fix: unwrap multi-return values in PropertyAccess and method calls (by Brett Anthoine).
  • Fix: allow colons in SB_USER password (by Joshua Brunner).
  • Fix: mobile tasks caret jumping and empty widgets on navigation.
  • Mobile: home button moved outside of the dropdown menu; hamburger menu style tweaks.
  • Fix: extended task state widget click behavior and rendering in widgets.
  • Fix: safer handling of default template files in non-empty spaces.
  • Frontmatter tags: key now has autocomplete support.
  • API/tag#tag.define(spec): new tagPage attribute to customize where clicking a tag navigates to (defaults to tag:name).
  • Fix: 32-bit ARM Docker builds.
  • Fix: reduce visual bouncing when navigating between pages.
  • Fix: encode URLs with dots in path names on WebKit/Safari (fixes opening e.g. PDF files).
  • Vim mode: allow passing arguments to vim ex commands (by Felix Riedel).
  • Tweaked default index and CONFIG pages for new installations.
  • Fix: tag stripping for page templates.
  • Fix: widget glitching — widget HTML content is no longer cached (only heights), reducing storage usage and WebKit rendering issues.

Upgrading

  • For docker-based install, pull the new image, stop the container and start a new one. For binary-based installs run silverbullet --upgrade and restart.
  • After upgrading the server, make sure you reload all your SilverBullet tabs a few times, just to make sure the cache is flushed.

Dedication

I've made the decision to reduce my regular day job to fewer days and spend the remaining time on SilverBullet. This allows for deeper focus and more ambitious work. If you like this, consider sponsoring to make this a little bit more financially viable for me. ❤️

Don't miss a new silverbullet release

NewReleases is sending notifications on new releases.