Skip to content

Commit

Permalink
fix(deps): fix batch of missing production dependencies v2.0.0-rc.1
Browse files Browse the repository at this point in the history
Huge diff, simple changes:
1. Where applicable, I added `import type {..}` instead of `import {...}`
so that we do not need the dependency in the production dependencies.
2. For imports where the code imported was actually used at runtime I
altered the package.json file so that the dependency is marked as a production
dependency and therefore won't crash anymore when being imported in isolation
(e.g. outside of the mono-repo dev build).

Fixes hyperledger-cacti#3344

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz authored and sandeepnRES committed Jul 30, 2024
1 parent a3f5113 commit 4a7c875
Show file tree
Hide file tree
Showing 36 changed files with 64 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"setup-credentials": "node dist/lib/main/typescript/scripts/setup-credentials.js"
},
"dependencies": {
"@aries-framework/anoncreds": "0.5.0-alpha.71",
"@aries-framework/anoncreds-rs": "0.5.0-alpha.71",
"@aries-framework/askar": "0.5.0-alpha.71",
"@aries-framework/core": "0.5.0-alpha.71",
"@aries-framework/indy-vdr": "0.5.0-alpha.71",
"@aries-framework/node": "0.5.0-alpha.71",
"@hyperledger/anoncreds-nodejs": "0.2.0",
"@hyperledger/aries-askar-nodejs": "0.2.0",
"@hyperledger/indy-vdr-nodejs": "0.2.0",
Expand All @@ -60,13 +66,7 @@
"loglevel": "1.8.1"
},
"devDependencies": {
"@aries-framework/anoncreds": "0.5.0-alpha.71",
"@aries-framework/anoncreds-rs": "0.5.0-alpha.71",
"@aries-framework/askar": "0.5.0-alpha.71",
"@aries-framework/core": "0.5.0-alpha.71",
"@aries-framework/indy-sdk": "0.5.0-alpha.71",
"@aries-framework/indy-vdr": "0.5.0-alpha.71",
"@aries-framework/node": "0.5.0-alpha.71",
"@types/inquirer": "8.2.6"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Server } from "http";
import { Server as SecureServer } from "https";
import { v4 as uuidv4 } from "uuid";
import { Express } from "express";
import type { Express } from "express";
import { promisify } from "util";
import { Optional } from "typescript-optional";
import { RuntimeError } from "run-time-error-cjs";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
IWebServiceEndpoint,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
IWebServiceEndpoint,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";

import { Logger, Checks } from "@hyperledger/cactus-common";
import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common";
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-cmd-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"dependencies": {
"@bufbuild/protobuf": "1.8.0",
"@connectrpc/connect": "1.4.0",
"@connectrpc/connect-express": "1.4.0",
"@connectrpc/connect-fastify": "1.4.0",
Expand Down Expand Up @@ -101,7 +102,6 @@
},
"devDependencies": {
"@bufbuild/buf": "1.30.0",
"@bufbuild/protobuf": "1.8.0",
"@bufbuild/protoc-gen-es": "1.8.0",
"@connectrpc/protoc-gen-connect-es": "1.4.0",
"@hyperledger/cactus-plugin-keychain-vault": "2.0.0-rc.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/cactus-core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"dependencies": {
"@grpc/grpc-js": "1.10.3",
"@hyperledger/cactus-common": "2.0.0-rc.1",
"axios": "1.6.0"
"axios": "1.6.0",
"google-protobuf": "3.21.2"
},
"devDependencies": {
"@bufbuild/protobuf": "1.8.0",
"@connectrpc/connect": "1.4.0",
"@grpc/grpc-js": "1.10.3",
"@grpc/proto-loader": "0.7.8",
"@types/express": "4.17.21",
"@types/google-protobuf": "3.15.5",
"google-protobuf": "3.21.2",
"grpc-tools": "1.12.4",
"grpc_tools_node_protoc_ts": "5.3.3",
"make-dir-cli": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Response, Request } from "express";
import type { Express, Response, Request } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
4 changes: 2 additions & 2 deletions packages/cactus-plugin-keychain-memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"dependencies": {
"@bufbuild/protobuf": "1.8.0",
"@connectrpc/connect": "1.4.0",
"@hyperledger/cactus-common": "2.0.0-rc.1",
"@hyperledger/cactus-core": "2.0.0-rc.1",
"@hyperledger/cactus-core-api": "2.0.0-rc.1",
Expand All @@ -69,9 +71,7 @@
},
"devDependencies": {
"@bufbuild/buf": "1.30.0",
"@bufbuild/protobuf": "1.8.0",
"@bufbuild/protoc-gen-es": "1.8.0",
"@connectrpc/connect": "1.4.0",
"@connectrpc/protoc-gen-connect-es": "1.4.0",
"@types/body-parser": "1.19.4",
"@types/express": "4.17.21",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express } from "express";
import type { Express } from "express";

import OAS from "../json/openapi.json";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";
import {
ConnectionEventTypes,
ConnectionStateChangedEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";
import { ProofStateChangedEvent, ProofEventTypes } from "@aries-framework/core";

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Server } from "http";
import { Server as SecureServer } from "https";
import type { Server } from "http";
import type { Server as SecureServer } from "https";
import { setTimeout } from "timers/promises";

import type { Server as SocketIoServer } from "socket.io";
Expand All @@ -16,7 +16,7 @@ import type { WebsocketProvider } from "web3-core";
import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum";

import { Contract, ContractSendMethod } from "web3-eth-contract";
import { TransactionReceipt } from "web3-eth";
import type { TransactionReceipt } from "web3-eth";
import {
GetBalanceV1Request,
GetBalanceV1Response,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";
import Web3 from "web3";

import { Logger, Checks } from "@hyperledger/cactus-common";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Server } from "http";
import { Server as SecureServer } from "https";
import { Config as SshConfig } from "node-ssh";
import { Express } from "express";
import type { Server } from "http";
import type { Server as SecureServer } from "https";
import type { Config as SshConfig } from "node-ssh";
import type { Express } from "express";

import OAS from "../json/openapi.json";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Express, Request, Response } from "express";
import { Config as SshConfig } from "node-ssh";
import type { Express, Request, Response } from "express";
import type { Config as SshConfig } from "node-ssh";

import {
IWebServiceEndpoint,
Expand All @@ -20,7 +20,7 @@ import {
LogLevelDesc,
} from "@hyperledger/cactus-common";

import { IEndpointAuthzOptions } from "@hyperledger/cactus-core-api";
import type { IEndpointAuthzOptions } from "@hyperledger/cactus-core-api";

import {
DefaultApi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Express, Request, Response } from "express";
import type { Express, Request, Response } from "express";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@hyperledger/cactus-core": "2.0.0-rc.1",
"@hyperledger/cactus-core-api": "2.0.0-rc.1",
"axios": "1.6.0",
"ethers": "6.8.1",
"express": "4.19.2",
"http-proxy-middleware": "2.0.6",
"minimist": "1.2.8",
Expand All @@ -96,7 +97,6 @@
"@types/uuid": "9.0.8",
"body-parser": "1.20.2",
"chalk": "4.1.2",
"ethers": "6.8.1",
"js-yaml": "4.1.0",
"socket.io": "4.5.4",
"uuid": "9.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Web3, { BlockHeaderOutput, FMT_BYTES, FMT_NUMBER } from "web3";
import { NewHeadsSubscription } from "web3-eth";
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";

import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ import {
} from "node-ssh";

import { Checks, Logger } from "@hyperledger/cactus-common";
import { FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1 } from "@hyperledger/cactus-test-tooling";

import {
import type {
DeployContractGoSourceV1Request,
DeployContractGoSourceV1Response,
} from "../generated/openapi/typescript-axios/api";
import { IPluginLedgerConnectorFabricOptions } from "../plugin-ledger-connector-fabric";
import type { IPluginLedgerConnectorFabricOptions } from "../plugin-ledger-connector-fabric";
import { sshExec } from "../common/ssh-exec";
import { findAndReplaceFabricLoggingSpec } from "../common/find-and-replace-fabric-logging-spec";
import { IQueryInstalledResponse } from "../peer/i-query-installed-response";
import type { IQueryInstalledResponse } from "../peer/i-query-installed-response";
import { isSshExecOk } from "../common/is-ssh-exec-ok";
import { IQueryCommittedResponse } from "../peer/i-query-committed-response";
import type { IQueryCommittedResponse } from "../peer/i-query-committed-response";

const FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1 =
"/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem";

/**
* Constant value holding the default $GOPATH in the Fabric CLI container as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import {
safeStringifyException,
} from "@hyperledger/cactus-common";

import {
import type {
BlockType,
Channel,
EventCallback,
EventInfo,
IdentityContext,
} from "fabric-common";
import { BlockEvent, BlockListener, EventType, Gateway } from "fabric-network";
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";
import { v4 as uuidv4 } from "uuid";
import { RuntimeError } from "run-time-error-cjs";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@polkadot/rpc-provider": "10.9.1",
"@polkadot/types": "10.9.1",
"@polkadot/util": "12.6.2",
"axios": "1.6.0",
"bl": "5.0.0",
"express": "4.19.2",
"express-openapi-validator": "4.13.1",
Expand Down Expand Up @@ -100,7 +101,6 @@
"@types/supertest": "2.0.11",
"@types/temp": "0.9.1",
"@types/uuid": "9.0.8",
"axios": "1.6.0",
"supertest": "6.1.6"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@hyperledger/cactus-core": "2.0.0-rc.1",
"@hyperledger/cactus-core-api": "2.0.0-rc.1",
"axios": "1.6.0",
"ethers": "6.8.1",
"express": "4.19.2",
"http-errors-enhanced-cjs": "2.0.0",
"minimist": "1.2.8",
Expand All @@ -87,7 +88,6 @@
"@types/uuid": "9.0.8",
"body-parser": "1.20.2",
"chalk": "4.1.2",
"ethers": "6.8.1",
"socket.io": "4.5.4",
"uuid": "9.0.1",
"web3-core": "1.6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import type {
Socket as SocketIoSocket,
} from "socket.io";

import { Express } from "express";
import type { Express } from "express";
import Web3 from "web3";
import Web3JsQuorum, {
IWeb3Quorum,
ISendRawTransaction,
IPrivateTransactionReceipt,
} from "web3js-quorum";
import {
import type {
WebsocketProviderOptions,
HttpProviderOptions,
} from "web3-core-helpers";
import { AbiItem } from "web3-utils";
import type { AbiItem } from "web3-utils";
import { Contract } from "web3-eth-contract";
import { ContractSendMethod } from "web3-eth-contract";
import { TransactionReceipt } from "web3-eth";
import type { ContractSendMethod } from "web3-eth-contract";
import type { TransactionReceipt } from "web3-eth";

import { BadRequestError } from "http-errors-enhanced-cjs";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
WatchBlocksV1,
WatchBlocksV1BlockData,
} from "../generated/openapi/typescript-axios";
import { Socket as SocketIoSocket } from "socket.io";
import type { Socket as SocketIoSocket } from "socket.io";
import Web3 from "web3";

export interface IWatchBlocksV1EndpointConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Server } from "http";
import { Server as SecureServer } from "https";

import { Express } from "express";
import type { Express } from "express";
import Web3 from "web3";

import { Contract } from "web3-eth-contract";
import { TransactionReceipt } from "web3-eth";
import type { Contract } from "web3-eth-contract";
import type { TransactionReceipt } from "web3-eth";

import OAS from "../json/openapi.json";

Expand Down
Loading

0 comments on commit 4a7c875

Please sign in to comment.