tinybase 4.8.9 → 4.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -19
- package/readme.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.10",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -216,32 +216,32 @@
|
|
|
216
216
|
"devDependencies": {
|
|
217
217
|
"@automerge/automerge": "^2.2.2",
|
|
218
218
|
"@automerge/automerge-repo": "^1.1.12",
|
|
219
|
-
"@babel/cli": "^7.24.
|
|
220
|
-
"@babel/core": "^7.24.
|
|
221
|
-
"@babel/preset-env": "^7.24.
|
|
222
|
-
"@babel/preset-react": "^7.24.
|
|
223
|
-
"@babel/preset-typescript": "^7.24.
|
|
219
|
+
"@babel/cli": "^7.24.6",
|
|
220
|
+
"@babel/core": "^7.24.6",
|
|
221
|
+
"@babel/preset-env": "^7.24.6",
|
|
222
|
+
"@babel/preset-react": "^7.24.6",
|
|
223
|
+
"@babel/preset-typescript": "^7.24.6",
|
|
224
224
|
"@journeyapps/powersync-sdk-common": "^1.6.0",
|
|
225
225
|
"@libsql/client": "^0.6.0",
|
|
226
226
|
"@prettier/sync": "^0.5.2",
|
|
227
227
|
"@rollup/plugin-image": "^3.0.3",
|
|
228
228
|
"@rollup/plugin-replace": "^5.0.5",
|
|
229
229
|
"@rollup/plugin-terser": "^0.4.4",
|
|
230
|
-
"@sqlite.org/sqlite-wasm": "^3.
|
|
230
|
+
"@sqlite.org/sqlite-wasm": "^3.46.0-build1",
|
|
231
231
|
"@types/asciichart": "^1.5.8",
|
|
232
232
|
"@types/expect-puppeteer": "^5.0.6",
|
|
233
233
|
"@types/http-server": "^0.12.4",
|
|
234
234
|
"@types/jest": "^29.5.12",
|
|
235
235
|
"@types/jest-environment-puppeteer": "^5.0.6",
|
|
236
236
|
"@types/less": "^3.0.6",
|
|
237
|
-
"@types/node": "^20.12.
|
|
237
|
+
"@types/node": "^20.12.13",
|
|
238
238
|
"@types/puppeteer": "^5.4.7",
|
|
239
|
-
"@types/react": "^18.3.
|
|
239
|
+
"@types/react": "^18.3.3",
|
|
240
240
|
"@types/react-dom": "^18.3.0",
|
|
241
241
|
"@types/react-test-renderer": "^18.3.0",
|
|
242
242
|
"@types/tmp": "^0.2.6",
|
|
243
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
244
|
-
"@typescript-eslint/parser": "^7.
|
|
243
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
244
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
245
245
|
"@vlcn.io/crsqlite-wasm": "^0.16.0",
|
|
246
246
|
"asciichart": "^1.5.25",
|
|
247
247
|
"babel-eslint": "^10.1.0",
|
|
@@ -251,14 +251,14 @@
|
|
|
251
251
|
"babel-preset-minify": "^0.5.2",
|
|
252
252
|
"buffer-replace": "^1.0.0",
|
|
253
253
|
"country-flag-emoji-json": "^2.0.0",
|
|
254
|
-
"cspell": "^8.8.
|
|
254
|
+
"cspell": "^8.8.3",
|
|
255
255
|
"electric-sql": "^0.11.3",
|
|
256
|
-
"esbuild": "^0.21.
|
|
256
|
+
"esbuild": "^0.21.4",
|
|
257
257
|
"eslint": "^8.57.0",
|
|
258
258
|
"eslint-config-prettier": "^9.1.0",
|
|
259
259
|
"eslint-plugin-jest": "^28.5.0",
|
|
260
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
261
|
-
"eslint-plugin-react": "7.34.
|
|
260
|
+
"eslint-plugin-jsdoc": "^48.2.7",
|
|
261
|
+
"eslint-plugin-react": "7.34.2",
|
|
262
262
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
263
263
|
"expo-sqlite": "^13.2.1",
|
|
264
264
|
"fake-indexeddb": "^6.0.0",
|
|
@@ -274,11 +274,11 @@
|
|
|
274
274
|
"partykit": "^0.0.105",
|
|
275
275
|
"partysocket": "^1.0.1",
|
|
276
276
|
"prettier": "^3.2.5",
|
|
277
|
-
"puppeteer": "22.
|
|
277
|
+
"puppeteer": "22.10.0",
|
|
278
278
|
"react": "^18.3.1",
|
|
279
279
|
"react-dom": "^18.3.1",
|
|
280
280
|
"react-test-renderer": "^18.3.1",
|
|
281
|
-
"rollup": "^4.
|
|
281
|
+
"rollup": "^4.18.0",
|
|
282
282
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
283
283
|
"rollup-plugin-gzip": "^3.1.2",
|
|
284
284
|
"rollup-plugin-preserve-shebang": "^1.0.1",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"tinybase": "file:./",
|
|
288
288
|
"tinydocs": "^0.1.38",
|
|
289
289
|
"tmp": "^0.2.3",
|
|
290
|
-
"ts-unused-exports": "^10.0
|
|
290
|
+
"ts-unused-exports": "^10.1.0",
|
|
291
291
|
"typescript": "5.4.5",
|
|
292
292
|
"wa-sqlite": "github:rhashimoto/wa-sqlite",
|
|
293
293
|
"yjs": "^13.6.15"
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
"@automerge/automerge-repo": "^1.1.12",
|
|
297
297
|
"@journeyapps/powersync-sdk-common": "^1.6.0",
|
|
298
298
|
"@libsql/client": "^0.5.6",
|
|
299
|
-
"@sqlite.org/sqlite-wasm": "^3.
|
|
299
|
+
"@sqlite.org/sqlite-wasm": "^3.46.0-build1",
|
|
300
300
|
"@vlcn.io/crsqlite-wasm": "^0.16.0",
|
|
301
301
|
"electric-sql": "^0.11.3",
|
|
302
302
|
"expo-sqlite": "^13.2.1",
|
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<section id="hero"><h2 id="the-reactive-data-store-for-local-first-apps">The <em>reactive</em> data store for <span>local-first apps</span>.</h2><p id="copy">Build blisteringly fast web apps that work both online and offline. Manage your state locally, synchronize it to the cloud when you need to, or even make it collaborative. But, most importantly... have fun building stuff again!</p></section><p><a href="https://tinybase.org/guides/releases/#v4-8"><em>NEW!</em> v4.8 release</a> <span id="one-with">"The One With PowerSync"</span></p><p><a class="start" href="https://tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://tinybase.org/demos/">Try the demos</a></p><p><a href="https://tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><ul><li>Manage <a href="#start-with-a-simple-key-value-store">key-value data</a>, <a href="#level-up-to-use-tabular-data">tabular data</a> - or both - with optional <a href="#apply-schemas-to-tables-values">schematization</a> to model your app's data structures.</li><li><a href="#register-granular-listeners">Flexibly reactive</a> to reconciled updates, so you only spend rendering cycles on things that change.</li><li><a href="#build-complex-queries-with-tinyql">Powerful query engine</a> to select, join, filter, group, sort and paginate data - reactively - and without SQL.</li><li>Built-in <a href="#create-indexes-for-fast-lookups">indexing</a>, <a href="#define-metrics-and-aggregations">metric aggregation</a>, <a href="#model-table-relationships">tabular relationships</a> - and even an <a href="#set-checkpoints-for-an-undo-stack">undo stack</a> for your app state.</li><li>Create <a href="#type-definitions-orm-like-apis">type definitions & ORM-like APIs</a>, from schema or inference. <a href="#an-inspector-for-your-data">Inspect your data</a> (<em>new!</em>) directly in the browser.</li><li>Easily <a href="#persist-to-storage-sqlite-crdts">sync your data</a> to browser <a href="https://tinybase.org/api/persister-browser">storage</a>, <a href="https://tinybase.org/api/persister-indexed-db/">IndexedDB</a>, <a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence/">SQLite</a>, <a href="https://tinybase.org/guides/schemas-and-persistence/synchronizing-data/">CRDTs</a>; and (<em>new!</em>) <a href="https://tinybase.org/api/persister-partykit-client/">PartyKit</a> and <a href="https://electric-sql.com/">ElectricSQL</a>.</li><li>Optional <a href="#call-hooks-to-bind-to-data">bindings to React</a> and (<em>new!</em>) <a href="#pre-built-reactive-components">pre-built components</a> that let you easily build fully reactive user interfaces.</li><li>Tiny by name, tiny by nature: <a href="#did-we-say-tiny">5.0kB - 9.4kB</a>, no dependencies. <a href="#well-tested-and-documented">100% tested</a>, <a href="https://tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and of course, <a href="https://github.com/tinyplex/tinybase">open source</a>!</li></ul><hr><section id="friends"><h2 id="tinybase-works-great-on-its-own-but-also-plays-well-with-friends">TinyBase works great on its own, but also plays well with friends!</h2><div><a href="https://tinybase.org/guides/building-uis/getting-started-with-ui-react"><img width="48" src="https://tinybase.org/react.svg"> React</a></div><div><a href="https://tinybase.org/api/persister-partykit-client"><img width="48" src="https://tinybase.org/partykit.svg"> PartyKit</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/expo.svg">Expo SQLite</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/electric.svg">ElectricSQL</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/sqlite.svg"> SQLite</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/turso.svg">Turso</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/powersync.svg">PowerSync</a></div><div><a href="https://tinybase.org/api/persister-indexed-db/functions/creation/createindexeddbpersister"><img width="48" src="https://tinybase.org/indexeddb.svg"> IndexedDB</a></div><div><a href="https://tinybase.org/api/persister-yjs/functions/creation/createyjspersister"><img width="48" src="https://tinybase.org/yjs.svg"> YJS</a></div><div><a href="https://tinybase.org/api/persister-cr-sqlite-wasm"><img width="48" src="https://tinybase.org/crsqlite.png"> CR-SQLite</a></div><div><a href="https://tinybase.org/api/persister-automerge"><img width="48" src="https://tinybase.org/automerge.svg"> Automerge</a></div></section><hr><section id="follow"><a href="https://github.com/tinyplex/tinybase" target="_blank"><img src="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=GitHub&labelColor=%23d81b60&color=%23333"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&logo=discord&logoColor=%23fff&label=Discord&labelColor=%233131e8&color=%23333"> </a><a href="https://twitter.com/tinybasejs" target="_blank"><img src="https://img.shields.io/twitter/follow/tinybasejs?style=for-the-badge&logo=x&logoColor=%23fff&label=Twitter&labelColor=%23333&color=%23333"></a><br><a href="https://github.com/tinyplex/tinybase/discussions" target="_blank"><img src="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=Ideas&labelColor=%23d81b60&color=%23333"> </a><a href="https://github.com/tinyplex/tinybase/issues" target="_blank"><img src="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=Issues&labelColor=%23d81b60&color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&logo=jest&logoColor=%23fff&color=%23333&labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/4.8.
|
|
1
|
+
<section id="hero"><h2 id="the-reactive-data-store-for-local-first-apps">The <em>reactive</em> data store for <span>local-first apps</span>.</h2><p id="copy">Build blisteringly fast web apps that work both online and offline. Manage your state locally, synchronize it to the cloud when you need to, or even make it collaborative. But, most importantly... have fun building stuff again!</p></section><p><a href="https://tinybase.org/guides/releases/#v4-8"><em>NEW!</em> v4.8 release</a> <span id="one-with">"The One With PowerSync"</span></p><p><a class="start" href="https://tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://tinybase.org/demos/">Try the demos</a></p><p><a href="https://tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><ul><li>Manage <a href="#start-with-a-simple-key-value-store">key-value data</a>, <a href="#level-up-to-use-tabular-data">tabular data</a> - or both - with optional <a href="#apply-schemas-to-tables-values">schematization</a> to model your app's data structures.</li><li><a href="#register-granular-listeners">Flexibly reactive</a> to reconciled updates, so you only spend rendering cycles on things that change.</li><li><a href="#build-complex-queries-with-tinyql">Powerful query engine</a> to select, join, filter, group, sort and paginate data - reactively - and without SQL.</li><li>Built-in <a href="#create-indexes-for-fast-lookups">indexing</a>, <a href="#define-metrics-and-aggregations">metric aggregation</a>, <a href="#model-table-relationships">tabular relationships</a> - and even an <a href="#set-checkpoints-for-an-undo-stack">undo stack</a> for your app state.</li><li>Create <a href="#type-definitions-orm-like-apis">type definitions & ORM-like APIs</a>, from schema or inference. <a href="#an-inspector-for-your-data">Inspect your data</a> (<em>new!</em>) directly in the browser.</li><li>Easily <a href="#persist-to-storage-sqlite-crdts">sync your data</a> to browser <a href="https://tinybase.org/api/persister-browser">storage</a>, <a href="https://tinybase.org/api/persister-indexed-db/">IndexedDB</a>, <a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence/">SQLite</a>, <a href="https://tinybase.org/guides/schemas-and-persistence/synchronizing-data/">CRDTs</a>; and (<em>new!</em>) <a href="https://tinybase.org/api/persister-partykit-client/">PartyKit</a> and <a href="https://electric-sql.com/">ElectricSQL</a>.</li><li>Optional <a href="#call-hooks-to-bind-to-data">bindings to React</a> and (<em>new!</em>) <a href="#pre-built-reactive-components">pre-built components</a> that let you easily build fully reactive user interfaces.</li><li>Tiny by name, tiny by nature: <a href="#did-we-say-tiny">5.0kB - 9.4kB</a>, no dependencies. <a href="#well-tested-and-documented">100% tested</a>, <a href="https://tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and of course, <a href="https://github.com/tinyplex/tinybase">open source</a>!</li></ul><hr><section id="friends"><h2 id="tinybase-works-great-on-its-own-but-also-plays-well-with-friends">TinyBase works great on its own, but also plays well with friends!</h2><div><a href="https://tinybase.org/guides/building-uis/getting-started-with-ui-react"><img width="48" src="https://tinybase.org/react.svg"> React</a></div><div><a href="https://tinybase.org/api/persister-partykit-client"><img width="48" src="https://tinybase.org/partykit.svg"> PartyKit</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/expo.svg">Expo SQLite</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/electric.svg">ElectricSQL</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/sqlite.svg"> SQLite</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/turso.svg">Turso</a></div><div><a href="https://tinybase.org/guides/schemas-and-persistence/database-persistence"><img width="48" src="https://tinybase.org/powersync.svg">PowerSync</a></div><div><a href="https://tinybase.org/api/persister-indexed-db/functions/creation/createindexeddbpersister"><img width="48" src="https://tinybase.org/indexeddb.svg"> IndexedDB</a></div><div><a href="https://tinybase.org/api/persister-yjs/functions/creation/createyjspersister"><img width="48" src="https://tinybase.org/yjs.svg"> YJS</a></div><div><a href="https://tinybase.org/api/persister-cr-sqlite-wasm"><img width="48" src="https://tinybase.org/crsqlite.png"> CR-SQLite</a></div><div><a href="https://tinybase.org/api/persister-automerge"><img width="48" src="https://tinybase.org/automerge.svg"> Automerge</a></div></section><hr><section id="follow"><a href="https://github.com/tinyplex/tinybase" target="_blank"><img src="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=GitHub&labelColor=%23d81b60&color=%23333"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&logo=discord&logoColor=%23fff&label=Discord&labelColor=%233131e8&color=%23333"> </a><a href="https://twitter.com/tinybasejs" target="_blank"><img src="https://img.shields.io/twitter/follow/tinybasejs?style=for-the-badge&logo=x&logoColor=%23fff&label=Twitter&labelColor=%23333&color=%23333"></a><br><a href="https://github.com/tinyplex/tinybase/discussions" target="_blank"><img src="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=Ideas&labelColor=%23d81b60&color=%23333"> </a><a href="https://github.com/tinyplex/tinybase/issues" target="_blank"><img src="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&logo=GitHub&logoColor=%23fff&label=Issues&labelColor=%23d81b60&color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&logo=jest&logoColor=%23fff&color=%23333&labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/4.8.10" target="_blank"><img src="https://img.shields.io/npm/v/tinybase?style=for-the-badge&logo=npm&logoColor=%23fff&labelColor=%23bd0005&color=%23333"></a></section><hr><section><h2 id="start-with-a-simple-key-value-store">Start with a simple key-value store.</h2><p>Creating a <a href="https://tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> requires just a simple call to the <a href="https://tinybase.org/api/store/functions/creation/createstore/"><code>createStore</code></a> function. Once you have one, you can easily set <a href="https://tinybase.org/api/store/type-aliases/store/values/"><code>Values</code></a> in it by unique <a href="https://tinybase.org/api/common/type-aliases/identity/id/"><code>Id</code></a>. And of course you can easily get them back out again.</p><p>Read more about using keyed value data in <a href="https://tinybase.org/guides/the-basics/">The Basics</a> guide.</p></section>
|
|
2
2
|
|
|
3
3
|
```js
|
|
4
4
|
const store = createStore()
|