diff --git a/.changeset/angry-chairs-tan.md b/.changeset/angry-chairs-tan.md deleted file mode 100644 index d3e38489d1..0000000000 --- a/.changeset/angry-chairs-tan.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@tanstack/db-collections": patch -"@tanstack/react-db": patch -"@tanstack/vue-db": patch -"@tanstack/db": patch ---- - -Expose utilities on collection instances - -Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing. - -- Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly -- Added `utils` property to CollectionImpl -- Added TypeScript types for utility functions and utility records -- Changed Collection from a class to a type, updating all usages to use createCollection() instead -- Updated Electric/Query implementations - -- Utilities are now ergonomically accessible under `.utils` -- Full TypeScript typing is preserved for both collection data and utilities -- API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly -- Zero-boilerplate TypeScript pattern that infers utility types automatically diff --git a/examples/react/todo/CHANGELOG.md b/examples/react/todo/CHANGELOG.md index 496cf8cf7a..f9592b4e86 100644 --- a/examples/react/todo/CHANGELOG.md +++ b/examples/react/todo/CHANGELOG.md @@ -1,5 +1,13 @@ # examples/react/todo +## 0.0.11 + +### Patch Changes + +- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]: + - @tanstack/db-collections@0.0.9 + - @tanstack/react-db@0.0.7 + ## 0.0.10 ### Patch Changes diff --git a/examples/react/todo/package.json b/examples/react/todo/package.json index 9c48b5228c..d71be7c96d 100644 --- a/examples/react/todo/package.json +++ b/examples/react/todo/package.json @@ -1,11 +1,11 @@ { "name": "@tanstack/db-example-react-todo", "private": true, - "version": "0.0.10", + "version": "0.0.11", "dependencies": { - "@tanstack/db-collections": "^0.0.8", + "@tanstack/db-collections": "^0.0.9", "@tanstack/query-core": "^5.75.7", - "@tanstack/react-db": "^0.0.6", + "@tanstack/react-db": "^0.0.7", "cors": "^2.8.5", "drizzle-orm": "^0.40.1", "drizzle-zod": "^0.7.0", diff --git a/packages/db-collections/CHANGELOG.md b/packages/db-collections/CHANGELOG.md index 61b4e01763..6ca856b6f3 100644 --- a/packages/db-collections/CHANGELOG.md +++ b/packages/db-collections/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/db-collections +## 0.0.9 + +### Patch Changes + +- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161)) + + Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing. + + - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly + - Added `utils` property to CollectionImpl + - Added TypeScript types for utility functions and utility records + - Changed Collection from a class to a type, updating all usages to use createCollection() instead + - Updated Electric/Query implementations + - Utilities are now ergonomically accessible under `.utils` + - Full TypeScript typing is preserved for both collection data and utilities + - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly + - Zero-boilerplate TypeScript pattern that infers utility types automatically + +- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]: + - @tanstack/db@0.0.7 + ## 0.0.8 ### Patch Changes diff --git a/packages/db-collections/package.json b/packages/db-collections/package.json index 53a20f53e7..f78e8f364c 100644 --- a/packages/db-collections/package.json +++ b/packages/db-collections/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/db-collections", "description": "A collection for (aspirationally) every way of loading your data", - "version": "0.0.8", + "version": "0.0.9", "dependencies": { "@tanstack/db": "workspace:*", "@tanstack/query-core": "^5.75.7", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 0f6a987ba4..7ca475c062 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,23 @@ # @tanstack/db +## 0.0.7 + +### Patch Changes + +- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161)) + + Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing. + + - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly + - Added `utils` property to CollectionImpl + - Added TypeScript types for utility functions and utility records + - Changed Collection from a class to a type, updating all usages to use createCollection() instead + - Updated Electric/Query implementations + - Utilities are now ergonomically accessible under `.utils` + - Full TypeScript typing is preserved for both collection data and utilities + - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly + - Zero-boilerplate TypeScript pattern that infers utility types automatically + ## 0.0.6 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 2339805e7a..d9374176dc 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/db", "description": "A reactive client store for building super fast apps on sync", - "version": "0.0.6", + "version": "0.0.7", "dependencies": { "@electric-sql/d2ts": "^0.1.6", "@standard-schema/spec": "^1.0.0", diff --git a/packages/react-db/CHANGELOG.md b/packages/react-db/CHANGELOG.md index 09d1c44272..08dfd8a669 100644 --- a/packages/react-db/CHANGELOG.md +++ b/packages/react-db/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/react-db +## 0.0.7 + +### Patch Changes + +- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161)) + + Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing. + + - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly + - Added `utils` property to CollectionImpl + - Added TypeScript types for utility functions and utility records + - Changed Collection from a class to a type, updating all usages to use createCollection() instead + - Updated Electric/Query implementations + - Utilities are now ergonomically accessible under `.utils` + - Full TypeScript typing is preserved for both collection data and utilities + - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly + - Zero-boilerplate TypeScript pattern that infers utility types automatically + +- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]: + - @tanstack/db@0.0.7 + ## 0.0.6 ### Patch Changes diff --git a/packages/react-db/package.json b/packages/react-db/package.json index 1253719023..bf0d041ed8 100644 --- a/packages/react-db/package.json +++ b/packages/react-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/react-db", "description": "React integration for @tanstack/db", - "version": "0.0.6", + "version": "0.0.7", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/packages/vue-db/CHANGELOG.md b/packages/vue-db/CHANGELOG.md index 8b0a2b1b12..e37d29a905 100644 --- a/packages/vue-db/CHANGELOG.md +++ b/packages/vue-db/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/vue-db +## 0.0.6 + +### Patch Changes + +- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161)) + + Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing. + + - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly + - Added `utils` property to CollectionImpl + - Added TypeScript types for utility functions and utility records + - Changed Collection from a class to a type, updating all usages to use createCollection() instead + - Updated Electric/Query implementations + - Utilities are now ergonomically accessible under `.utils` + - Full TypeScript typing is preserved for both collection data and utilities + - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly + - Zero-boilerplate TypeScript pattern that infers utility types automatically + +- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]: + - @tanstack/db@0.0.7 + ## 0.0.5 ### Patch Changes diff --git a/packages/vue-db/package.json b/packages/vue-db/package.json index c3126e0be4..b2a998ec5e 100644 --- a/packages/vue-db/package.json +++ b/packages/vue-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/vue-db", "description": "Vue integration for @tanstack/db", - "version": "0.0.5", + "version": "0.0.6", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1995063644..561f522513 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,13 +103,13 @@ importers: examples/react/todo: dependencies: '@tanstack/db-collections': - specifier: ^0.0.8 + specifier: ^0.0.9 version: link:../../../packages/db-collections '@tanstack/query-core': specifier: ^5.75.7 version: 5.75.7 '@tanstack/react-db': - specifier: ^0.0.6 + specifier: ^0.0.7 version: link:../../../packages/react-db cors: specifier: ^2.8.5