From 92f5e1c33a0df900f9e90105d9e97d30ecaa3274 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 16 Dec 2025 14:27:11 -0500 Subject: [PATCH] ci: upgrade to Node.js 20 for native globalThis.crypto support --- .github/workflows/release.yml | 2 +- src/utils/crypto-adapter.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb46c39..62bcb1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' cache: 'npm' - name: Install dependencies diff --git a/src/utils/crypto-adapter.ts b/src/utils/crypto-adapter.ts index 47c0b96..1a17f81 100644 --- a/src/utils/crypto-adapter.ts +++ b/src/utils/crypto-adapter.ts @@ -15,7 +15,7 @@ function getCrypto(): Crypto { return window.crypto; } - // Node.js/Electron environment - globalThis.crypto available in modern runtimes + // Node.js/Electron environment - globalThis.crypto available in Node 20+ if (typeof globalThis !== 'undefined' && globalThis.crypto) { return globalThis.crypto; }