1. 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.23] - 2023-01-26

Fixed

  • Fixed invalid dependencies in CDN bundles

[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.