Skip to content

Commit e379ead

Browse files
fix: convert import equals declarations to ES6 imports for Node.js 24 compatibility
Replace `import assert = require('assert')` with `import assert from 'assert'` to resolve "TypeScript import equals declaration is not supported in strip-only. TICKET: WP-5182 TICKET: WP-5182
1 parent 56618ae commit e379ead

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

examples/ts/tss-recovery/eddsa-recovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Eddsa } from '@bitgo/sdk-core';
22
import * as fs from 'fs';
3-
import assert = require('assert');
3+
import assert from 'assert';
44
import { bigIntFromBufferBE, bigIntFromBufferLE, Ed25519Bip32HdTree } from '@bitgo/sdk-lib-mpc';
55
import sjcl = require('sjcl');
66

examples/ts/tss-recovery/mpcv2-recovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ECDSAUtils } from '@bitgo/sdk-core';
22
import * as crypto from 'crypto';
33
import * as fs from 'fs';
44
import * as secp256k1 from 'secp256k1';
5-
import assert = require('assert');
5+
import assert from 'assert';
66
import { bigIntFromBufferBE, bigIntToBufferBE, HDTree, Secp256k1Bip32HdTree } from '@bitgo/sdk-lib-mpc';
77

88
const sampleMessage = "Hello, World!";

modules/bitgo/test/unit/bitgo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as crypto from 'crypto';
66
import * as nock from 'nock';
77
import * as should from 'should';
8-
import assert = require('assert');
8+
import assert from 'assert';
99

1010
import { common, generateGPGKeyPair } from '@bitgo/sdk-core';
1111
import { bip32, ECPair } from '@bitgo/utxo-lib';

modules/bitgo/test/v2/unit/internal/tssUtils/bitgoMpcGpgPubKeys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { TestBitGo } from '@bitgo/sdk-test';
1212
import { BitGo } from '../../../../../src';
1313
import * as openpgp from 'openpgp';
1414
import nock = require('nock');
15-
import assert = require('assert');
15+
import assert from 'assert';
1616

1717
class TestEcdsaMpcv2Utils extends ECDSAUtils.EcdsaMPCv2Utils {
1818
public async testPickBitgoPubGpgKeyForSigning(

modules/utxo-lib/src/taproot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki
44

55
import { TapTree as PsbtTapTree, TapLeaf as PsbtTapLeaf } from 'bip174/src/lib/interfaces';
6-
import assert = require('assert');
6+
import assert from 'assert';
77
import FastPriorityQueue = require('fastpriorityqueue');
88
import { script as bscript, crypto as bcrypto, payments as bpayments } from 'bitcoinjs-lib';
99
import { ecc as eccLib } from './noble_ecc';

modules/utxo-lib/test/bitgo/Unspent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert = require('assert');
1+
import assert from 'assert';
22
import { unspentSum } from '../../src/bitgo';
33

44
function mockUnspent<TNumber extends number | bigint>(value: TNumber) {

scripts/tests/prepareRelease/fixtures/diffs/beta-prerelease.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ index adcd1a70e..c17617aa9 100644
570570
+++ b/modules/bitgo/test/unit/bitgo.ts
571571
@@ -7,13 +7,13 @@ import * as nock from 'nock';
572572
import * as should from 'should';
573-
import assert = require('assert');
573+
import assert from 'assert';
574574

575575
-import { common, generateGPGKeyPair } from '@bitgo/sdk-core';
576576
-import { bip32, ECPair } from '@bitgo/utxo-lib';
@@ -1318,7 +1318,7 @@ index c605d07fa..e96309659 100644
13181318
import { BitGo } from '../../../../src';
13191319
-import { BlsUtils, common, IBlsKeyPair, Keychain } from '@bitgo/sdk-core';
13201320
+import { BlsUtils, common, IBlsKeyPair, Keychain } from '@bitgo-beta/sdk-core';
1321-
import assert = require('assert');
1321+
import assert from 'assert';
13221322
-import { Eth2 } from '@bitgo/sdk-coin-eth2';
13231323
+import { Eth2 } from '@bitgo-beta/sdk-coin-eth2';
13241324

0 commit comments

Comments
 (0)