@bobfrankston/mailx-imap 0.1.184 → 0.1.187

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 (2) hide show
  1. package/index.js +7 -2
  2. package/package.json +9 -9
package/index.js CHANGED
@@ -6310,9 +6310,10 @@ export class ImapManager extends EventEmitter {
6310
6310
  // semantically identical; don't overwrite local on those.
6311
6311
  const pollCloud = async () => {
6312
6312
  let cloudRead;
6313
+ let atomicWriteText;
6313
6314
  let parseJsonc;
6314
6315
  try {
6315
- ({ cloudRead } = await import("@bobfrankston/mailx-settings"));
6316
+ ({ cloudRead, atomicWriteText } = await import("@bobfrankston/mailx-settings"));
6316
6317
  ({ parseJsonc } = await import("jsonc-parser").then(m => ({ parseJsonc: m.parse })));
6317
6318
  }
6318
6319
  catch {
@@ -6344,7 +6345,11 @@ export class ImapManager extends EventEmitter {
6344
6345
  }
6345
6346
  catch { /* fall through to write */ }
6346
6347
  }
6347
- fs.writeFileSync(localPath, cloudContent);
6348
+ // 2026-09-13 17:20 EDT — Claude Code (Fable 5.1): crash-safe
6349
+ // write (tmp + fsync + rename). A kernel crash today zero-
6350
+ // filled a plainly-rewritten accounts.jsonc; see the note on
6351
+ // atomicWriteText in mailx-settings.
6352
+ atomicWriteText(localPath, cloudContent);
6348
6353
  console.log(` [cloud-poll] ${filename} updated from cloud copy`);
6349
6354
  // A file that didn't exist at startup never got an
6350
6355
  // fs.watch (watchOne skipped it), so the write above
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.184",
3
+ "version": "0.1.187",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,10 +9,10 @@
9
9
  },
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@bobfrankston/mailx-types": "^0.1.99",
13
- "@bobfrankston/mailx-settings": "^0.1.90",
14
- "@bobfrankston/mailx-store": "^0.1.125",
15
- "@bobfrankston/iflow-direct": "^0.1.68",
12
+ "@bobfrankston/mailx-types": "^0.1.101",
13
+ "@bobfrankston/mailx-settings": "^0.1.94",
14
+ "@bobfrankston/mailx-store": "^0.1.127",
15
+ "@bobfrankston/iflow-direct": "^0.1.69",
16
16
  "@bobfrankston/tcp-transport": "^0.1.8",
17
17
  "@bobfrankston/smtp-direct": "^0.1.9",
18
18
  "@bobfrankston/mailx-sync": "^0.1.29",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  ".transformedSnapshot": {
39
39
  "dependencies": {
40
- "@bobfrankston/mailx-types": "^0.1.99",
41
- "@bobfrankston/mailx-settings": "^0.1.90",
42
- "@bobfrankston/mailx-store": "^0.1.125",
43
- "@bobfrankston/iflow-direct": "^0.1.68",
40
+ "@bobfrankston/mailx-types": "^0.1.101",
41
+ "@bobfrankston/mailx-settings": "^0.1.94",
42
+ "@bobfrankston/mailx-store": "^0.1.127",
43
+ "@bobfrankston/iflow-direct": "^0.1.69",
44
44
  "@bobfrankston/tcp-transport": "^0.1.8",
45
45
  "@bobfrankston/smtp-direct": "^0.1.9",
46
46
  "@bobfrankston/mailx-sync": "^0.1.29",