@procedures/mongo 0.46.0 → 0.47.2
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.
- package/CHANGELOG.md +46 -8
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/procedures/collections.create.js +1 -1
- package/dist/procedures/collections.create.js.map +1 -1
- package/dist/procedures/collections.drop.js +1 -1
- package/dist/procedures/collections.drop.js.map +1 -1
- package/dist/procedures/collections.list.js +1 -1
- package/dist/procedures/collections.list.js.map +1 -1
- package/dist/procedures/collections.stats.js +1 -1
- package/dist/procedures/collections.stats.js.map +1 -1
- package/dist/procedures/database.info.js +1 -1
- package/dist/procedures/database.info.js.map +1 -1
- package/dist/procedures/database.ping.js +1 -1
- package/dist/procedures/database.ping.js.map +1 -1
- package/dist/procedures/documents.aggregate.js +1 -1
- package/dist/procedures/documents.aggregate.js.map +1 -1
- package/dist/procedures/documents.bulk.js +1 -1
- package/dist/procedures/documents.bulk.js.map +1 -1
- package/dist/procedures/documents.count.js +1 -1
- package/dist/procedures/documents.count.js.map +1 -1
- package/dist/procedures/documents.delete.js +1 -1
- package/dist/procedures/documents.delete.js.map +1 -1
- package/dist/procedures/documents.distinct.js +1 -1
- package/dist/procedures/documents.distinct.js.map +1 -1
- package/dist/procedures/documents.explain.js +1 -1
- package/dist/procedures/documents.explain.js.map +1 -1
- package/dist/procedures/documents.find.js +1 -1
- package/dist/procedures/documents.find.js.map +1 -1
- package/dist/procedures/documents.get.js +1 -1
- package/dist/procedures/documents.get.js.map +1 -1
- package/dist/procedures/documents.insert.js +1 -1
- package/dist/procedures/documents.insert.js.map +1 -1
- package/dist/procedures/documents.update.js +1 -1
- package/dist/procedures/documents.update.js.map +1 -1
- package/dist/procedures/indexes.create.js +1 -1
- package/dist/procedures/indexes.create.js.map +1 -1
- package/dist/procedures/indexes.drop.js +1 -1
- package/dist/procedures/indexes.drop.js.map +1 -1
- package/dist/procedures/indexes.list.js +1 -1
- package/dist/procedures/indexes.list.js.map +1 -1
- package/dist/procedures/input-schemas.d.ts +1 -1
- package/dist/procedures/input-schemas.d.ts.map +1 -1
- package/dist/procedures/input-schemas.js +1 -1
- package/dist/procedures/input-schemas.js.map +1 -1
- package/dist/procedures/watch.js +1 -1
- package/dist/procedures/watch.js.map +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/materializer.d.ts +1 -1
- package/dist/storage/materializer.js +1 -1
- package/dist/storage/pipeline-scope.d.ts +1 -1
- package/dist/storage/pipeline-scope.js +1 -1
- package/package.json +5 -5
- package/src/index.ts +2 -2
- package/src/procedures/collections.create.ts +1 -1
- package/src/procedures/collections.drop.ts +1 -1
- package/src/procedures/collections.list.ts +1 -1
- package/src/procedures/collections.stats.ts +1 -1
- package/src/procedures/database.info.ts +1 -1
- package/src/procedures/database.ping.ts +1 -1
- package/src/procedures/documents.aggregate.ts +1 -1
- package/src/procedures/documents.bulk.ts +1 -1
- package/src/procedures/documents.count.ts +1 -1
- package/src/procedures/documents.delete.ts +1 -1
- package/src/procedures/documents.distinct.ts +1 -1
- package/src/procedures/documents.explain.ts +1 -1
- package/src/procedures/documents.find.ts +1 -1
- package/src/procedures/documents.get.ts +1 -1
- package/src/procedures/documents.insert.ts +1 -1
- package/src/procedures/documents.update.ts +1 -1
- package/src/procedures/indexes.create.ts +1 -1
- package/src/procedures/indexes.drop.ts +1 -1
- package/src/procedures/indexes.list.ts +1 -1
- package/src/procedures/input-schemas.ts +1 -1
- package/src/procedures/watch.ts +1 -1
- package/src/storage/index.ts +1 -1
- package/src/storage/materializer.ts +1 -1
- package/src/storage/pipeline-scope.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @procedures/mongo
|
|
2
2
|
|
|
3
|
+
## 0.47.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0650616]
|
|
8
|
+
- Updated dependencies [2684531]
|
|
9
|
+
- Updated dependencies [ae1e3fd]
|
|
10
|
+
- Updated dependencies [f1ece74]
|
|
11
|
+
- @procedures/client@0.47.2
|
|
12
|
+
- @procedures/collections@0.47.2
|
|
13
|
+
|
|
14
|
+
## 0.47.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [f845c6d]
|
|
19
|
+
- @procedures/client@0.47.1
|
|
20
|
+
- @procedures/collections@0.47.1
|
|
21
|
+
|
|
22
|
+
## 0.47.0
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- e913014: Each module imports zod with `import * as z from "zod"`, not `import { z } from "zod"`. With the old form, an esbuild bundle got each locale of zod: 264 kB of minified code (esbuild metafile of the journey worker of the site). The Vite build of the site gives the same worker files with both forms. The procedure scaffolder writes the new form in `types.ts`. The API and the behavior stay the same.
|
|
27
|
+
- Updated dependencies [397dd4b]
|
|
28
|
+
- Updated dependencies [c9125a8]
|
|
29
|
+
- Updated dependencies [335728b]
|
|
30
|
+
- Updated dependencies [d987202]
|
|
31
|
+
- Updated dependencies [45a737f]
|
|
32
|
+
- Updated dependencies [d77e9e8]
|
|
33
|
+
- Updated dependencies [e913014]
|
|
34
|
+
- Updated dependencies [2f0c7b0]
|
|
35
|
+
- Updated dependencies [ad70c38]
|
|
36
|
+
- Updated dependencies [47819c6]
|
|
37
|
+
- Updated dependencies [e1ce6f4]
|
|
38
|
+
- @procedures/collections@0.47.0
|
|
39
|
+
- @procedures/client@0.47.0
|
|
40
|
+
|
|
3
41
|
## 0.46.0
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -116,7 +154,7 @@
|
|
|
116
154
|
Migration:
|
|
117
155
|
|
|
118
156
|
- No step for a target that is not in `storageTargets`.
|
|
119
|
-
-
|
|
157
|
+
- Apps need no step, unless one of them uses `ViewMaterializer` with a target in a stored form. One app sets `storageTargets` at its step 8.
|
|
120
158
|
- To move a target to a stored form, add it to `storageTargets` in each materializer of the views. The first pass writes each row as a document of the storage. A row of the older form with the partition of the storage becomes a tombstone. A reader then reads the target through a `MongoDocumentStorage` with the same form.
|
|
121
159
|
|
|
122
160
|
### Patch Changes
|
|
@@ -202,7 +240,7 @@
|
|
|
202
240
|
|
|
203
241
|
Migration:
|
|
204
242
|
|
|
205
|
-
-
|
|
243
|
+
- Apps: an item with a dotted key or a `$` key below the top level needs MongoDB 5.0 or later. On a 4.x server, the write of such an item fails, because 0.34.0 stored it in `_json` and 0.35.0 stores it flat. An item that is already in `_json` reads as before.
|
|
206
244
|
- A view pipeline reads `"a.b"` as a nested path. A literal dotted key of an item is not reachable there without `$getField`.
|
|
207
245
|
|
|
208
246
|
### Patch Changes
|
|
@@ -227,7 +265,7 @@
|
|
|
227
265
|
|
|
228
266
|
Migration:
|
|
229
267
|
|
|
230
|
-
-
|
|
268
|
+
- Apps: no change at this time. The deprecated names work until the next MINOR.
|
|
231
269
|
- Before the next MINOR, replace `zodAdapter<T>(schema)` with `schema`. To keep the check of a schema against a type, write `const schema: z.ZodType<T> = ...`.
|
|
232
270
|
- Before the next MINOR, replace `typedAnySchema<T>()` and `outputSchema<T>()` with `typed<T>()`.
|
|
233
271
|
- A parse-only object (`{ parse }`) in `zodAdapter` becomes a Standard Schema with a `~standard` property.
|
|
@@ -561,9 +599,9 @@
|
|
|
561
599
|
Migration:
|
|
562
600
|
|
|
563
601
|
- **Site.** No change. The site does not write collections.
|
|
564
|
-
- **
|
|
565
|
-
- **
|
|
566
|
-
- **
|
|
602
|
+
- **An app with `HybridStorage`.** No change for a storage or a `HybridStorage` without `versionOf`. A `HybridStorage` with `versionOf` over `ApiStorage` needs a server storage with the same `versionOf` (for example `new InMemoryStorage({ versionOf })`), or the option `sendBaseVersions: false`.
|
|
603
|
+
- **An app with last-write-wins.** It gives no expected version, so nothing changes. Its own storage must refuse a write with an expected version until it tests one. Add the guard to its `set`, `delete` and `setBatch`, and run the contract suite: its first case tests the refusal. To adopt the version later, stamp a version field on the server, give the storage a `versionOf` that tests it in the write, and give the same `versionOf` to the `HybridStorage` of the client. Then add `createWithVersions` to the contract run.
|
|
604
|
+
- **An app without versions.** No change: it gives no expected version. A storage of the app that implements `CollectionStorage` must refuse a write with an expected version, as above.
|
|
567
605
|
- **Other storages.** Each class that implements `CollectionStorage` reads the new options of `set`, `delete` and `setBatch`. It tests them in the write, or it rejects the write with `preconditionNotSupported()`. It never ignores them.
|
|
568
606
|
|
|
569
607
|
### Patch Changes
|
|
@@ -668,7 +706,7 @@
|
|
|
668
706
|
- Targets from an older materializer, with the plain key as `_id`, need no migration step. The first pass of each view replaces the rows of its partition.
|
|
669
707
|
- Each pipeline goes through `scopePipeline` by default. It reads only its partition, in its sources, and the current generation of a target.
|
|
670
708
|
|
|
671
|
-
The
|
|
709
|
+
The jobs of CI with a replica set start MongoDB with the test commands, for the failpoint tests.
|
|
672
710
|
- 054ba7d: `ViewMaterializer`: a change reaches only the views of its partition when the partition is known (roadmap CLI-37). The filter only removes work: a change whose partition is unknown reaches the views of each partition, as before.
|
|
673
711
|
|
|
674
712
|
- A delete has no document in its change event. Its partition comes from the pre-image, when its collection has `changeStreamPreAndPostImages`.
|
|
@@ -694,7 +732,7 @@
|
|
|
694
732
|
These APIs are new in this release, so no released code changes. The procedure `mongo.documents.aggregate` keeps its input `maxTimeMS` in milliseconds: the wire keeps milliseconds.
|
|
695
733
|
- 3b2ddcd: New `scopePipeline()`: the guard of an aggregation pipeline over shared collections. The filter of the scope goes on each read of the pipeline and of its sub-pipelines. The pipeline reads and writes only the collections of the scope. Only the document stages of `ALLOWED_PIPELINE_STAGES` pass. `$out` and the JavaScript operators of the server are refused, and `$merge` needs a stamp. New `boundPipeline()`, `cutResults()` and `isTimeLimitError()` give the limits of time and size.
|
|
696
734
|
|
|
697
|
-
New `MongoDocumentStorage.aggregate()`: a read-only pipeline on the items of the partition, with these limits.
|
|
735
|
+
New `MongoDocumentStorage.aggregate()`: a read-only pipeline on the items of the partition, with these limits.
|
|
698
736
|
- Updated dependencies [61d60c6]
|
|
699
737
|
- Updated dependencies [79f750a]
|
|
700
738
|
- Updated dependencies [d0c9856]
|