Skip to content

Commit

Permalink
chore: Setup Syncpack (#4902)
Browse files Browse the repository at this point in the history
### Description

- Setup Syncpack which can check for package version inconsistencies
across the monorepo
- Run `yarn syncpack fix-mismatches` to fix existing issues


### Backward compatibility

Yes
  • Loading branch information
jmrossy authored Nov 26, 2024
1 parent fa6d5f5 commit e32ee59
Show file tree
Hide file tree
Showing 15 changed files with 547 additions and 1,654 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
exit 1
fi
# Check for mismatched dep versions across the monorepo
- name: syncpack
run: yarn syncpack list-mismatches

lint-prettier:
runs-on: ubuntu-latest
needs: [yarn-install]
Expand Down
3 changes: 3 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dependencyTypes": ["prod", "dev"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"husky": "^8.0.0",
"lint-staged": "^12.4.3",
"prettier": "^2.8.8",
"tsx": "^4.7.1"
"syncpack": "^13.0.0",
"tsx": "^4.19.1"
},
"dependencies": {
"@changesets/cli": "^2.26.2"
Expand Down
4 changes: 2 additions & 2 deletions solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@hyperlane-xyz/utils": "7.1.0",
"@layerzerolabs/lz-evm-oapp-v2": "2.0.2",
"@openzeppelin/contracts": "^4.9.3",
"@openzeppelin/contracts-upgradeable": "^v4.9.3",
"@openzeppelin/contracts-upgradeable": "^4.9.3",
"fx-portal": "^1.0.3"
},
"devDependencies": {
Expand All @@ -19,7 +19,7 @@
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/node": "^18.14.5",
"chai": "4.5.0",
"chai": "^4.5.0",
"ethereum-waffle": "^4.0.10",
"ethers": "^5.7.2",
"hardhat": "^2.22.2",
Expand Down
6 changes: 3 additions & 3 deletions typescript/ccip-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
"license": "Apache-2.0",
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/node": "^16.9.1",
"@types/node": "^18.14.5",
"eslint": "^9.15.0",
"jest": "^29.7.0",
"nodemon": "^3.0.3",
"prettier": "^2.8.8",
"ts-jest": "^29.1.2",
"ts-node": "^10.8.0",
"tsx": "^4.7.1",
"tsx": "^4.19.1",
"typescript": "5.3.3"
},
"dependencies": {
"@chainlink/ccip-read-server": "^0.2.1",
"dotenv-flow": "^4.1.0",
"ethers": "5.7.2"
"ethers": "^5.7.2"
}
}
4 changes: 2 additions & 2 deletions typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"@hyperlane-xyz/utils": "7.1.0",
"@inquirer/core": "9.0.10",
"@inquirer/figures": "1.0.5",
"@inquirer/prompts": "^3.0.0",
"@inquirer/prompts": "3.3.2",
"ansi-escapes": "^7.0.0",
"asn1.js": "^5.4.1",
"bignumber.js": "^9.1.1",
"chalk": "^5.3.0",
"ethers": "^5.7.2",
"latest-version": "^8.0.0",
"terminal-link": "^3.0.0",
"tsx": "^4.7.1",
"tsx": "^4.19.1",
"yaml": "2.4.5",
"yargs": "^17.7.2",
"zod": "^3.21.2",
Expand Down
7 changes: 5 additions & 2 deletions typescript/cli/src/utils/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@inquirer/core';
import figures from '@inquirer/figures';
import { KeypressEvent, confirm, input, isSpaceKey } from '@inquirer/prompts';
import type { PartialDeep } from '@inquirer/type';
import type { PartialDeep, Prompt } from '@inquirer/type';
import ansiEscapes from 'ansi-escapes';
import chalk from 'chalk';

Expand Down Expand Up @@ -464,7 +464,10 @@ function isDownKey(key: KeypressEvent): boolean {
return key.name === 'down';
}

export const searchableCheckBox = createPrompt(
export const searchableCheckBox: Prompt<
any,
SearchableCheckboxConfig<any>
> = createPrompt(
<Value>(
config: SearchableCheckboxConfig<Value>,
done: (value: Array<Value>) => void,
Expand Down
2 changes: 1 addition & 1 deletion typescript/github-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@cloudflare/vitest-pool-workers": "^0.4.5",
"@cloudflare/workers-types": "^4.20240821.1",
"@faker-js/faker": "^8.4.1",
"chai": "4.5.0",
"chai": "^4.5.0",
"prettier": "^2.8.8",
"typescript": "5.3.3",
"vitest": "1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion typescript/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@typechain/hardhat": "^9.1.0",
"@typescript-eslint/eslint-plugin": "^8.1.6",
"@typescript-eslint/parser": "^8.1.6",
"chai": "4.5.0",
"chai": "^4.5.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
Expand Down
18 changes: 9 additions & 9 deletions typescript/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"description": "Infrastructure utilities for the Hyperlane Network",
"version": "7.1.0",
"dependencies": {
"@arbitrum/sdk": "^3.0.0",
"@arbitrum/sdk": "^4.0.0",
"@aws-sdk/client-iam": "^3.74.0",
"@aws-sdk/client-kms": "3.48.0",
"@aws-sdk/client-s3": "^3.74.0",
"@aws-sdk/client-kms": "^3.577.0",
"@aws-sdk/client-s3": "^3.577.0",
"@cosmjs/amino": "^0.32.4",
"@eth-optimism/sdk": "^3.1.6",
"@ethersproject/experimental": "^5.7.0",
"@ethersproject/hardware-wallets": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/providers": "*",
"@google-cloud/secret-manager": "^5.5.0",
"@hyperlane-xyz/helloworld": "7.1.0",
"@hyperlane-xyz/registry": "6.1.0",
"@hyperlane-xyz/sdk": "7.1.0",
"@hyperlane-xyz/utils": "7.1.0",
"@inquirer/prompts": "^5.3.8",
"@inquirer/prompts": "3.3.2",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@safe-global/api-kit": "1.3.0",
"@safe-global/protocol-kit": "1.3.0",
"@safe-global/safe-core-sdk-types": "2.3.0",
"@solana/web3.js": "^1.95.4",
"asn1.js": "5.4.1",
"asn1.js": "^5.4.1",
"aws-kms-ethers-signer": "^0.1.3",
"deep-object-diff": "^1.1.9",
"dotenv": "^10.0.0",
Expand All @@ -39,17 +39,17 @@
"@types/chai": "^4.2.21",
"@types/json-stable-stringify": "^1.0.36",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@types/node": "^18.14.5",
"@types/prompts": "^2.0.14",
"@types/sinon-chai": "^3.2.12",
"@types/yargs": "^17.0.24",
"chai": "4.5.0",
"chai": "^4.5.0",
"ethereum-waffle": "^4.0.10",
"ethers": "^5.7.2",
"hardhat": "^2.22.2",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"tsx": "^4.7.1",
"tsx": "^4.19.1",
"typescript": "5.3.3"
},
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions typescript/infra/scripts/funding/fund-keys-from-deployer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EthBridger, getL2Network } from '@arbitrum/sdk';
import { EthBridger, getArbitrumNetwork } from '@arbitrum/sdk';
import { CrossChainMessenger } from '@eth-optimism/sdk';
import { Connection, PublicKey } from '@solana/web3.js';
import { BigNumber, ethers } from 'ethers';
Expand Down Expand Up @@ -841,13 +841,13 @@ class ContextFunder {

private async bridgeToArbitrum(l2Chain: ChainName, amount: BigNumber) {
const l1Chain = L2ToL1[l2Chain];
const l2Network = await getL2Network(
const l2Network = await getArbitrumNetwork(
this.multiProvider.getEvmChainId(l2Chain),
);
const ethBridger = new EthBridger(l2Network);
return ethBridger.deposit({
amount,
l1Signer: this.multiProvider.getSigner(l1Chain),
parentSigner: this.multiProvider.getSigner(l1Chain),
overrides: this.multiProvider.getTransactionOverrides(l1Chain),
});
}
Expand Down
8 changes: 4 additions & 4 deletions typescript/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "7.1.0",
"dependencies": {
"@arbitrum/sdk": "^4.0.0",
"@aws-sdk/client-s3": "^3.74.0",
"@aws-sdk/client-s3": "^3.577.0",
"@chain-registry/types": "^0.50.14",
"@cosmjs/cosmwasm-stargate": "^0.32.4",
"@cosmjs/stargate": "^0.32.4",
Expand All @@ -28,13 +28,13 @@
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@types/node": "^18.14.5",
"@types/sinon": "^17.0.1",
"@types/sinon-chai": "^3.2.12",
"@types/ws": "^8.5.5",
"@typescript-eslint/eslint-plugin": "^8.1.6",
"@typescript-eslint/parser": "^8.1.6",
"chai": "4.5.0",
"chai": "^4.5.0",
"dotenv": "^10.0.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -46,7 +46,7 @@
"prettier": "^2.8.8",
"sinon": "^13.0.2",
"ts-node": "^10.8.0",
"tsx": "^4.7.1",
"tsx": "^4.19.1",
"typescript": "5.3.3",
"yaml": "2.4.5"
},
Expand Down
2 changes: 1 addition & 1 deletion typescript/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/sinon-chai": "^3.2.12",
"@typescript-eslint/eslint-plugin": "^8.1.6",
"@typescript-eslint/parser": "^8.1.6",
"chai": "4.5.0",
"chai": "^4.5.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
Expand Down
4 changes: 2 additions & 2 deletions typescript/widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@solana/web3.js": "^1.95.4",
"clsx": "^2.1.1",
"react-tooltip": "^5.28.0",
"viem": "^2.21.41",
"viem": "^2.21.45",
"wagmi": "^2.12.26"
},
"devDependencies": {
Expand All @@ -37,7 +37,7 @@
"@storybook/react-vite": "^7.6.14",
"@storybook/test": "^7.6.14",
"@tanstack/react-query": "^5.59.20",
"@types/node": "^18.11.18",
"@types/node": "^18.14.5",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/ws": "^8.5.5",
Expand Down
Loading

0 comments on commit e32ee59

Please sign in to comment.