@remit/mailbox-service 0.0.14 → 0.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/mailbox-service",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -135,15 +135,6 @@ describe("parseChangeCursor / formatChangeCursor", () => {
135
135
  assert.equal(parseChangeCursor("abc").modseq, 0n);
136
136
  assert.equal(parseChangeCursor("500:abc").modseq, 500n);
137
137
  });
138
-
139
- it("survives a numeric column value", () => {
140
- // SQLite hands back a number whatever the declared column type.
141
- assert.deepEqual(parseChangeCursor(900 as unknown as string), {
142
- modseq: 900n,
143
- group: 0n,
144
- uid: 0,
145
- });
146
- });
147
138
  });
148
139
 
149
140
  describe("dropAppliedPrefix", () => {
@@ -95,10 +95,7 @@ export interface ChangeCursor {
95
95
  * would not fit.
96
96
  */
97
97
  export const parseChangeCursor = (raw: string | undefined): ChangeCursor => {
98
- // SQLite gives a numeric column back as a number whatever the declared
99
- // type, so normalize before parsing rather than trusting the static type.
100
- const text = raw === undefined || raw === null ? "" : String(raw);
101
- const [left, right] = text.split(":");
98
+ const [left, right] = (raw ?? "").split(":");
102
99
 
103
100
  if (right === undefined) {
104
101
  return { modseq: parseModseq(left), group: 0n, uid: 0 };