Skip to content

Latest commit

 

History

History
282 lines (147 loc) · 10.4 KB

CHANGELOG.md

File metadata and controls

282 lines (147 loc) · 10.4 KB

Changelog

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. This change log follows the format documented in Keep a CHANGELOG.

v10.7.0 - 2024-04-23

Added

Changed

  • Deprecated Typesaurus.Collection, Typesaurus.Ref, and Typesaurus.Doc in favor of Typesaurus.SharedCollection, Typesaurus.SharedRef, and Typesaurus.SharedDoc to reflect the new sharing functionality. Read the sharing functionality guide.

v10.6.0 - 2024-04-12

This release has no user-facing changes, it's a dev release powering the Typesaurus Point-in-Time Recovery adapter.

Fixed

  • Fixed the native Firebase reference/query object not being exposed.

Chaned

  • Renamed native to nativeSymol in the adapters.

Added

  • Added ability to access the database instance from subscription promisesa via dbSymbol symbol.

v10.5.0 - 2024-04-12

This release has no user-facing changes, it's a dev release powering the Typesaurus Point-in-Time Recovery adapter.

Added

  • Added native Firestore reference/query object to the subscription promise object, which is accessible via native symbol to enable low-level access for advanced use cases, like Typesaurus Point-in-Time Recovery adapter. Don't use it!

v10.4.0 - 2024-04-11

This release has no user-facing changes, it's a dev release powering the Typesaurus Point-in-Time Recovery adapter.

Added

v10.3.0 - 2024-03-20

Fixed

  • Fixed Typesaurus.Ref being incompatible with the Ref type inferred from the actual database API.

  • Fixed update widening the model type when passing an object. It was allowed to pass an object with extra fields. It is now fixed except for data returned from the function argument, which is still prone to the problem, which is a TypeScript limitation.

Added

Added

v10.2.0 - 2024-03-07

Fixed

  • Fixed batch not using respecting collections renaming.

Changed

  • Made the Name generic in Typesaurus.Collection and Typesaurus.Ref types optional.

v10.1.0 - 2024-02-05

Added

  • Added sum and average aggregation methods to collections, queries and collection groups.

v10.0.1 - 2024-01-31

Fixed

  • Fixed subcollections path for renamed with .name collections.

v10.0.0 - 2024-01-28

Completely revamped Typesaurus with a new API and new features. Follow this guide to learn how it works.

v7.2.0 - 2021-05-25

  • Replace deprecated @firebase/rules-testing with @firebase/rules-unit-testing.

v7.1.0 - 2020-12-09

  • Third argument in doc (meta) now optional.

v7.0.0 - 2020-12-08

v6.2.0 - 2020-08-24

Fixed

Added

  • Added docId constant-helper that allows to sort or filter by the document ID.

v6.1.0 - 2020-07-27

Added

  • Added collection group support to all and onAll.

v6.0.0 - 2020-04-16

Changed

  • BREAKING: When using with ESM-enabled bundler, you should transpile node_modules. TypeScript preserves many modern languages features when it compiles to ESM code. So if you have to support older browsers, use Babel to process the dependencies code.

  • BREAKING: add now return Ref instead of Doc to avoid confusion that the returned data match the current database state which might be not a case when using with field values i.e. value('serverDate').

  • BREAKING: set, transaction.set and batch.set now return Promise<void> (or void in case of batch.set). The same reasoning as for the add (see above).

  • BREAKING: set, transaction.set and batch.set now don't accept merge option. Instead use the new upset function that provides better typing and ensures data consistency.

  • BREAKING: value('serverDate') now returns a simple object instead of monkey-patched Date instance.

  • BREAKING: ModelUpdate renamed to UpdateModel for consitency with SetModel and UpsetModel.

  • BREAKING: ref now don't generate id if the second argument is omitted, use id function to generate new id instead.

  • update now allows passing partial data into nested fields. Previously only root fields were optional.

  • Now the browser adaptor imports firebase/app and firebase/firestore on-demand (using ESM's import()) rather than in the root level of the library. That dramatically improves initial paint time and helps with bundle caching. Now every time you make a small change in the app, the user won't have to download firestore modules as well.

Added

  • Added ESM version of the code that enables tree-shaking.

  • Added new upset, batch.set and transaction.set functions that sets or updates the value of given document. It replaces merge option available in the previous version of Typesaurus.

  • Added new id function that generates random id for a document.

v5.4.0 - 2020-04-14

Fixes

Added

v5.3.0 - 2020-02-20

Fixes

Added

  • Added onGetMany function.

v5.2.0 - 2020-02-04

v5.1.0 - 2020-01-27

Added

  • Added ability to use docs in cursors (startAt, startAfter, etc.). #28

v5.0.0 - 2020-01-02

Changed

  • BREAKING: Rework the subcollection function to support nested subcollections. #18

  • BREAKING: Rework the transaction function. Now it accepts two functions as arguments. The first function allows only reading, and another allows only writing. It will make it impossible to perform reads after writes, which would throw an exception as it's a Firebase limitation. #16

  • Define the transaction function result type. #16

  • Remove @google-cloud/firestore, firebase, and firebase-admin from the peer dependencies to get rid of unavoidable warnings when Typesaurus is used only in the web or Node.js environment. #17

v4.1.0 - 2020-01-01

Added

  • Add Batch type that defines the object returned from the batch function.

v4.0.1 - 2019-12-20

Fixed

  • Make serverDate value to actually call Firebase's serverTimestamp instead of passing current date.

v4.0.0 - 2019-12-14

Fixed

  • Fix array-contains filter support in where.

Changed

  • BREAKING: untypedWhereArrayContains was removed in favor of native support of array-contains filter in where.

  • BREAKING: Update Firebase dependencies to the latest versions:

    • @google-cloud/firestore: >=2.6.0
    • firebase: >=7.5.0
    • firebase-admin: >=8.8.0

Added

v3.0.0 - 2019-11-11

Changed

  • BREAKING: Remove deprecated clear that was renamed to remove.

  • BREAKING: Return null instead of undefined when a document isn't found.

v2.1.0 - 2019-11-05

Changed

  • Loose up peer dependency requirements. See #5 for the reasoning.

Added

v2.0.0 - 2019-09-25

Changed

  • BREAKING: Move Firebase packages to the peer dependencies to prevent npm from installing two or more firebase-admin versions which cause obscure errors like "The default Firebase app does not exist".

v1.2.0 - 2019-09-02

Changed

  • Now ref generates an id when one isn't passed.

v1.1.0 - 2019-08-17

Changed

  • Rename clear to remove everywhere keeping clear as an alias which will be removed in the next major version.

Added

  • Export field from the package root

  • Added support for value (i.e. value('increment', 1)) in the field paths.

  • Add support for merge set that use the current document values as defaults:

    await set(user.ref, { name: "Sasha", date: new Date(1987, 1, 11) });
    await set(user.ref, { name: "Sasha" }, { merge: true });
    await get(user.ref);
    //=> { data: { name: 'Sasha', date: new Date(1987, 1, 11) }, ... }

v1.0.0 - 2019-08-13

First public release.