Skip to content

Releases: tinyplex/tinybase

v3.0.2

16 Feb 18:52

Choose a tag to compare

Includes CJS modules in the NPM distribution, which can be used like so:

import {createStore} from 'tinybase/cjs';

An es6 variant is also provided. Individual modules can be imported by name if required.

Huge thanks to @uwemneku and @WonderPanda for proposing and verifying in #48!

v3.0.1

03 Feb 02:03

Choose a tag to compare

Fixes missing type in code-generated API

v3.0.0

29 Jan 17:46

Choose a tag to compare

This major new release adds key/value store functionality to TinyBase. Alongside existing tabular data, it allows you to get, set, and listen to, individual Value items, each with a unique Id.

const store = createStore().setValues({employees: 3, open: true});
console.log(store.getValues());
// -> {employees: 3, open: true}

const listenerId = store.addValueListener(
  null,
  (store, valueId, newValue, oldValue) => {
    console.log(`Value '${valueId}' changed from ${oldValue} to ${newValue}`);
  },
);

store.setValue('employees', 4);
// -> "Value 'employees' changed from 3 to 4"

store.delListener(listenerId).delValues();

Guides and documentation have been fully updated, and certain demos - such as the Todo App v2 (indexes) demo, and the Countries demo - have been updated to use this new functionality.

If you use the optional ui-react module with TinyBase, v3.0 now uses and expects React v18.

In terms of core API changes in v3.0, there are some minor breaking changes, but the majority of the alterations are additions. See the release notes for full details.

And please enjoy!

v3.0.0-beta.1

22 Jan 21:35

Choose a tag to compare

v3.0.0-beta.1 Pre-release
Pre-release

For those who don't need tables, but just a reactive flat map, this experimental release adds a new keyed value API to the Store interface: setValue, getValue, addValueListener, etc.

It's not fully documented in the guides and demos but the API documentation and full test coverage is complete.

https://beta.tinybase.org/api/store/interfaces/store/store/

v3.0.0-beta.0

27 Dec 20:26

Choose a tag to compare

v3.0.0-beta.0 Pre-release
Pre-release

This upgrades TinyBase to use React v18 for development and example demos.

v2.2.6

14 Dec 01:57

Choose a tag to compare

Upgrades esbuild devDependency with required jest array type support

v2.2.5

13 Dec 17:51

Choose a tag to compare

Fixes #37

v2.2.4

13 Dec 14:56

Choose a tag to compare

This updates development dependencies and fixes #35

v2.2.3

26 Nov 20:06

Choose a tag to compare

https://tinybase.org/guides/releases/#v2-2

This release includes a new tools module. These tools are not intended for production use, but are instead to be used as part of your engineering workflow to perform tasks like generating APIs from schemas, or schemas from data. For example:

const store = createStore().setTable('pets', {
  fido: {species: 'dog'},
  felix: {species: 'cat'},
  cujo: {species: 'dog'},
});

const tools = createTools(store);
const [dTs, ts] = tools.getStoreApi('shop');

// -- shop.d.ts --
/* Represents the 'pets' Table. */
export type PetsTable = {[rowId: Id]: PetsRow};
/* Represents a Row when getting the content of the 'pets' Table. */
export type PetsRow = {species: string};
//...

// -- shop.ts --
export const createShop: typeof createShopDecl = () => {
  //...
};

This release includes a new tinybase CLI tool which allows you to generate Typescript definition and implementation files direct from a schema file:

npx tinybase getStoreApi schema.json shop api

    Definition: [...]/api/shop.d.ts
Implementation: [...]/api/shop.ts

Finally, the tools module also provides ways to track the overall size and structure of a Store for use while debugging.

v2.1.1

07 Nov 03:16

Choose a tag to compare

Updates devDependencies and small pool function bug.