Skip to content

Commit

Permalink
fix: get rid of redundant dependencies (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 authored Oct 12, 2023
1 parent a212f05 commit c1b13d9
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 124 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ jobs:
registry-url: "https://registry.npmjs.org"
- name: Install dependencies and build
run: npm ci && npm run build
- name: Create .env-public-analytics file
run: |
echo "RUDDER_STACK_KEY=${{ secrets.RUDDER_STACK_KEY }}" > .env-public-analytics
echo "RUDDER_STACK_DATAPLANE_URL=${{ secrets.RUDDER_STACK_DATAPLANE_URL }}" >> .env-public-analytics
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# Include specific files
!bin/**/*
!.env-public-analytics
!package.json
!package-lock.json
!LICENSE-MIT
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ If you're using [local setup (dockerized testing node)](https://github.com/matte
At the moment, we don't have any tests, but we are working on it.
In the meantime, you can test the code manually by running the code in [development mode](#run-in-development-mode).

### 📊 Tracking

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`.

## 🌍 Official Links

- [Website](https://zksync.io/)
Expand Down
4 changes: 0 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@
"**/*.ts": "tsc-files --noEmit"
},
"dependencies": {
"@rudderstack/rudder-sdk-node": "^2.0.5",
"chalk": "4.1.2",
"commander": "^11.0.0",
"compare-versions": "^6.1.0",
"cross-env": "^7.0.3",
"dotenv": "^16.3.1",
"eslint-import-resolver-typescript": "^3.6.1",
"ethers": "5.7.2",
"inquirer": "^8.1.4",
"node-machine-id": "^1.1.12",
"ofetch": "^1.3.3",
"winston": "^3.10.0",
"zkcli-dockerized-node": "^1.0.2",
"zkcli-in-memory-node": "^1.0.3",
Expand Down
4 changes: 0 additions & 4 deletions src/commands/bridge/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
zeekOption,
} from "../../common/options.js";
import { l2Chains } from "../../data/chains.js";
import { track } from "../../utils/analytics.js";
import { ETH_TOKEN } from "../../utils/constants.js";
import { bigNumberToDecimal, decimalToBigNumber } from "../../utils/formatters.js";
import {
Expand Down Expand Up @@ -119,8 +118,6 @@ export const handler = async (options: DepositOptions) => {
Logger.info(` Transaction link: ${fromChain.explorerUrl}/tx/${depositHandle.hash}`);
}

track("deposit", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });

const senderBalance = await l1Provider.getBalance(senderWallet.address);
Logger.info(`\nSender L1 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);

Expand All @@ -130,7 +127,6 @@ export const handler = async (options: DepositOptions) => {
} catch (error) {
Logger.error("There was an error while depositing funds:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
4 changes: 0 additions & 4 deletions src/commands/bridge/withdraw-finalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import inquirer from "inquirer";
import Program from "./command.js";
import { chainOption, l1RpcUrlOption, l2RpcUrlOption, privateKeyOption, zeekOption } from "../../common/options.js";
import { l2Chains } from "../../data/chains.js";
import { track } from "../../utils/analytics.js";
import { bigNumberToDecimal } from "../../utils/formatters.js";
import {
getAddressFromPrivateKey,
Expand Down Expand Up @@ -117,8 +116,6 @@ export const handler = async (options: WithdrawFinalizeOptions) => {
const receipt = await finalizationHandle.wait();
Logger.info(` Finalization transaction was mined in block ${receipt.blockNumber}`);

track("confirm-withdraw", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });

const senderBalance = await l1Provider.getBalance(senderWallet.address);
Logger.info(`\nSender L1 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);

Expand All @@ -128,7 +125,6 @@ export const handler = async (options: WithdrawFinalizeOptions) => {
} catch (error) {
Logger.error("There was an error while finalizing withdrawal:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
4 changes: 0 additions & 4 deletions src/commands/bridge/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
zeekOption,
} from "../../common/options.js";
import { l2Chains } from "../../data/chains.js";
import { track } from "../../utils/analytics.js";
import { ETH_TOKEN } from "../../utils/constants.js";
import { bigNumberToDecimal, decimalToBigNumber } from "../../utils/formatters.js";
import {
Expand Down Expand Up @@ -119,8 +118,6 @@ export const handler = async (options: WithdrawOptions) => {
Logger.info(` Transaction link: ${fromChain.explorerUrl}/tx/${withdrawHandle.hash}`);
}

track("withdraw", { network: toChain?.network ?? "Unknown chain", zeek: options.zeek });

const senderBalance = await l2Provider.getBalance(senderWallet.address);
Logger.info(`\nSender L2 balance after transaction: ${bigNumberToDecimal(senderBalance)} ETH`);

Expand All @@ -130,7 +127,6 @@ export const handler = async (options: WithdrawOptions) => {
} catch (error) {
Logger.error("There was an error while withdrawing funds:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
4 changes: 0 additions & 4 deletions src/commands/create/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import path from "path";

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

track("create", { template: options.template, zeek: options.zeek });

if (options.zeek) {
zeek();
}
} catch (error) {
Logger.error("There was an error while creating new project:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/clean.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

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

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import inquirer from "inquirer";
import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { ModuleCategory } from "./modules/Module.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

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

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Option } from "commander";

import Program from "./command.js";
import { modulesPath } from "./modules/Module.js";
import { track } from "../../utils/analytics.js";
import { executeCommand } from "../../utils/helpers.js";
import Logger from "../../utils/logger.js";

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

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import chalk from "chalk";

import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

export const handler = async () => {
Expand Down Expand Up @@ -34,7 +33,6 @@ export const handler = async () => {
} catch (error) {
Logger.error("There was an error displaying logs:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/modules/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import chalk from "chalk";

import { track } from "../../../utils/analytics.js";
import Logger from "../../../utils/logger.js";
import Program from "../command.js";
import configHandler from "../ConfigHandler.js";
Expand Down Expand Up @@ -30,7 +29,6 @@ export const handler = async () => {
} catch (error) {
Logger.error("There was an error displaying installed modules:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/restart.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Program from "./command.js";
import { handler as start } from "./start.js";
import { handler as stop } from "./stop.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

export const handler = async () => {
Expand All @@ -11,7 +10,6 @@ export const handler = async () => {
} catch (error) {
Logger.error("There was an error while restarting the testing environment:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { setupConfig } from "./config.js";
import configHandler from "./ConfigHandler.js";
import { ModuleCategory } from "./modules/Module.js";
import { getModulesRequiringUpdates } from "./modules/utils/updates.js";
import { track } from "../../utils/analytics.js";
import { formatLogs } from "../../utils/formatters.js";
import Logger from "../../utils/logger.js";

Expand Down Expand Up @@ -111,7 +110,6 @@ export const handler = async () => {
} catch (error) {
Logger.error("There was an error while starting the testing environment:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/stop.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

export const handler = async () => {
Expand All @@ -11,7 +10,6 @@ export const handler = async () => {
} catch (error) {
Logger.error("There was an error while stopping the testing environment:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { modulesPath } from "./modules/Module.js";
import { findDefaultModules } from "./modules/utils/packages.js";
import { track } from "../../utils/analytics.js";
import { executeCommand } from "../../utils/helpers.js";
import Logger from "../../utils/logger.js";

Expand Down Expand Up @@ -34,7 +33,6 @@ export const handler = async (moduleNames: string[], options: { unlink: boolean
} catch (error) {
Logger.error("There was an error while uninstalling module:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/commands/dev/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Option } from "commander";
import Program from "./command.js";
import configHandler from "./ConfigHandler.js";
import { modulesPath } from "./modules/Module.js";
import { track } from "../../utils/analytics.js";
import { executeCommand } from "../../utils/helpers.js";
import Logger from "../../utils/logger.js";

Expand Down Expand Up @@ -67,7 +66,6 @@ export const handler = async (moduleNames: string[], options: ModuleUpdateOption
} catch (error) {
Logger.error("There was an error while updating module:");
Logger.error(error);
track("error", { error });
}
};

Expand Down
50 changes: 0 additions & 50 deletions src/utils/analytics.ts

This file was deleted.

Loading

0 comments on commit c1b13d9

Please sign in to comment.