@procedures/client 0.15.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.d.ts.map +1 -1
  5. package/dist/browser.js +1 -1
  6. package/dist/browser.js.map +1 -1
  7. package/dist/events/publisher.d.ts +4 -4
  8. package/dist/events/publisher.d.ts.map +1 -1
  9. package/dist/events/publisher.js +4 -5
  10. package/dist/events/publisher.js.map +1 -1
  11. package/dist/procedures/collection/changes.d.ts +9 -8
  12. package/dist/procedures/collection/changes.d.ts.map +1 -1
  13. package/dist/procedures/collection/changes.js +11 -11
  14. package/dist/procedures/collection/changes.js.map +1 -1
  15. package/dist/procedures/collection/index.d.ts +1 -0
  16. package/dist/procedures/collection/index.d.ts.map +1 -1
  17. package/dist/procedures/collection/index.js +2 -0
  18. package/dist/procedures/collection/index.js.map +1 -1
  19. package/dist/procedures/collection/partition.d.ts +4 -23
  20. package/dist/procedures/collection/partition.d.ts.map +1 -1
  21. package/dist/procedures/collection/partition.js +2 -28
  22. package/dist/procedures/collection/partition.js.map +1 -1
  23. package/dist/procedures/collection/topic.d.ts +86 -0
  24. package/dist/procedures/collection/topic.d.ts.map +1 -0
  25. package/dist/procedures/collection/topic.js +94 -0
  26. package/dist/procedures/collection/topic.js.map +1 -0
  27. package/dist/procedures/index.d.ts +1 -1
  28. package/dist/procedures/index.d.ts.map +1 -1
  29. package/dist/procedures/index.js +1 -1
  30. package/dist/procedures/index.js.map +1 -1
  31. package/dist/server/procedure-server.d.ts +4 -2
  32. package/dist/server/procedure-server.d.ts.map +1 -1
  33. package/dist/server/procedure-server.js +4 -6
  34. package/dist/server/procedure-server.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/browser.ts +1 -0
  37. package/src/events/publisher.ts +5 -6
  38. package/src/procedures/collection/changes.ts +12 -11
  39. package/src/procedures/collection/index.ts +2 -0
  40. package/src/procedures/collection/partition.ts +5 -27
  41. package/src/procedures/collection/topic.ts +115 -0
  42. package/src/procedures/index.ts +1 -0
  43. package/src/server/procedure-server.ts +4 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @procedures/client
2
2
 
3
+ ## 0.17.0
4
+
5
+ No changes in this release.
6
+
7
+ ## 0.16.0
8
+
9
+ ### Minor Changes
10
+
11
+ - deada4b: The name of a collection with partitions can have a dot (roadmap CLI-42). In the topic of a partition, the name encodes `%` and `.`, so the name and the partition of each topic stay apart. This change is a break of the server stack, thus it is its own MINOR (decision D13, decision D22). No earlier release marks it as deprecated, because no export moves. Only the topic form of these names changes.
12
+
13
+ Before, `usePartitions` refused a name with a dot, because the topic `collections.<name>.<partition>` did not show where the name ends.
14
+
15
+ - In the topic of a partition, the name encodes `%` as `%25` and `.` as `%2E`. The first dot after the name thus ends the name. The partition stays as it is, and it can have each character, also `.`, `/` and `%`.
16
+ - `collectionChangeTopic()` makes each topic, and `collectionTopicPartition()` reads it back to the same name and the same partition.
17
+ - Only the canonical form of a topic counts. The parse gives a collection and a partition only when `collectionChangeTopic()` gives the same topic again. Thus `collections.a%2eb.t1` names no collection.
18
+ - `collectionTopicTarget()`, `collectionTopicReads()` and `EventPublisher` use the same parse. `collectionTopicReads(topic, repository)` takes the repository, as the default read check of the publisher does.
19
+ - New `collectionTopicRule(name)`: the topic rule of a collection for the option `topics` of `EventPublisher`. It gives the plain topic and the pattern of the topics of the partitions, for example `["collections.graph.nodes", "collections.graph%2Enodes.*"]`.
20
+ - The topic of a partition of a name without `%` and `.` does not change. The topic of a collection without a partition does not change.
21
+
22
+ The behavior that changes:
23
+
24
+ - A collection with partitions whose name has `%` gets a new topic for each partition. For example, the topic of the partition `t1` of `rate%` changes from `collections.rate%.t1` to `collections.rate%25.t1`.
25
+ - A collection with partitions whose name has `.` is new. Its topics of a partition have the encoded name, for example `collections.graph%2Enodes.acme/space`. A topic or a rule that joins the raw name, for example `collections.graph.nodes.*`, matches none of them.
26
+ - In a deployment with two versions, an old publisher and a new subscriber of such a name do not match. The reverse is also true.
27
+ - `collectionTopicReads()` gives no read for a topic that names no collection, for example `collections.notes.` with an empty partition.
28
+
29
+ Migration steps:
30
+
31
+ - For each collection with partitions whose name has `%` or `.`, upgrade the publishers and the subscribers together.
32
+ - Build each topic rule of a collection with `collectionTopicRule()`. Do not join the parts yourself.
33
+ - The site: no change is necessary. It has no collection with partitions.
34
+ - MiniMongo: no change is necessary. It has no collection with partitions.
35
+ - Graph: no change is necessary. Graph has dotted names of collections, but no dotted name has partitions yet. When a dotted name gets partitions, build the rule of `graph-host.ts` with `collectionTopicRule()`, not `collections.${c}.*`.
36
+ - jarvis: no change is necessary. It has no collection with partitions.
37
+
3
38
  ## 0.15.1
4
39
 
5
40
  ### Patch Changes