Skip to content

refactor!: remove uncrypto dependency#153

Merged
pi0 merged 1 commit intomainfrom
build/uncrypto
May 7, 2025
Merged

refactor!: remove uncrypto dependency#153
pi0 merged 1 commit intomainfrom
build/uncrypto

Conversation

@pi0
Copy link
Copy Markdown
Member

@pi0 pi0 commented May 7, 2025

Since Node.js 18 is EOL and all supported runtime versions support global Crypto, we can drop the uncrypto dependency.

If for any reason Node.js 18 support is still needed, a light global polyfill can be used. (that's why we don't enforce node version via engines field to allow such polyfill)

import nodeCrypto from "node:crypto";

// globalThis.crypto support for Node.js 18
if (!globalThis.crypto) {
  globalThis.crypto = nodeCrypto as unknown as Crypto;
}

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/message.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@pi0 pi0 merged commit 5761668 into main May 7, 2025
3 of 4 checks passed
@pi0 pi0 deleted the build/uncrypto branch May 7, 2025 12:00
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