@sovereignbase/sequencer 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![JSR](https://jsr.io/badges/@sovereignbase/sequencer)](https://jsr.io/@sovereignbase/sequencer)
3
3
  [![CI](https://github.com/sovereignbase/sequencer/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/sovereignbase/sequencer/actions/workflows/ci.yaml)
4
4
  [![codecov](https://codecov.io/gh/sovereignbase/sequencer/branch/master/graph/badge.svg)](https://codecov.io/gh/sovereignbase/sequencer)
5
- [![license](https://img.shields.io/npm/l/@sovereignbase/sequencer)](LICENSE)
5
+ [![license](https://img.shields.io/npm/l/@sovereignbase/sequencer)](https://github.com/sovereignbase/sequencer/blob/master/LICENSE)
6
6
 
7
7
  # Sequencer
8
8
 
@@ -29,18 +29,32 @@ projection.destroy()
29
29
 
30
30
  ### See documentation
31
31
 
32
- - [How sequencer works?](/INTERNALS.md)
32
+ - [How sequencer works?](INTERNALS.md)
33
33
  - [Typescript](https://sovereignbase.dev/sequencer/)
34
34
  - [C++](https://sovereignbase.dev/sequencer/c++)
35
35
 
36
+ ### Errors
37
+
38
+ Library-reported failures throw `SequencerError`, with a stable `SequencerErrorCode`
39
+ and a message prefixed with `{@sovereignbase/sequencer}`. Both are exported from
40
+ the package. The constructor accepts standard `ErrorOptions`, including `cause`.
41
+
42
+ | Code | Meaning |
43
+ | ------------------------- | ------------------------------------------------------------------- |
44
+ | `PROJECTION_DESTROYED` | An operation was called after the Projection was destroyed. |
45
+ | `NATIVE_OPERATION_FAILED` | The native runtime reported an initialization or operation failure. |
46
+
47
+ Invalid Gossip or Sequence input to `apply()` or `merge()` returns `undefined`.
48
+ Platform errors retain their original types.
49
+
36
50
  ## Benchmarks
37
51
 
38
52
  ### Moderate bundle size
39
53
 
40
54
  | Format | Raw (KiB) | Minified (KiB) | Minified + gzip (KiB) |
41
55
  | -------- | --------: | -------------: | --------------------: |
42
- | ESM | 123.83 | 100.04 | 36.07 |
43
- | CommonJS | 123.94 | 100.86 | 36.28 |
56
+ | ESM | 125.98 | 100.80 | 36.45 |
57
+ | CommonJS | 126.12 | 101.49 | 36.53 |
44
58
 
45
59
  Both bundles include WASM. Terser uses three compression passes; gzip uses level 9.
46
60
 
@@ -152,7 +166,7 @@ Peer synchronization, encoding and JS process garbage collection are outside API
152
166
 
153
167
  ### Behaviour guaranteed by excessive tests
154
168
 
155
- The latest verification passed 178 Vitest tests and 88 compatibility checks (1 failed).
169
+ The latest verification passed 184 Vitest tests and 96 compatibility checks (1 failed).
156
170
  The configured 100% coverage threshold is met (100% statements, 100% branches, 100% functions, 100% lines).
157
171
  See the [test suites](test/README.md) and
158
172
  [automated test report](https://sovereignbase.dev/sequencer/tests/).