diff --git a/fabric-common/types/index.d.ts b/fabric-common/types/index.d.ts index 02774b72a..9e7d48336 100644 --- a/fabric-common/types/index.d.ts +++ b/fabric-common/types/index.d.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import Long from 'long'; +import Long = require('long'); import * as fabproto6 from 'fabric-protos'; import winston = require('winston'); diff --git a/fabric-network/src/checkpointer.ts b/fabric-network/src/checkpointer.ts index 6757c5909..216c7a78e 100644 --- a/fabric-network/src/checkpointer.ts +++ b/fabric-network/src/checkpointer.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import Long from 'long'; +import Long = require('long'); export interface Checkpointer { addTransactionId(transactionId: string): Promise; diff --git a/fabric-network/src/events.ts b/fabric-network/src/events.ts index c7259b9a6..aabd745d6 100644 --- a/fabric-network/src/events.ts +++ b/fabric-network/src/events.ts @@ -7,7 +7,7 @@ import {BlockType, Endorser} from 'fabric-common'; import * as fabproto6 from 'fabric-protos'; import {Checkpointer} from './checkpointer'; -import Long from 'long'; +import Long = require('long'); export type EventType = BlockType; diff --git a/fabric-network/src/impl/event/blockeventsource.ts b/fabric-network/src/impl/event/blockeventsource.ts index b80203039..9993c15f9 100644 --- a/fabric-network/src/impl/event/blockeventsource.ts +++ b/fabric-network/src/impl/event/blockeventsource.ts @@ -15,7 +15,7 @@ import {newFullBlockEvent} from './fullblockeventfactory'; import {OrderedBlockQueue} from './orderedblockqueue'; import {newPrivateBlockEvent} from './privateblockeventfactory'; import {notNullish} from '../gatewayutils'; -import Long from 'long'; +import Long = require('long'); const logger = Logger.getLogger('BlockEventSource'); diff --git a/fabric-network/src/impl/event/orderedblockqueue.ts b/fabric-network/src/impl/event/orderedblockqueue.ts index 3183eec9e..a4921fff5 100644 --- a/fabric-network/src/impl/event/orderedblockqueue.ts +++ b/fabric-network/src/impl/event/orderedblockqueue.ts @@ -5,7 +5,7 @@ */ import {BlockEvent} from '../../events'; -import Long from 'long'; +import Long = require('long'); export class OrderedBlockQueue { private readonly queue = new Map(); diff --git a/fabric-network/src/impl/filecheckpointer.ts b/fabric-network/src/impl/filecheckpointer.ts index 69eb823ff..58192f1ad 100644 --- a/fabric-network/src/impl/filecheckpointer.ts +++ b/fabric-network/src/impl/filecheckpointer.ts @@ -5,7 +5,7 @@ */ import {Checkpointer} from '../checkpointer'; -import Long from 'long'; +import Long = require('long'); import * as fs from 'fs'; const encoding = 'utf8'; diff --git a/fabric-network/test/impl/event/commitlistener.spec.ts b/fabric-network/test/impl/event/commitlistener.spec.ts index 097ea0f2b..47413212c 100644 --- a/fabric-network/test/impl/event/commitlistener.spec.ts +++ b/fabric-network/test/impl/event/commitlistener.spec.ts @@ -16,7 +16,7 @@ import { Client, Eventer } from 'fabric-common'; -import Long from 'long'; +import Long = require('long'); import {NetworkImpl} from '../../../src/network'; import {EventServiceManager} from '../../../src/impl/event/eventservicemanager'; diff --git a/fabric-network/test/impl/event/contractlistener.spec.ts b/fabric-network/test/impl/event/contractlistener.spec.ts index 7e148c388..24f619989 100644 --- a/fabric-network/test/impl/event/contractlistener.spec.ts +++ b/fabric-network/test/impl/event/contractlistener.spec.ts @@ -12,7 +12,7 @@ import * as sinon from 'sinon'; import {expect} from 'chai'; -import Long from 'long'; +import Long = require('long'); import {Channel, Client, Endorser, Eventer, EventInfo, IdentityContext} from 'fabric-common'; import * as fabproto6 from 'fabric-protos'; diff --git a/fabric-network/test/impl/event/listeners.spec.ts b/fabric-network/test/impl/event/listeners.spec.ts index ffb39b7e1..ffdd3e57c 100644 --- a/fabric-network/test/impl/event/listeners.spec.ts +++ b/fabric-network/test/impl/event/listeners.spec.ts @@ -7,7 +7,7 @@ import * as Listeners from '../../../src/impl/event/listeners'; import {StubCheckpointer} from './stubcheckpointer'; import {BlockEvent, BlockListener, TransactionEvent, ContractEvent} from '../../../src/events'; -import Long from 'long'; +import Long = require('long'); import * as chai from 'chai'; import * as sinon from 'sinon'; diff --git a/fabric-network/test/impl/event/orderedblockqueue.spec.ts b/fabric-network/test/impl/event/orderedblockqueue.spec.ts index b01a85722..05deb59a1 100644 --- a/fabric-network/test/impl/event/orderedblockqueue.spec.ts +++ b/fabric-network/test/impl/event/orderedblockqueue.spec.ts @@ -6,7 +6,7 @@ import {BlockEvent} from '../../../src/events'; import {OrderedBlockQueue} from '../../../src/impl/event/orderedblockqueue'; -import Long from 'long'; +import Long = require('long'); import * as chai from 'chai'; const expect = chai.expect; diff --git a/fabric-network/test/impl/event/stubcheckpointer.ts b/fabric-network/test/impl/event/stubcheckpointer.ts index 56704e95a..b3126d3f5 100644 --- a/fabric-network/test/impl/event/stubcheckpointer.ts +++ b/fabric-network/test/impl/event/stubcheckpointer.ts @@ -5,7 +5,7 @@ */ import {Checkpointer} from '../../../src/checkpointer'; -import Long from 'long'; +import Long = require('long'); export class StubCheckpointer implements Checkpointer { private blockNumber: Long; diff --git a/fabric-network/test/impl/event/transactioneventhandler.spec.ts b/fabric-network/test/impl/event/transactioneventhandler.spec.ts index 6507209b0..ecc19c17b 100644 --- a/fabric-network/test/impl/event/transactioneventhandler.spec.ts +++ b/fabric-network/test/impl/event/transactioneventhandler.spec.ts @@ -19,7 +19,7 @@ import { EventInfo, IdentityContext } from 'fabric-common'; -import Long from 'long'; +import Long = require('long'); import {Gateway, ConnectedGatewayOptions} from '../../../src/gateway'; import {Network, NetworkImpl} from '../../../src/network'; diff --git a/fabric-network/test/impl/filecheckpointer.spec.ts b/fabric-network/test/impl/filecheckpointer.spec.ts index 19740c2c9..864e397d3 100644 --- a/fabric-network/test/impl/filecheckpointer.spec.ts +++ b/fabric-network/test/impl/filecheckpointer.spec.ts @@ -7,7 +7,7 @@ import {Checkpointer} from '../../src/checkpointer'; import {DefaultCheckpointers} from '../../src/defaultcheckpointers'; import * as testUtils from '../testutils'; -import Long from 'long'; +import Long = require('long'); import * as path from 'path'; import * as fs from 'fs'; import * as chai from 'chai'; diff --git a/test/ts-scenario/src/steps/lib/listeners.ts b/test/ts-scenario/src/steps/lib/listeners.ts index 19506fcdf..2f66df419 100644 --- a/test/ts-scenario/src/steps/lib/listeners.ts +++ b/test/ts-scenario/src/steps/lib/listeners.ts @@ -12,7 +12,7 @@ import * as Constants from '../constants'; import * as GatewayHelper from './gateway'; import * as BaseUtils from './utility/baseUtils'; import {StateStore} from './utility/stateStore'; -import Long from 'long'; +import Long = require('long'); import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; diff --git a/test/ts-scenario/src/steps/lib/utility/clientUtils.ts b/test/ts-scenario/src/steps/lib/utility/clientUtils.ts index c03b83b20..5be855874 100644 --- a/test/ts-scenario/src/steps/lib/utility/clientUtils.ts +++ b/test/ts-scenario/src/steps/lib/utility/clientUtils.ts @@ -15,7 +15,7 @@ import { StartRequestOptions, SendEventOptions, BuildProposalRequest, SendProposalRequest, EventRegistrationOptions, EventListener } from 'fabric-common'; import * as fs from 'fs'; -import Long from 'long'; +import Long = require('long'); import * as Constants from '../../constants'; import * as BaseUtils from './baseUtils'; import {CommonConnectionProfileHelper} from './commonConnectionProfileHelper';