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

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e81d495
docs(root): readme lists node 24
zahin-mohammad Jun 26, 2025
79a08fb
chore(root): nvmrc lists node v24.3.0
zahin-mohammad Jun 26, 2025
af2e3ad
feat(root): modules support node engine 24
zahin-mohammad Jun 26, 2025
b00a313
feat(root): update @types/node for node 24
zahin-mohammad Jun 26, 2025
3f42022
chore(root): ci runs tests with node 24
zahin-mohammad Jun 26, 2025
6b28e25
chore(root): all ci steps use node 24
zahin-mohammad Jun 26, 2025
0fed478
feat(root): express dockerfile uses node 24
zahin-mohammad Jun 26, 2025
50d1afa
chore(utxo-lib): update `import =` to ES6 imports
zahin-mohammad Jun 26, 2025
2f20514
fix(statics): convert TypeScript enums to const assertions for Node.j…
zahin-mohammad Jun 26, 2025
ae55d99
fix(statics): tests support node 24
zahin-mohammad Jun 26, 2025
a93100b
fix(utxo-lib): update for node 24
zahin-mohammad Jun 26, 2025
14f971b
fix(statics): compiles with node 24
zahin-mohammad Jun 26, 2025
56410ca
chore(unspents): test updates for node 24
zahin-mohammad Jun 26, 2025
cb699e0
chore(blockapis): test updates for node 24
zahin-mohammad Jun 26, 2025
a8ea467
chore(sdk-coin-sui): test updates for node 24
zahin-mohammad Jun 26, 2025
8dfec04
chore(bitgo): test updates for node 24
zahin-mohammad Jun 26, 2025
8e5f47c
fix(statics): backwards compat enum type
zahin-mohammad Jun 26, 2025
d6c454a
fix(utxo-lib): type-only import for BIP32Interface to resolve Node 24…
zahin-mohammad Jun 26, 2025
582a77f
fix(utxo-bin): type-only import for BIP32Interface to resolve Node 24…
zahin-mohammad Jun 26, 2025
dcfba95
fix(utxo-staking): type-only import for ECPairInterface to resolve No…
zahin-mohammad Jun 26, 2025
83fd785
fix(sdk-api): type-only import for ECPairInterface to resolve Node 24…
zahin-mohammad Jun 26, 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 @@ -17,7 +17,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@v4
Expand Down Expand Up @@ -90,10 +90,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup node 18
- name: Setup node 24
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 24

- name: restore lerna dependencies
id: lerna-cache
Expand All @@ -102,7 +102,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 @@ -138,10 +138,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup node 18
- name: Setup node 24
uses: actions/setup-node@v3
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 @@ -20,7 +20,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 24

- name: Install BitGoJS
run: yarn install --with-frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_package_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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@v3
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
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-algo": "^2.3.3",
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
4 changes: 3 additions & 1 deletion modules/bitgo/test/v2/unit/coins/utxo/recovery/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import { Bsv } from '@bitgo/sdk-coin-bsv';

type Unspent<TNumber extends number | bigint = number> = bitgo.Unspent<TNumber>;
export class MockRecoveryProvider implements RecoveryProvider {
public unspents: Unspent<bigint>[];
private prevTxCache: Record<string, string> = {};
constructor(public unspents: Unspent<bigint>[]) {
constructor(unspents: Unspent<bigint>[]) {
this.unspents = unspents;
this.unspents.forEach((u) => {
if (utxolib.bitgo.isUnspentWithPrevTx(u)) {
const { txid } = bitgo.parseOutputId(u.id);
Expand Down
9 changes: 8 additions & 1 deletion modules/blockapis/test/UtxoApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ type MethodArguments = unknown[];
* A test case for a UtxoApi method.
*/
class TestCase<T> {
public coinName: string;
public methodName: keyof UtxoApi;
public args: unknown[];
/**
* @param coinName - coin to test
* @param methodName - method to test
* @param args - method arguments
*/
constructor(public coinName: string, public methodName: keyof UtxoApi, public args: unknown[]) {}
constructor(coinName: string, methodName: keyof UtxoApi, args: unknown[]) {
this.coinName = coinName;
this.methodName = methodName;
this.args = args;
}

/**
* Call the method on the given API.
Expand Down
2 changes: 1 addition & 1 deletion modules/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@types/express": "4.17.13",
"@types/lodash": "^4.14.121",
"@types/morgan": "^1.7.35",
"@types/node": "^22.15.29",
"@types/node": "^24.0.4",
"@types/sinon": "^10.0.11",
"@types/supertest": "^2.0.11",
"keccak": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-api/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EnvironmentName, IRequestTracer, V1Network } from '@bitgo/sdk-core';
import { ECPairInterface } from '@bitgo/utxo-lib';
import type { ECPairInterface } from '@bitgo/utxo-lib';
import { type Agent } from 'http';

const patchedRequestMethods = ['get', 'post', 'put', 'del', 'patch', 'options'] as const;
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-ada/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-algo/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-apechain/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-apt/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": ">=16 <23"
"node": ">=16 < 25"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-arbeth/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-asi/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-atom/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-avaxc/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-avaxp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"author": "BitGo SDK Team <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=18 <23"
"node": ">=18 < 25"
},
"lint-staged": {
"*.{js,ts}": [
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-baby/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bch/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bcha/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bera/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bld/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bsc/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
2 changes: 1 addition & 1 deletion modules/sdk-coin-bsv/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
Loading
Loading