@procedures/collections 0.56.0 → 0.57.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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/dist/testing/index.d.ts +0 -8
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -8
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/storage-contract.d.ts +3 -2
- package/dist/testing/storage-contract.d.ts.map +1 -1
- package/dist/testing/storage-contract.js +162 -155
- package/dist/testing/storage-contract.js.map +1 -1
- package/package.json +11 -2
- package/src/testing/index.ts +0 -9
- package/src/testing/storage-contract.ts +163 -155
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @procedures/collections
|
|
2
2
|
|
|
3
|
+
## 0.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f284167: The entry `@procedures/collections/testing` removes `ContractViolation` and `deepEqual`. A check of the contract suite that fails throws the `AssertionError` of `node:assert`. The suite does not import `@mark1russell7/collections/testing`.
|
|
8
|
+
|
|
9
|
+
The suite uses `rejects` of `@mark1russell7/rigor-testkit`. That package is an optional peer dependency of `@procedures/collections`. The runtime entries do not use it.
|
|
10
|
+
|
|
11
|
+
Migration for each package that starts the suite in its tests:
|
|
12
|
+
|
|
13
|
+
1. Add `@mark1russell7/rigor-testkit` `^0.1.4` to `devDependencies`.
|
|
14
|
+
2. Replace `deepEqual(a, b)` with `isDeepStrictEqual(a, b)` of `node:util`. That function also compares the prototypes.
|
|
15
|
+
3. A test that expects a `ContractViolation` from the suite expects the `AssertionError` of `node:assert`. A check that a promise rejects throws an `Error`.
|
|
16
|
+
|
|
17
|
+
MINOR: a breaking change before 1.0.0. It removes two exports of the entry `./testing`.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- @procedures/client@0.57.0
|
|
22
|
+
|
|
3
23
|
## 0.56.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -326,7 +326,7 @@ describeCollectionStorageContract(
|
|
|
326
326
|
- It tests the preconditions of the writes. A storage of `create()` must reject a write with an expected version. With `createWithVersions`, the suite tests the conflicts, the current items, `null`, the batches, and two writes at the same time.
|
|
327
327
|
- A case for an optional method skips a storage without the method.
|
|
328
328
|
- A random sequence of writes runs against a `Map`. Each saved version must give the right changes, in the order of the last change of each id.
|
|
329
|
-
- The suite imports no test framework. The caller gives `describe` and `it`, and a failed check throws `
|
|
329
|
+
- The suite imports no test framework. The caller gives `describe` and `it`, and a failed check throws the `AssertionError` of `node:assert`. The `rejects` check comes from `@mark1russell7/rigor-testkit`, an optional peer dependency that this entry needs. The runtime entries do not import this entry.
|
|
330
330
|
- The suite has no option that hides a difference of a storage. Before, the options `copies` and `nullValues` declared the differences, and the suite sorted each delta.
|
|
331
331
|
|
|
332
332
|
| Storage | Package | Notes |
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -6,12 +6,4 @@
|
|
|
6
6
|
* `describe` and `it`. The runtime entries of the package do not import this entry.
|
|
7
7
|
*/
|
|
8
8
|
export { collectionStorageContract, contractVersionOf, describeCollectionStorageContract, type CollectionStorageContractOptions, type ContractCase, type ContractItem, type ContractStorage, type ContractTestApi, type ContractTestContext, } from "./storage-contract.js";
|
|
9
|
-
export {
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated A later MINOR removes this name. The checks of the suite then throw the `AssertionError` of
|
|
12
|
-
* `node:assert`.
|
|
13
|
-
*/
|
|
14
|
-
ContractViolation,
|
|
15
|
-
/** @deprecated A later MINOR removes this name. Use `isDeepStrictEqual` of `node:util`. */
|
|
16
|
-
deepEqual, } from "@mark1russell7/collections/testing";
|
|
17
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,EACjC,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,EACjC,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC"}
|
package/dist/testing/index.js
CHANGED
|
@@ -6,12 +6,4 @@
|
|
|
6
6
|
* `describe` and `it`. The runtime entries of the package do not import this entry.
|
|
7
7
|
*/
|
|
8
8
|
export { collectionStorageContract, contractVersionOf, describeCollectionStorageContract, } from "./storage-contract.js";
|
|
9
|
-
export {
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated A later MINOR removes this name. The checks of the suite then throw the `AssertionError` of
|
|
12
|
-
* `node:assert`.
|
|
13
|
-
*/
|
|
14
|
-
ContractViolation,
|
|
15
|
-
/** @deprecated A later MINOR removes this name. Use `isDeepStrictEqual` of `node:util`. */
|
|
16
|
-
deepEqual, } from "@mark1russell7/collections/testing";
|
|
17
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,GAOlC,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,GAOlC,MAAM,uBAAuB,CAAC"}
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* `@procedures/sqlite`. Before, each package copied the cases of `InMemoryStorage`.
|
|
7
7
|
*
|
|
8
8
|
* The suite is in the test-only entry `@procedures/collections/testing`. It imports no test
|
|
9
|
-
* framework: the caller gives `describe` and `it`, and the checks throw `
|
|
10
|
-
* storage package imports the suite without a cycle, and a runtime entry
|
|
9
|
+
* framework: the caller gives `describe` and `it`, and the checks throw the `AssertionError` of
|
|
10
|
+
* `node:assert`. So a storage package imports the suite without a cycle, and a runtime entry does
|
|
11
|
+
* not load vitest.
|
|
11
12
|
*
|
|
12
13
|
* ```ts
|
|
13
14
|
* import { describe, it } from "vitest";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-contract.d.ts","sourceRoot":"","sources":["../../src/testing/storage-contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storage-contract.d.ts","sourceRoot":"","sources":["../../src/testing/storage-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAsC,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAKL,KAAK,kBAAkB,EAGxB,MAAM,0BAA0B,CAAC;AAUlC,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,8BAA8B;AAC9B,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAE9D;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAExE;AAED,8DAA8D;AAC9D,MAAM,W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