Skip to content

Releases: lxsmnsyc/thaler

v0.9.0

16 Jan 10:25
0133e08
Compare
Choose a tag to compare
  • Move to biome
  • Fix proper chunking algorithm
  • Add proper "handshake" for server-client communication
  • Remove Blob and File support for requests
  • Remove compile as the default export.
  • Fix server functions to have the correct MIME type
  • Add X-Thaler-ID header
  • Update demos

v0.8.0

27 Nov 05:07
Compare
Choose a tag to compare

Since seroval now has built-in support for AsyncIterables, and has JSON streaming API, we can now turn all seroval-based server functions to utilize the streaming feature.

Basically, this is now possible:

const example = fn$(async function* foo(items: string[]) {
  for (const item of items) {
    yield sleep(item, 1000);
  }
});

// client code
const iterator = await example(['foo', 'bar', 'baz']);
for await (const value of iterator) {
  console.log('Received: ', value);
}

v0.7.0

07 Jul 10:00
Compare
Choose a tag to compare
  • Add support for defining custom server functions. The configuration follows the same internal definition for the built-in server functions, and can be defined through the plugin integrations (e.g. Vite). Functions defined in the configuration must call one of the "internally-defined" functions for Thaler to recognize the function call.
// This is based on the unplugin integration
thaler.vite({
  functions: [
    {
      // Name of the function
      name: 'server$',
      // Boolean check if the function needs to perform
      // closure extraction
      scoping: false,
      // Target identifier (to be compiled)
      target: {
        // Name of the identifier
        name: 'server$',
        // Where it is imported
        source: 'thaler',
        // Kind of import (named or default)
        kind: 'named',
      },
      // Compiled function for the client
      client: {
        // Compiled function identifier
        name: '$$server',
        // Where it is imported
        source: 'thaler/client',
        // Kind of import
        kind: 'named',
      },
      // Compiled function for the server
      server: {
        // Compiled function identifier
        name: '$$server',
        // Where it is imported
        source: 'thaler/server',
        // Kind of import
        kind: 'named',
      },
    }
  ],
});

v0.6.0

16 Apr 15:06
Compare
Choose a tag to compare
  • Add loader$ and action$ a84da60
  • Change second parameter for functions (except server$) to receive an event object with a request property instead of the request directly fcc39b9
    • This change also adds support for response modification for fn$ and pure$
  • Add retry to thaler/utils d33e4b4
  • Add timeout to thaler/utils 00c9766
  • Fix debounce race conditions 81af3ff
  • Drop origin config 0d17d50

v0.5.0

10 Apr 13:31
Compare
Choose a tag to compare
  • Add thaler/utils
    • Add debounce
    • Add throttle
    • Move json and text utils from thaler/server to thaler/utils
  • Add ref$ (createReference in seroval but with auto id)
  • Add sveltekit demo
  • Add solidstart demo

v0.4.0

28 Mar 07:30
Compare
Choose a tag to compare
  • Deprecate thaler/babel in favor of thaler/compiler
  • Add unplugin
  • Fix fn$ scoping to skip top-level values

v0.2.0

06 Mar 09:22
Compare
Choose a tag to compare
  • Add support for Promise serialization
  • Fix closure extraction to support live binding
    • let variables captured but was updated after it is captured. Calling fn$ sends the stale closure instead of the updated closure.

Full Changelog: v0.1.3...v0.2.0