Skip to content

2.4.16

Compare
Choose a tag to compare
@tylim88 tylim88 released this 15 May 02:03
· 151 commits to main since this release
  1. support Record<string, something> data type, please note Typescript keys collapsing behavior:
    image
    playground
  • due to TS keys collapsing behavior ('a' | 'string' collapses to 'string'), be careful when accessing meta type compare and writeFlatten indexes with dot notation keys if keys consisting of string.
    For example: User['compare'][`a.${string}.b`] will return never because a.h.b collapse sto a.${string}.
    The solution is to access indexes by layer: User['compare']['a'][string]['b']
  • This update changed some core logics while ensuring backward compatibility, so existing code should be fine. New data type requires a lot of tests but because of time constraint and complexity, I only added minimum amount of tests. Helps are appreciated
  1. new APIs: transaction.updateNoFlatten, batch.updateNoFlatten, and updateDocNoFlatten. These APIs behave exactly the same as official update: they will delete nested properties(non-top level properties) that are NOT included.

related issue: #20