Skip to content

Commit c1b13d9

Browse files
authored
fix: get rid of redundant dependencies (#69)
1 parent a212f05 commit c1b13d9

21 files changed

+28
-124
lines changed

.github/workflows/release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ jobs:
2222
registry-url: "https://registry.npmjs.org"
2323
- name: Install dependencies and build
2424
run: npm ci && npm run build
25-
- name: Create .env-public-analytics file
26-
run: |
27-
echo "RUDDER_STACK_KEY=${{ secrets.RUDDER_STACK_KEY }}" > .env-public-analytics
28-
echo "RUDDER_STACK_DATAPLANE_URL=${{ secrets.RUDDER_STACK_DATAPLANE_URL }}" >> .env-public-analytics
2925
- name: Release
3026
env:
3127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# Include specific files
55
!bin/**/*
6-
!.env-public-analytics
76
!package.json
87
!package-lock.json
98
!LICENSE-MIT

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ If you're using [local setup (dockerized testing node)](https://github.com/matte
8181
At the moment, we don't have any tests, but we are working on it.
8282
In the meantime, you can test the code manually by running the code in [development mode](#run-in-development-mode).
8383

84-
### 📊 Tracking
85-
86-
zkSync-cli tracks its usage for the single purpose of providing data so it can be improved. Data is fully anonymized. If you want to disable the tracking, set the environment variable `NO_TRACKING` to `true`.
87-
8884
## 🌍 Official Links
8985

9086
- [Website](https://zksync.io/)

package-lock.json

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-4
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,13 @@
3434
"**/*.ts": "tsc-files --noEmit"
3535
},
3636
"dependencies": {
37-
"@rudderstack/rudder-sdk-node": "^2.0.5",
3837
"chalk": "4.1.2",
3938
"commander": "^11.0.0",
4039
"compare-versions": "^6.1.0",
4140
"cross-env": "^7.0.3",
4241
"dotenv": "^16.3.1",
43-
"eslint-import-resolver-typescript": "^3.6.1",
4442
"ethers": "5.7.2",
4543
"inquirer": "^8.1.4",
46-
"node-machine-id": "^1.1.12",
47-
"ofetch": "^1.3.3",
4844
"winston": "^3.10.0",
4945
"zkcli-dockerized-node": "^1.0.2",
5046
"zkcli-in-memory-node": "^1.0.3",

src/commands/bridge/deposit.ts

-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
zeekOption,
1212
} from "../../common/options.js";
1313
import { l2Chains } from "../../data/chains.js";
14-
import { track } from "../../utils/analytics.js";
1514
import { ETH_TOKEN } from "../../utils/constants.js";
1615
import { bigNumberToDecimal, decimalToBigNumber } from "../../utils/formatters.js";
1716
import {
@@ -119,8 +118,6 @@ export const handler = async (options: DepositOptions) => {
119118
Logger.info(` Transaction link: ${fromChain.explorerUrl}/tx/${depositHandle.hash}`);
120119
}
121120

122-
track("deposit", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });
123-
124121
const senderBalance = await l1Provider.getBalance(senderWallet.address);
125122
Logger.info(`\nSender L1 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);
126123

@@ -130,7 +127,6 @@ export const handler = async (options: DepositOptions) => {
130127
} catch (error) {
131128
Logger.error("There was an error while depositing funds:");
132129
Logger.error(error);
133-
track("error", { error });
134130
}
135131
};
136132

src/commands/bridge/withdraw-finalize.ts

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import inquirer from "inquirer";
44
import Program from "./command.js";
55
import { chainOption, l1RpcUrlOption, l2RpcUrlOption, privateKeyOption, zeekOption } from "../../common/options.js";
66
import { l2Chains } from "../../data/chains.js";
7-
import { track } from "../../utils/analytics.js";
87
import { bigNumberToDecimal } from "../../utils/formatters.js";
98
import {
109
getAddressFromPrivateKey,
@@ -117,8 +116,6 @@ export const handler = async (options: WithdrawFinalizeOptions) => {
117116
const receipt = await finalizationHandle.wait();
118117
Logger.info(` Finalization transaction was mined in block ${receipt.blockNumber}`);
119118

120-
track("confirm-withdraw", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });
121-
122119
const senderBalance = await l1Provider.getBalance(senderWallet.address);
123120
Logger.info(`\nSender L1 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);
124121

@@ -128,7 +125,6 @@ export const handler = async (options: WithdrawFinalizeOptions) => {
128125
} catch (error) {
129126
Logger.error("There was an error while finalizing withdrawal:");
130127
Logger.error(error);
131-
track("error", { error });
132128
}
133129
};
134130

src/commands/bridge/withdraw.ts

-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
zeekOption,
1212
} from "../../common/options.js";
1313
import { l2Chains } from "../../data/chains.js";
14-
import { track } from "../../utils/analytics.js";
1514
import { ETH_TOKEN } from "../../utils/constants.js";
1615
import { bigNumberToDecimal, decimalToBigNumber } from "../../utils/formatters.js";
1716
import {
@@ -119,8 +118,6 @@ export const handler = async (options: WithdrawOptions) => {
119118
Logger.info(` Transaction link: ${fromChain.explorerUrl}/tx/${withdrawHandle.hash}`);
120119
}
121120

122-
track("withdraw", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });
123-
124121
const senderBalance = await l2Provider.getBalance(senderWallet.address);
125122
Logger.info(`\nSender L2 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);
126123

@@ -130,7 +127,6 @@ export const handler = async (options: WithdrawOptions) => {
130127
} catch (error) {
131128
Logger.error("There was an error while withdrawing funds:");
132129
Logger.error(error);
133-
track("error", { error });
134130
}
135131
};
136132

src/commands/create/create.ts

-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import path from "path";
66

77
import Program from "./command.js";
88
import { zeekOption } from "../../common/options.js";
9-
import { track } from "../../utils/analytics.js";
109
import { fileOrDirExists } from "../../utils/files.js";
1110
import { cloneRepo } from "../../utils/git.js";
1211
import { optionNameToParam, executeCommand } from "../../utils/helpers.js";
@@ -111,15 +110,12 @@ ${chalk.magentaBright("Further Reading:")}
111110
Check out the README file for more details: ${path.join(folderLocation, "README.md")}
112111
`);
113112

114-
track("create", { template: options.template, zeek: options.zeek });
115-
116113
if (options.zeek) {
117114
zeek();
118115
}
119116
} catch (error) {
120117
Logger.error("There was an error while creating new project:");
121118
Logger.error(error);
122-
track("error", { error });
123119
}
124120
};
125121

src/commands/dev/clean.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Program from "./command.js";
22
import configHandler from "./ConfigHandler.js";
3-
import { track } from "../../utils/analytics.js";
43
import Logger from "../../utils/logger.js";
54

65
import type Module from "./modules/Module.js";
@@ -27,7 +26,6 @@ export const handler = async () => {
2726
} catch (error) {
2827
Logger.error("There was an error while cleaning the testing environment:");
2928
Logger.error(error);
30-
track("error", { error });
3129
}
3230
};
3331

src/commands/dev/config.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import inquirer from "inquirer";
44
import Program from "./command.js";
55
import configHandler from "./ConfigHandler.js";
66
import { ModuleCategory } from "./modules/Module.js";
7-
import { track } from "../../utils/analytics.js";
87
import Logger from "../../utils/logger.js";
98

109
import type { ModuleNode } from "./modules/Module.js";
@@ -125,7 +124,6 @@ export const handler = async (options: LocalConfigOptions = {}) => {
125124
} catch (error) {
126125
Logger.error("There was an error while configuring the testing environment:");
127126
Logger.error(error);
128-
track("error", { error });
129127
}
130128
};
131129

src/commands/dev/install.ts

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Option } from "commander";
33

44
import Program from "./command.js";
55
import { modulesPath } from "./modules/Module.js";
6-
import { track } from "../../utils/analytics.js";
76
import { executeCommand } from "../../utils/helpers.js";
87
import Logger from "../../utils/logger.js";
98

@@ -25,7 +24,6 @@ export const handler = async (moduleNames: string[], options: { link: boolean })
2524
} catch (error) {
2625
Logger.error("There was an error while installing module:");
2726
Logger.error(error);
28-
track("error", { error });
2927
}
3028
};
3129

src/commands/dev/logs.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import chalk from "chalk";
22

33
import Program from "./command.js";
44
import configHandler from "./ConfigHandler.js";
5-
import { track } from "../../utils/analytics.js";
65
import Logger from "../../utils/logger.js";
76

87
export const handler = async () => {
@@ -34,7 +33,6 @@ export const handler = async () => {
3433
} catch (error) {
3534
Logger.error("There was an error displaying logs:");
3635
Logger.error(error);
37-
track("error", { error });
3836
}
3937
};
4038

src/commands/dev/modules/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import chalk from "chalk";
22

3-
import { track } from "../../../utils/analytics.js";
43
import Logger from "../../../utils/logger.js";
54
import Program from "../command.js";
65
import configHandler from "../ConfigHandler.js";
@@ -30,7 +29,6 @@ export const handler = async () => {
3029
} catch (error) {
3130
Logger.error("There was an error displaying installed modules:");
3231
Logger.error(error);
33-
track("error", { error });
3432
}
3533
};
3634

src/commands/dev/restart.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Program from "./command.js";
22
import { handler as start } from "./start.js";
33
import { handler as stop } from "./stop.js";
4-
import { track } from "../../utils/analytics.js";
54
import Logger from "../../utils/logger.js";
65

76
export const handler = async () => {
@@ -11,7 +10,6 @@ export const handler = async () => {
1110
} catch (error) {
1211
Logger.error("There was an error while restarting the testing environment:");
1312
Logger.error(error);
14-
track("error", { error });
1513
}
1614
};
1715

src/commands/dev/start.ts

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { setupConfig } from "./config.js";
55
import configHandler from "./ConfigHandler.js";
66
import { ModuleCategory } from "./modules/Module.js";
77
import { getModulesRequiringUpdates } from "./modules/utils/updates.js";
8-
import { track } from "../../utils/analytics.js";
98
import { formatLogs } from "../../utils/formatters.js";
109
import Logger from "../../utils/logger.js";
1110

@@ -111,7 +110,6 @@ export const handler = async () => {
111110
} catch (error) {
112111
Logger.error("There was an error while starting the testing environment:");
113112
Logger.error(error);
114-
track("error", { error });
115113
}
116114
};
117115

src/commands/dev/stop.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Program from "./command.js";
22
import configHandler from "./ConfigHandler.js";
3-
import { track } from "../../utils/analytics.js";
43
import Logger from "../../utils/logger.js";
54

65
export const handler = async () => {
@@ -11,7 +10,6 @@ export const handler = async () => {
1110
} catch (error) {
1211
Logger.error("There was an error while stopping the testing environment:");
1312
Logger.error(error);
14-
track("error", { error });
1513
}
1614
};
1715

src/commands/dev/uninstall.ts

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Program from "./command.js";
55
import configHandler from "./ConfigHandler.js";
66
import { modulesPath } from "./modules/Module.js";
77
import { findDefaultModules } from "./modules/utils/packages.js";
8-
import { track } from "../../utils/analytics.js";
98
import { executeCommand } from "../../utils/helpers.js";
109
import Logger from "../../utils/logger.js";
1110

@@ -34,7 +33,6 @@ export const handler = async (moduleNames: string[], options: { unlink: boolean
3433
} catch (error) {
3534
Logger.error("There was an error while uninstalling module:");
3635
Logger.error(error);
37-
track("error", { error });
3836
}
3937
};
4038

src/commands/dev/update.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Option } from "commander";
44
import Program from "./command.js";
55
import configHandler from "./ConfigHandler.js";
66
import { modulesPath } from "./modules/Module.js";
7-
import { track } from "../../utils/analytics.js";
87
import { executeCommand } from "../../utils/helpers.js";
98
import Logger from "../../utils/logger.js";
109

@@ -67,7 +66,6 @@ export const handler = async (moduleNames: string[], options: ModuleUpdateOption
6766
} catch (error) {
6867
Logger.error("There was an error while updating module:");
6968
Logger.error(error);
70-
track("error", { error });
7169
}
7270
};
7371

src/utils/analytics.ts

-50
This file was deleted.

0 commit comments

Comments
 (0)