Skip to content

Releases: tinyplex/tinybase

v4.5.10

20 Dec 13:29

Choose a tag to compare

This release updates a few peer dependencies and fixes some docs issues.

v4.5.9

12 Dec 14:52

Choose a tag to compare

This release updates PartyKit runtime dependencies.

v4.5.8

08 Dec 12:23

Choose a tag to compare

This release updates PartyKit runtime dependencies.

v4.5.7

06 Dec 17:32

Choose a tag to compare

This release changes the can* sanitization methods on the TinyBasePartyKitServer class to be asynchronous. This allows asynchronous permission checks if you are using these methods to prohibit certain writes to server data.

This is not a breaking change at runtime, but you may wish to update your declarations accordingly to remove TypeScript warnings.

v4.5.6

05 Dec 19:18

Choose a tag to compare

This release improves VSCode autocomplete, hopefully fixing #115.

v4.5.5

05 Dec 17:49

Choose a tag to compare

This release enhances the data-setting hooks so that the Ids of data being changed can be evaluated from a function, rather than pre-configured.

For example, if you wanted a callback to set the content of a Row, previously you would have to explicitly provide the Id ('felix') when creating the callback:

const setPet = useSetRowCallback('pets', 'felix', () => ({species: 'cat'}));

But now you can get the Row Id when the callback is invoked, perhaps getting its value from the event:

const setPet = useSetRowCallback(
  'pets',
  (event) => String(event.currentTarget.dataset.petName),
  () => ({species: 'cat'}),
);

This would allow you to have just one callback, but which can be invoked by events from multiple HTML elements, each with a data-petName attribute.

This functionality is also useful if you want to create unique Row Ids programmatically:

const addShape = useSetRowCallback(
  'shapes',
  () => nanoid(10),
  () => ({x: 100, y: 100, w: 80, h: 50}),
);

The following hooks are enhanced with the GetId type to support this behavior: useSetTableCallback, useSetRowCallback, useAddRowCallback, useSetPartialRowCallback, useSetCellCallback, and useSetValueCallback.

v4.5.4

02 Dec 18:56

Choose a tag to compare

This release updates dependencies, including a long-awaited Puppeteer upgrade & fix.

v4.5.3

24 Nov 21:10

Choose a tag to compare

This release adds the clearForward method to the Checkpoints interface so that you can prevent users from redoing actions that have been undone. (See #105.)

v4.5.2

23 Nov 18:38

Choose a tag to compare

This release updates a few peer dependencies & TypeScript test fixtures.

v4.5.1

21 Nov 20:10

Choose a tag to compare

This release includes a new PartyKit server function called broadcastTransactionChanges. This is intended for specialist applications that require the ability to update clients of a TinyBasePartyKitServer in their own custom ways.