Skip to content

v3.4.1 — Fable.Lit 2.0 + Serde.FS 1.0

Latest

Choose a tag to compare

@JordanMarr JordanMarr released this 02 Dec 16:16

🧱 A Stable Foundation: Fable.Lit 2.0 + Serde.FS 1.0

This release covers v3.3.0 → v3.4.1. Both libraries at the heart of the template are now on stable, actively maintained releases:

  • Fable.Lit 2.0.0: the F# bindings for Lit have a new home. Thanks to Maxime Mangel, Fable.Lit now lives in the new fable-hub org with an active maintainer, and 2.0 brings it up to date with Fable 5, Lit 3 and Elmish 5.
  • Serde.FS 1.0: the type-safe RPC and serialization layer is out of beta. The JSON wire format is now a documented contract: 1.x will read what any 1.x wrote.

A new app from this template starts on a current Fable 5 / Lit 3 / Elmish 5 client and a .NET 10 server. The two talk through a compile-time-checked RPC contract whose wire format is now covered by Serde.FS's 1.x compatibility promise.

🔥 Fable.Lit 2.0 (v3.3.0)

Package Before Now
Fable.Lit 1.4.2 2.0.0
Fable.Lit.Elmish 1.4.0 2.0.0 (Elmish 5)
Fable.Lit.Dsl 1.0.1 2.1.0
Fable.Lit.Dsl.Shoelace 1.0.1 2.1.1
Fable.LitRouter 1.0.0 1.0.2 (Elmish 5)
  • Includes the Fable.Lit fix that re-establishes hook effects when a LitElement is moved or reconnected (thanks @OnurGumus).
  • The WebLit.Tests project compiles again: an FSharp.Core downgrade had broken it. The stale TodoMVC test was replaced with real tests for CatInfoPage (Elmish update logic and the rendered validation summary).
  • README links now point to the new docs at fable-hub.github.io.

🔗 Serde.FS 1.0 (v3.4.0, v3.4.1)

Every Serde.FS package (Serde.FS, Serde.FS.AspNet, Serde.FS.Fable) now takes its version from a single property in Directory.Build.props:

<SerdePackagesVersion>1.0.1</SerdePackagesVersion>

Client and server must agree on the wire format, so they now upgrade together by changing one number.

What 1.0 brings to your app:

  • No silent precision loss. int64, uint64 and decimal travel as JSON strings, so the browser no longer rounds them past 2^53.
  • Stricter, clearer decoding. Malformed input is rejected rather than truncated or guessed at, and .NET and Fable fail with the same readable messages (Missing field "Zip" for Shop.Address).
  • Culture-independent numbers and dates, shortest round-trip floats, and preserved DateTime kind / DateTimeOffset offset on the Fable client.
  • More types: sbyte, int16, byte, uint16, uint32, uint64, float32, char and TimeSpan codecs.
  • A round-trip test suite that sends every shape through .NET and the generated Fable client (under Node) in both directions.

v3.4.1 picks up the Serde.FS 1.0.1 bug-fix release.

Also: the README named the deprecated Serde.FS.Json.Fable package; it is now correctly Serde.FS.Fable.

⚠️ Upgrading an Existing App

New apps need nothing. If your app was generated from an earlier version and you want to move up:

  1. Bump the Fable.Lit packages per the table above. Fable.Lit 2.0 has no API changes, so existing code should compile as-is.
  2. Move all Serde.FS packages to 1.0.1 together (adopting SerdePackagesVersion makes this easy), and redeploy client and server as one unit: a few wire shapes changed from the betas. JSON stored with beta.6 still decodes. See the Serde.FS 1.0 upgrade notes.

🚀 Getting Started

dotnet new install fable-lit-fullstack-template
dotnet new flft -n MyApp

Then follow the README. The desktop host from v3.2.0 is still included: run the same app as a website or as a native window.

Full changelog: v3.2.0...v3.4.1