1. Guides
  2. Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

During our beta rollout, minor updates in the semantic versioning represent breaking changes.

[0.3.37] - 2023-03-20

Added

  • Throw/log error for required/optional signer

Changed

  • Improved error messages when values do not match their schema types

Fixed

  • Polybase Auth now supports multiple signing requests being sent at once
  • Auth listener .onAuthUpdate is now not called until loading completes, so the first message received is the true auth (signed in/out) state

[0.3.36]- 2023-03-16

Added

  • Collection record fields (e.g. user: User) are now indexable and queryable
  • Added react helpers for auth AuthProvider(), useAuth() and useIsAuthenticated()

Fixed

  • .push on arrays of collection records does not error anymore

[0.3.35] - 2023-03-16

Fixed

  • @polybase/client: Optional parameters are no longer type checked

[0.3.34] - 2023-03-14

Added

  • @polybase/auth:
    • Added return types to Auth methods
    • Added signOut() method, to allow apps to request the user to sign out
    • Added optional parameter { force: boolean } to signIn method on Auth. If force is true, then the login popup will show to the user even if the user is already logged in.

Fixed

  • @polybase/auth:
    • increased z-index of auth popup modal to max value (2147483647) to ensure it is always visible when open
    • made internal Auth methods private

[0.3.33] - 2023-03-14

Fixed

  • @polybase/client: fixed bug that caused the error handler function .onSnapshot(successHandlerFn, errorHandlerFn) to be called on snapshots when a request is cancelled (i.e. when all subscribers are removed).

[0.3.32] - 2023-03-11

Added

  • @polybase/eth: added ethPersonalSignRecoverPublicKey(sig, msg) to easily get a public key from a signed message.

[0.3.31] - 2023-03-11

Added

  • @polybase/auth: Allow origin configuration property to be passed into Auth, this is require if window.location.origin is not available.

    For example:

    const auth = new Auth({
      origin: 'https://my.domain.com'
    })
    

[0.3.30] - 2023-03-10

Added

  • Added a new bytes type

[0.3.29] - 2023-03-09

Added

  • @read and @call directives on collections that allow anyone to read or call a function in a collection
  • Array can be of Collection type
  • Array of Collection type can be used with read/call/delegate directives

[0.3.28] - 2023-03-08

Fixed

  • Record#get, Collection#get, Query#get now signs requests on private collections

[0.3.26] - 2023-03-07

Fixed

  • Fixed “Failed to fetch metadata” in the explorer

Changed

  • The polybase-ts client libraries are now natively web-compatible

[0.3.23] - 2023-01-26

Fixed

  • Fixed invalid dependencies in CDN bundles

[0.3.23] - 2023-01-21

Added

  • Authorization rules using @public, @read, @call and @delegate

[0.3.23] - 2023-01-21

Added

  • New collection interface AST that is now stored in the database. Clients do not need to parse collection code anymore

[0.3.22] - 2023-01-17

Added

  • Authentication library @polybase/auth

Fixed

  • Export types from @polybase/util

Removed

  • Replaced lodash dependency with Object.assign

[0.3.21] - 2023-01-13

Fixed

  • Fixed @polybase/client’s applySchema not working with custom defaultNamespace

[0.3.20] - 2023-01-11

Fixed

  • @polybase/client collecton.onSnapshot(dataFn, errFn) now supports being passed errFn handler as an optional second parameter
  • Added lastRecordUpdated and publicKey to CollectionMeta type

[0.3.19] - 2023-01-06

Added

  • Nested fields are now indexable, you can now filter and sort by them.

Fixed

  • @polybase/client’s applySchema now re-throws errors

[0.3.18] - 2023-01-05

Added

  • All fields are now indexed by default. This means that all fields can be queried and sorted without defining an explicit index
  • Added boolean type to Polylang

Removed

  • @unique index support

[0.3.16] - 2022-12-30

Fixed

  • Fix creating a new collection with applySchema

[0.3.15] - 2022-12-30

Fixed

  • Change global namespace for @polybase/client to polybase when importing using the global namespace (i.e when using a CDN). It was incorrectly set to polybase_util

Added

  • Allow records from other collections in the same scope to be passed to functions
  • Allow calling methods on records from other collections

[0.3.14] - 2022-12-30

Added

  • Added map and array type to Polylang, collections can now have a map and array field when defining the collection.

[0.3.13] - 2022-12-30

Added

  • Export minified umd format for cdn import

[0.3.12] - 2022-12-20

Changed

  • Update dependencies

[0.3.11] - 2022-12-20

Changed

  • Only call signer function (fn provided by .signer(fn)) for write requests (previously the signer fn was called for both read and write requests, which led to a poor user experience if using metamask to sign requests).

[0.3.10] - 2022-11-23

Added

  • Added additional encryption algorithems:
    • aes-cbc (symmetric encryption)
    • secp256k1 (Ethereum signing/asymmetric encryption)
    • x25519-xsalsa20-poly1305 (MetaMask encryption)

Changed

  • Utility fns should now be imported by algorithm name: e.g import { aescbc, secp256k1, x25519xsalsa20poly1305 } from '@polybase/util'

Deprecated

  • Default export of encryption functions (these fns can now be imported using the algorithm specific import - see above):
    • import { asymmetricEncrypt, asymmetricDecrypt } from '@polybase/client'
    • import { encryptToHex, decryptFromHex } from '@polybase/client'
    • import { asymmetricEncryptToHex, asymmetricDecryptFromHex } from '@polybase/client'
    • import { sign } from '@polybase/client'

[0.3.7] - 2022-11-14

Added

  • Added symmetric encryption helpers to @polybase/util:
    • symmetricGenerateKey()
    • symmetricDecryptFromHex()
    • symmetricEncrypt()
    • symmetricDecrypt()
    • symmetricImportKey()

Changed

  • Normalized asymmetric encryption helpers in @polybase/util:
    • encryptToHex() -> asymmetricEncryptToHex()
    • decryptFromHex() -> asymmetricDecryptFromHex()

Deprecated

  • Deprecated from @polybase/util:
  • encrypt()
  • decrypt()

[0.3.6] - 2022-11-11

Deprecated

  • collection.doc() has been deprecated in favour of collection.record() on the Collection class
  • Doc class has been deprecated in favour of CollectionRecord class
  • The following URL endpoints have been deprecated from our hosted service:
    • POST /v0/collections/{collectionId}/documents replaced by POST /v0/collections/{collectionId}/records
    • GET /v0/collections/{collectionId}/documents replaced by GET /v0/collections/{collectionId}/records
    • GET /v0/collections/{collectionId}/documents/{recId} replaced by GET /v0/collections/{collectionId}/records/{recId}
    • POST /v0/collections/{collectionId}/documents/{recId}/call/{function} replaced by POST /v0/collections/{collectionId}/records/{recId}/call/{function}

Changed

  • Nomenclature for a record/document within a collection has been changed from document -> record
  • Error reason codes returned from the server have been updated to the follows:
    • record/not-found
    • index/missing-index
    • index/unique-constraint-violation
    • constructor/no-id-assigned
    • function/invalidated-id
    • function/not-found
    • function/invalid-args
    • function/invalid-call
    • collection/id-exists
    • collection/invalid-id
    • collection/invalid-schema

Added

  • Tests for each of the user error codes

[0.3.3] - 2022-11-04

Removed

  • pk (publicKey) is no longer accepted as the final parameter of .call(functionName, args, pk)` and .create(args, pk)

Changed

  • Signer function has new type specification: type Signer = (data: string, req: Request) => Promise<SignerResponse|null>
    • Additional parameter req: Request is passed as the second parameter
    • If provided, signer() is called for every request
    • You can return null on Signer function if you do not want to provide a signature for a given request
  • Dependencies updates

[0.3.2] - 2022-11-04

Fixed

  • .applySchema() now upsert the provided code. If the collection does not exist, it is created, otherwise it is updated.

[0.3.1] - 2022-11-01

Added

  • .create() can be called on a collection to create a new record - e.g. db.collection('HelloWorld').create(["id1"])
  • Changelog added to documentation

Removed

  • doc.set() - replaced by creating specific collection functions that can be called using doc.call("fn", args)
  • doc.delete() - replaced by selfdestruct(), which should be called within a smart collection function
  • Field directives (e.g. @max(), @min(), etc) have been removed

Deprecated

  • The following URL endpoints have been deprecated from our hosted service:
    • GET /v0/collections/{collectionId}/records replaced by GET /v0/collections/{collectionId}
    • GET /v0/collections/{collectionId}/records/{recId} replaced by GET /v0/collections/{collectionId}/{recId}

[0.1.0] - 2022-09-01

The initial release of Polybase.