Skip to content

chore(deps): bump @e4a/pg-js to ^1.5.0#94

Merged
rubenhensen merged 1 commit intomainfrom
chore/bump-pg-js-1.5
May 7, 2026
Merged

chore(deps): bump @e4a/pg-js to ^1.5.0#94
rubenhensen merged 1 commit intomainfrom
chore/bump-pg-js-1.5

Conversation

@rubenhensen
Copy link
Copy Markdown
Contributor

Picks up encryption4all/postguard-js#52 (resumable downloads via Range on transient failures) and #47 (chunk PUT retry/backoff with exponential jitter, surfacing of `UploadSessionExpiredError`). Skips 1.4.0 in passing — same SDK lineage, single bump grabs both.

Public-API note

pg-js's `downloadFileWithRetry` now returns the `ReadableStream` synchronously instead of wrapping it in a Promise. The addon does not call that function directly — it consumes pg-js via `PostGuard.open()` / `Opened.decrypt()`, which is unchanged. No addon-side code change needed.

Stream-level errors that previously surfaced as a Promise rejection from `await downloadFileWithRetry` now surface on the consumer's first `read()`. Since the addon's only access path is through `Opened.decrypt()`, those errors continue to propagate via the surrounding `await`.

Test plan

  • `npm install` — resolves to 1.5.0
  • `npx tsc --noEmit` clean
  • `npx vitest run` — 21 passed (108 todo, pre-existing)
  • `npm run build` — Build complete
  • Manual: load the addon in Thunderbird against dev cryptify, send + receive an encrypted message and confirm decryption works end-to-end

Picks up encryption4all/postguard-js#52 (resumable downloads via
Range header on transient stream failures). Skips the 1.4.0 release
in passing — same SDK lineage; jumping straight to 1.5.0 gets both
the chunk-PUT retry/backoff (1.4) and the download Range-resume (1.5)
in one go.

Public-API note: pg-js's `downloadFileWithRetry` now returns the
ReadableStream synchronously rather than wrapped in a Promise. This
addon does not call that function directly — it consumes pg-js via
`PostGuard.open()` / `Opened.decrypt()` which is unchanged — so no
addon-side code change needed.

`tsc --noEmit`, `vitest run`, and `npm run build` all clean.
@rubenhensen
Copy link
Copy Markdown
Contributor Author

/dobby please review this dependency bump

@dobby-coder
Copy link
Copy Markdown
Contributor

dobby-coder Bot commented May 7, 2026

Dobby sees the request! Dobby will check the pg-js bump, verify the lockfile resolution, validate the API note about the synchronous ReadableStream, and confirm tests/build pass. Dobby will be back with findings shortly.

Copy link
Copy Markdown
Contributor

@dobby-coder dobby-coder Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary — LGTM ✅

This bumps @e4a/pg-js from ^1.3.0^1.5.0, picking up postguard-js #47 (chunk PUT retry + exponential backoff, UploadSessionExpiredError) and #52 (Range-based resumable downloads). Both upstream PRs are merged to pg-js main.

Verified locally

  • package-lock.json resolves @e4a/pg-js@1.5.0 with a valid integrity hash.
  • npm install clean, no advisories.
  • npx tsc --noEmit passes.
  • npx vitest run — 21 passed, 108 todo (pre-existing baseline).
  • npm run build — Build complete.
  • CI build job is green; release correctly skipped (no version tag).

API-impact verification

The PR body claims the addon is unaffected by the upstream signature change to downloadFileWithRetry (now returns ReadableStream synchronously instead of Promise<ReadableStream>). I confirmed this:

  • The addon only imports from pg-js: PostGuard, DecryptDataResult, DecryptFileResult (yivi-popup.ts) and buildMime, extractCiphertext, extractUploadUuid, injectMimeHeaders (background.ts). No direct downloadFileWithRetry call.
  • Decryption goes through pg.open({...}).decrypt(...) (yivi-popup.ts:161-177), which is awaited. Stream-level read errors propagate through that await as before.
  • Internally, pg-js's decrypt.ts now wraps the synchronous ReadableStream inside Promise.all — non-thenable values are passed through unchanged, so the call site is still correct.

Notes

  • The unchecked manual end-to-end Thunderbird test in the test plan is the only remaining item; everything else automated is green.
  • No transitive dep red flags.

Recommend: ready for merge once the manual TB roundtrip is done.

@rubenhensen
Copy link
Copy Markdown
Contributor Author

Thanks @dobby-coder for the approval. Manual TB roundtrip against dev cryptify before merge — flagged in the test plan, will run before flipping.

@rubenhensen
Copy link
Copy Markdown
Contributor Author

@rubenhensen all dobby checks green — ready for your review and merge when you've run the manual smoke tests called out in the test plan.

@rubenhensen rubenhensen merged commit b91e657 into main May 7, 2026
2 checks passed
@rubenhensen rubenhensen deleted the chore/bump-pg-js-1.5 branch May 7, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant