Skip to content

refactor: Replace Node.js Buffer operations with Web-standard APIs for convex v8 - #19

Merged
Simplereally merged 2 commits into
mainfrom
fix/crypto-issues-with-convex-v8-env
Jan 17, 2026
Merged

Simplereally merged 2 commits into
mainfrom
fix/crypto-issues-with-convex-v8-env

Conversation

@Simplereally

@Simplereally Simplereally commented Jan 17, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Refactor
    • Reworked internal cryptographic utilities to use web-standard data encoding/decoding and byte handling.
    • Maintains existing external APIs and behavior for encryption/decryption while improving compatibility with the target runtime.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Jan 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
bloomstudio Canceled Canceled Jan 17, 2026 11:46am

@coderabbitai

coderabbitai Bot commented Jan 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Refactored convex/lib/crypto.ts to remove Node.js Buffer usage and adopt Web-standard helpers (hex/base64/concat, TextEncoder/TextDecoder, Uint8Array) and Web Crypto buffer handling for getEncryptionKey, encryptApiKey, and decryptApiKey, preserving existing function signatures and encryption/decryption control flow. (47 words)

Changes

Cohort / File(s) Summary
Crypto module refactor
convex/lib/crypto.ts
Replaced Buffer-based conversions with Web-standard helpers (hexToBytes, bytesToBase64, base64ToBytes, concatBytes) and TextEncoder/TextDecoder. Updated getEncryptionKey to import key from Uint8Array/BufferSource. Updated encryptApiKey/decryptApiKey to use iv and ciphertext as BufferSource, concat bytes, and base64 encode/decode. No exported signatures changed.

Sequence Diagram(s)

(omitted — changes are refactor of conversions and do not introduce new multi-component control flows)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰
A nibble of bytes, now light and free,
Hex to base64 with a hop and a plea.
TextEncoder hums, TextDecoder sings,
V8 smiles wide on these Webby things.
Encrypt, decrypt — carrot-powered keys.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing Node.js Buffer operations with Web-standard APIs for Convex v8 compatibility, which aligns with the complete refactor described in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Simplereally
Simplereally merged commit f2a54da into main Jan 17, 2026
1 of 2 checks passed
@Simplereally
Simplereally deleted the fix/crypto-issues-with-convex-v8-env branch January 17, 2026 11:45
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