Skip to content

Commit

Permalink
Use syncpack to manage monorepo packages dependencies with pnpm (#47)
Browse files Browse the repository at this point in the history
Depends on #46

### Syncpack
[Syncpack](https://jamiemason.github.io/syncpack/) is a tool that helps
manage
multiple package.json files in a monorepo.
#### Install
In the repository's root directory execute:
```sh
pnpm install
```
#### Usage
To list dependencies from all packages run:
```sh
pnpm syncpack list
``` 
To update a dependency (e.g. `eslint`) in all packages run:
```sh
pnpm syncpack update --filter eslint
```

### Example

![image](https://github.com/thesis/acre/assets/10741774/a948865e-c10d-464e-822d-f9d734d1dfb8)
  • Loading branch information
r-czajkowski authored Nov 30, 2023
2 parents ff60a53 + eafaf9f commit c4b901e
Show file tree
Hide file tree
Showing 7 changed files with 520 additions and 197 deletions.
6 changes: 6 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencyTypes": [
"prod",
"dev"
]
}
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ pre-commit run --all-files
pre-commit run --files ./core/contracts/Acre.sol
```

### Syncpack

[Syncpack](https://jamiemason.github.io/syncpack/) is a tool that helps manage
multiple package.json files in a monorepo.


#### Usage

To list dependencies from all packages run:
```sh
pnpm syncpack list
```

To update a dependency (e.g. `eslint`) in all packages run:
```sh
pnpm syncpack update --filter eslint
```

### Slither

[Slither](https://github.com/crytic/slither) is a static analysis framework used
Expand Down
36 changes: 18 additions & 18 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@
"test": "hardhat test"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.0",
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@nomicfoundation/hardhat-verify": "^1.0.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-network-helpers": "^1.0.9",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.1",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@openzeppelin/hardhat-upgrades": "^2.3.3",
"@openzeppelin/hardhat-upgrades": "^2.4.1",
"@thesis-co/eslint-config": "^0.6.1",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.2.0",
"@types/mocha": ">=9.1.0",
"@types/node": ">=16.0.0",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.9.4",
"chai": "^4.3.10",
"eslint": "^8.51.0",
"ethers": "^6.8.0",
"hardhat": "^2.18.2",
"eslint": "^8.54.0",
"ethers": "^6.8.1",
"hardhat": "^2.19.1",
"hardhat-deploy": "^0.11.43",
"hardhat-gas-reporter": "^1.0.8",
"prettier": "^3.0.3",
"prettier-plugin-solidity": "^1.1.3",
"solhint": "^3.6.2",
"hardhat-gas-reporter": "^1.0.9",
"prettier": "^3.1.0",
"prettier-plugin-solidity": "^1.2.0",
"solhint": "^4.0.0",
"solhint-config-thesis": "github:thesis/solhint-config",
"solidity-coverage": "^0.8.0",
"solidity-coverage": "^0.8.5",
"ts-node": "^10.9.1",
"typechain": "^8.3.2",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
}
}
18 changes: 9 additions & 9 deletions dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
"@emotion/styled": "^11.11.0",
"@ledgerhq/wallet-api-client": "^1.2.1",
"@ledgerhq/wallet-api-client-react": "^1.1.2",
"framer-motion": "^10.16.4",
"framer-motion": "^10.16.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@thesis-co/eslint-config": "^0.6.1",
"@thesis/prettier-config": "github:thesis/prettier-config",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.53.0",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.54.0",
"prettier": "^3.1.0",
"typescript": "^5.2.2",
"vite": "^4.4.5"
"typescript": "^5.3.2",
"vite": "^5.0.2"
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"private": true,
"packageManager": "[email protected]"
"private": true,
"packageManager": "[email protected]",
"devDependencies": {
"syncpack": "^11.2.1"
}
}
Loading

0 comments on commit c4b901e

Please sign in to comment.