Skip to content

feat: add support for node 24 #6363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4bfa2bc
docs(root): readme lists node 24
zahin-mohammad Jun 26, 2025
50927db
chore(root): nvmrc lists node v24.3.0
zahin-mohammad Jun 26, 2025
c6e0d2a
feat(root): modules support node engine 24
zahin-mohammad Jun 26, 2025
4360db7
feat(root): update @types/node for node 24
zahin-mohammad Jun 26, 2025
4e38dcf
chore(root): ci runs tests with node 24
zahin-mohammad Jun 26, 2025
ce66818
chore(root): all ci steps use node 24
zahin-mohammad Jun 26, 2025
ef50c6f
feat(root): express dockerfile uses node 24
zahin-mohammad Jun 26, 2025
e8f1dda
chore(utxo-lib): update `import =` to ES6 imports
zahin-mohammad Jun 26, 2025
ec38d83
fix(statics): tests support node 24
zahin-mohammad Jun 26, 2025
4d5a418
fix(utxo-lib): update for node 24
zahin-mohammad Jun 26, 2025
3599953
fix(statics): compiles with node 24
zahin-mohammad Jun 26, 2025
1ea27f3
chore(unspents): test updates for node 24
zahin-mohammad Jun 26, 2025
43dfba8
chore(blockapis): test updates for node 24
zahin-mohammad Jun 26, 2025
385448a
chore(sdk-coin-sui): test updates for node 24
zahin-mohammad Jun 26, 2025
f448be9
chore(bitgo): test updates for node 24
zahin-mohammad Jun 26, 2025
60ebf63
fix(statics): backwards compat enum type
zahin-mohammad Jun 26, 2025
86a9012
fix(utxo-lib): type-only import for BIP32Interface to resolve Node 24…
zahin-mohammad Jun 26, 2025
e8bd001
fix(utxo-bin): type-only import for BIP32Interface to resolve Node 24…
zahin-mohammad Jun 26, 2025
20a59ec
fix(utxo-staking): type-only import for ECPairInterface to resolve No…
zahin-mohammad Jun 26, 2025
9dd80cf
fix(sdk-api): type-only import for ECPairInterface to resolve Node 24…
zahin-mohammad Jun 26, 2025
b8342dc
chore(utxo-staking): use commonjs to run tests to use __dirname
mhahn2003 Jul 17, 2025
a1a4d40
fix(utxo-core): run tests in /dist to avoid strip-only mode
mhahn2003 Jul 18, 2025
98e360a
fix(utxo-staking): run test in /dist to avoid strip-only mode
mhahn2003 Jul 18, 2025
1ecc2d2
fix(abstract-eth): import type and class separately
mhahn2003 Jul 18, 2025
4bfd597
fix(account-lib): import type and class separately
mhahn2003 Jul 18, 2025
75a095d
chore(sdk-coin-ada): update import = to ES6 imports
mhahn2003 Jul 18, 2025
e3b4f33
chore: use as any instead of <any>
mhahn2003 Jul 18, 2025
408e342
chore: update import = to ES6 imports
mhahn2003 Jul 18, 2025
b9e046e
chore(sdk-core): resolve paillier import issues
mhahn2003 Jul 18, 2025
40fe544
chore(bitgo): update import = to ES6 imports
mhahn2003 Jul 21, 2025
d5dabc7
fix(statics): convert TypeScript enums to const assertions for Node.js
mhahn2003 Jul 21, 2025
aa187a1
chore(sdk-coin-cosmos): update node engine
mhahn2003 Jul 21, 2025
1e85b57
fix(sdk-coin-trx): run test in /dist to resolve imports
mhahn2003 Jul 21, 2025
16bf01b
fix(bitgo): resolve import errors by running test in /dist
mhahn2003 Jul 21, 2025
285d15c
fix(sdk-coin-trx): add glob package for glob support in node 18 and 20
mhahn2003 Jul 21, 2025
31e57f0
fix(sdk-coin-trx): unwrap glob syntax
mhahn2003 Jul 21, 2025
7bb3689
fix(bitgo): use import = and type to resolve errors
mhahn2003 Jul 21, 2025
d145236
fix(bitgo): resolve import issues
mhahn2003 Jul 21, 2025
b24d5e1
chore: fix audit issues
mhahn2003 Jul 22, 2025
1ddff26
fix(statics): rebase issue
mhahn2003 Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x, 24.x]

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -94,10 +94,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup node 18
- name: Setup node 24
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 18
node-version: 24

- name: restore lerna dependencies
id: lerna-cache
Expand All @@ -106,7 +106,7 @@ jobs:
path: |
node_modules
modules/*/node_modules
key: ${{ runner.os }}-node18-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json') }}-${{ hashFiles('package.json') }}
key: ${{ runner.os }}-node24-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json') }}-${{ hashFiles('package.json') }}

- name: Install Packages
if: steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE')
Expand Down Expand Up @@ -142,10 +142,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup node 18
- name: Setup node 24
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 18 # this just needs to pass our lock file requirement for compilation
node-version: 24 # this just needs to pass our lock file requirement for compilation

- name: Build Info
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 18
node-version: 24

- name: Install BitGoJS
run: yarn install --with-frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
v24.3.0
2 changes: 1 addition & 1 deletion DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Engines should be set to the following:
```json
{
"engines": {
"node": ">=18 <23",
"node": ">=18 < 25",
"npm": ">=3.10.10"
}
}
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# An elaborated scheme to build all the dependencies of all packages first in a cached layer
# https://stackoverflow.com/a/63142468/134409
# https://medium.com/@emilefugulin/building-a-sane-docker-image-for-typescript-lerna-and-prisma-2-76d8ff9926e4
FROM node:22.16.0-bookworm-slim@sha256:2f3571619daafc6b53232ebf2fcc0817c1e64795e92de317c1684a915d13f1a5 AS filter-packages-json
FROM node:24.3.0-bookworm-slim@sha256:dd773e49e639dafc0b425bf9ac1d74705086b9aebac960706ab146c5dfa0b32d AS filter-packages-json
LABEL maintainer="Developer Relations <[email protected]>"

COPY package.json yarn.lock lerna.json ./
Expand All @@ -12,7 +12,7 @@ COPY modules ./modules
# delete all the non package.json files under `./modules/`
RUN find modules \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf

FROM node:22.16.0-bookworm-slim@sha256:2f3571619daafc6b53232ebf2fcc0817c1e64795e92de317c1684a915d13f1a5 AS builder
FROM node:24.3.0-bookworm-slim@sha256:dd773e49e639dafc0b425bf9ac1d74705086b9aebac960706ab146c5dfa0b32d AS builder
RUN apt-get update && apt-get install -y git python3 make g++ libtool autoconf automake
WORKDIR /tmp/bitgo
COPY --from=filter-packages-json /tmp/bitgo .
Expand All @@ -31,7 +31,7 @@ RUN \
rm -r modules/*/src


FROM node:22.16.0-bookworm-slim@sha256:2f3571619daafc6b53232ebf2fcc0817c1e64795e92de317c1684a915d13f1a5
FROM node:24.3.0-bookworm-slim@sha256:dd773e49e639dafc0b425bf9ac1d74705086b9aebac960706ab146c5dfa0b32d
RUN apt-get update && apt-get install -y tini
# copy the root node_modules to the bitgo-express parent node_modules
COPY --from=builder /tmp/bitgo/node_modules /var/node_modules/
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ BitGoJS currently provides support for the following Node versions per package.j

```
"engines": {
"node": ">=18 <23",
"node": ">=18 <24",
"npm": ">=3.10.10"
}
```
Expand All @@ -62,6 +62,8 @@ As each Node LTS version reaches its end-of-life we will exclude that version fr

- `18`
- `20`
- `22`
- `24`

JavaScript package managers should allow you to install this package with any version of Node, with, at most, a warning if your version of Node does not fall within the range specified by our node engines property. If you encounter issues installing this package on a supported version of Node, please report the issue to us.

Expand Down
2 changes: 1 addition & 1 deletion examples/js/sui/custom-tx/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
v24.3.0
2 changes: 1 addition & 1 deletion examples/ts/proxy/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
v24.3.0
2 changes: 1 addition & 1 deletion examples/ts/tss-recovery/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
v24.3.0
2 changes: 1 addition & 1 deletion examples/ts/tss-smc/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
v24.3.0
2 changes: 1 addition & 1 deletion modules/abstract-cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/abstract-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion modules/abstract-eth/test/unit/token.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
import * as sdkTest from '@bitgo/sdk-test';
import type { TestBitGoAPI } from '@bitgo/sdk-test';

import { BitGoAPI } from '@bitgo/sdk-api';

const { TestBitGo } = sdkTest;

export function runTokenTestInitialization(
currentCoinToken,
coinName: string,
Expand Down
2 changes: 1 addition & 1 deletion modules/abstract-lightning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/abstract-substrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=14 <23"
"node": ">=14 < 25"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/abstract-utxo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/account-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "ISC",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"dependencies": {
"@bitgo/sdk-coin-ada": "^4.12.1",
Expand Down
18 changes: 7 additions & 11 deletions modules/account-lib/test/unit/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
import { BaseCoin } from '@bitgo/statics';
import {
BaseMessage,
BaseMessageBuilder,
BaseMessageBuilderFactory,
IMessage,
IMessageBuilder,
MessageOptions,
MessageStandardType,
} from '@bitgo/sdk-core';
import * as sdkCore from '@bitgo/sdk-core';
import type { IMessage, IMessageBuilder, MessageOptions } from '@bitgo/sdk-core';
const { BaseMessage, BaseMessageBuilder, BaseMessageBuilderFactory, MessageStandardType } = sdkCore;

type MessageStandardTypeValue = (typeof MessageStandardType)[keyof typeof MessageStandardType];

export class MockMessageBuilderFactory extends BaseMessageBuilderFactory {
constructor(coinConfig: Readonly<BaseCoin>) {
super(coinConfig);
}

getMessageBuilder(type: MessageStandardType): IMessageBuilder {
getMessageBuilder(type: MessageStandardTypeValue): IMessageBuilder {
return new MockMessageBuilder(this.coinConfig, type);
}
}

export class MockMessageBuilder extends BaseMessageBuilder {
constructor(coinConfig: Readonly<BaseCoin>, type: MessageStandardType = MessageStandardType.UNKNOWN) {
constructor(coinConfig: Readonly<BaseCoin>, type: MessageStandardTypeValue = MessageStandardType.UNKNOWN) {
super(coinConfig, type);
}

Expand Down
2 changes: 1 addition & 1 deletion modules/babylonlabs-io-btc-staking-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"btc-staking"
],
"engines": {
"node": ">=18 < 23"
"node": ">=18 < 25"
},
"author": "Babylon Labs Ltd.",
"license": "SEE LICENSE IN LICENSE",
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"license": "Apache-2.0",
"engines": {
"node": ">=18 <23",
"node": ">=18 < 25",
"npm": ">=3.10.10"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/ecdh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as utxolib from '@bitgo/utxo-lib';

import { getSharedSecret, signMessageWithDerivedEcdhKey, verifyEcdhSignature } from '@bitgo/sdk-core';
import { TestBitGo } from '@bitgo/sdk-test';
import * as assert from 'assert';
import assert from 'assert';
import { BitGo } from '../src/bitgo';

describe('ECDH utils', () => {
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/integration/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const TestBitGo = require('../lib/test_bitgo');
import * as utxolib from '@bitgo/utxo-lib';
import { getAddressP2PKH, getNetwork } from '../../src/bitcoin';
import { common } from '@bitgo/sdk-core';
import * as nock from 'nock';
import nock from 'nock';

const TEST_WALLET_LABEL = 'wallet management test';

Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/unit/bip32path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @prettier
*/
import 'should';
import { bip32, BIP32Interface } from '@bitgo/utxo-lib';
import { bip32, type BIP32Interface } from '@bitgo/utxo-lib';
import { sanitizeLegacyPath, bitcoin } from '@bitgo/sdk-core';
import { getSeed } from '@bitgo/sdk-test';
const { HDNode, hdPath } = bitcoin;
Expand Down
4 changes: 2 additions & 2 deletions modules/bitgo/test/unit/bitgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
//

import * as crypto from 'crypto';
import * as nock from 'nock';
import nock from 'nock';
import * as should from 'should';
import assert = require('assert');
import assert from 'assert';

import { common, generateGPGKeyPair } from '@bitgo/sdk-core';
import { bip32, ECPair } from '@bitgo/utxo-lib';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/unit/decryptKeychain.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'should';
import { decryptKeychainPrivateKey, OptionalKeychainEncryptedKey } from '@bitgo/sdk-core';
import { decryptKeychainPrivateKey, type OptionalKeychainEncryptedKey } from '@bitgo/sdk-core';
import { BitGoAPI } from '@bitgo/sdk-api';

describe('decryptKeychainPrivateKey', () => {
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/unit/keychains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

import * as _ from 'lodash';
import * as nock from 'nock';
import nock from 'nock';
import 'should';

import { common } from '@bitgo/sdk-core';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/integration/coins/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as should from 'should';
import 'should-http';

import { TestBitGo } from '../../../lib/test_bitgo';
import * as nock from 'nock';
import nock from 'nock';
nock.restore();

describe('ETH:', function () {
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/integration/coins/xlm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BaseCoin } from '../../../../src/v2';

import { TestBitGo } from '../../../lib/test_bitgo';

import * as nock from 'nock';
import nock from 'nock';

describe('XLM:', function () {
let bitgo: typeof TestBitGo;
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/integration/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as should from 'should';
import * as _ from 'lodash';
import * as nock from 'nock';
import nock from 'nock';

import { TestBitGo } from '../../lib/test_bitgo';

Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/lib/recovery-nocks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @prettier
*/
import * as nock from 'nock';
import nock from 'nock';
import { Environments } from '@bitgo/sdk-core';

module.exports.nockXrpRecovery = function nockXrpRecovery() {
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/PrebuildAndSign.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as sinon from 'sinon';
import * as nock from 'nock';
import nock from 'nock';

import { Environments, Wallet } from '@bitgo/sdk-core';
import { TestableBG, TestBitGo } from '@bitgo/sdk-test';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/accountConsolidations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as sinon from 'sinon';
require('should-sinon');

import '../lib/asserts';
import * as nock from 'nock';
import nock from 'nock';

import { common, Wallet } from '@bitgo/sdk-core';

Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/ams/ams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as should from 'should';
import * as nock from 'nock';
import nock from 'nock';

import { Environments } from '@bitgo/sdk-core';
import { TestBitGo } from '@bitgo/sdk-test';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/apiNocks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as nock from 'nock';
import nock from 'nock';

export async function nockGetSigningKey(params: {
userId: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as nock from 'nock';
import nock from 'nock';
import 'should';
import * as sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/baseCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

import 'should';
import * as nock from 'nock';
import nock from 'nock';

import { TestBitGo } from '@bitgo/sdk-test';
import { BitGo } from '../../../src/bitgo';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/coins/utxo/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @prettier
*/
import 'should';
import * as assert from 'assert';
import assert from 'assert';
import * as utxolib from '@bitgo/utxo-lib';
const { chainCodes } = utxolib.bitgo;

Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/coins/utxo/coins.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'assert';
import assert from 'assert';
import * as utxolib from '@bitgo/utxo-lib';

import { getUtxoCoinForNetwork, utxoCoins } from './util';
Expand Down
2 changes: 1 addition & 1 deletion modules/bitgo/test/v2/unit/coins/utxo/keySignatures.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'assert';
import assert from 'assert';
import { AbstractUtxoCoin } from '@bitgo/abstract-utxo';
import { Keychain } from '@bitgo/sdk-core';

Expand Down
Loading