Skip to content

Commit

Permalink
chore: move to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Apr 23, 2024
1 parent eaa4351 commit f80a818
Show file tree
Hide file tree
Showing 11 changed files with 12,277 additions and 10,537 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
/.idea
.idea/
.yarn/

node_modules/
coverage/

/node_modules
/coverage
coverage.json

/typechain
/typechain-types
typechain/
typechain-types/

# Hardhat files
/cache
/artifacts
cache/
artifacts/

# foundry artifacts
/foundry/cache
/foundry/out
foundry/cache/
foundry/out/

.env
deployed-local.json
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm commitlint --edit ${1}
yarn commitlint --edit ${1}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm lint-staged
yarn lint-staged
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
pnpm-lock.yaml
foundry

.gitignore
.prettierignore

package-lock.json
4 changes: 2 additions & 2 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
"0.8.9/interfaces",
"0.8.9/test_helpers",
// Skip contracts that are tested by Foundry tests
"common/lib", /** 100% covered by test/common/*.t.sol */
"0.8.9/lib/UnstructuredStorage.sol", /** 100% covered by test/0.8.9/unstructuredStorage.t.sol */
"common/lib", // 100% covered by test/common/*.t.sol
"0.8.9/lib/UnstructuredStorage.sol", // 100% covered by test/0.8.9/unstructuredStorage.t.sol
],
};
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you have a bigger idea on how to improve the protocol, consider publishing yo
### Requirements

- [Node.js v20](https://nodejs.org/en)
- [Pnpm](https://pnpm.io/)
- [Yarn](https://yarnpkg.com/)
- [Foundry](https://book.getfoundry.sh/)

### Setup
Expand All @@ -39,15 +39,15 @@ If you have a bigger idea on how to improve the protocol, consider publishing yo
Install dependencies

```bash
pnpm install
yarn install
```

### Test

Run Hardhat tests

```bash
pnpm test
yarn test
```

See `package.json` for more commands.
Expand Down Expand Up @@ -125,7 +125,7 @@ All typechain types are placed in `/typechain-types` in the root of the project.
There have been issues with IDEs failing to properly index this directory resulting in import errors. If you are experiencing similar issues, the solutions above should resolve them:

- open the `/typechain-types/index.ts` file to force the IDE to index it;
- delete the directory and re-compile `pnpm hardhat compile --force`.
- delete the directory and re-compile `yarn hardhat compile --force`.

### Config files

Expand Down
30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@
"description": "Lido on Ethereum is a liquid-staking protocol allowing anyone to earn staking rewards without locking ether or maintaining infrastructure",
"license": "GPL-3.0-only",
"engines": {
"node": ">=20",
"pnpm": ">=8"
"node": ">=20"
},
"packageManager": "[email protected]",
"scripts": {
"compile": "pnpm hardhat compile",
"compile": "hardhat compile",
"lint:sol": "solhint 'contracts/**/*.sol'",
"lint:sol:fix": "pnpm lint:sol --fix",
"lint:sol:fix": "yarn lint:sol --fix",
"lint:ts": "eslint . --ignore-path .gitignore --max-warnings=0",
"lint:ts:fix": "pnpm lint:ts --fix",
"lint": "pnpm lint:sol && pnpm lint:ts",
"format": "prettier . --write --ignore-path .gitignore --ignore-path .prettierignore",
"test": "pnpm hardhat test --parallel",
"test:single": "pnpm hardhat test",
"test:coverage": "pnpm hardhat coverage",
"test:trace": "pnpm hardhat test --trace",
"test:watch": "pnpm hardhat watch test",
"type:check": "tsc --noEmit",
"lint:ts:fix": "yarn lint:ts --fix",
"lint": "yarn lint:sol && yarn lint:ts",
"format": "prettier . --write",
"test:forge": "forge test",
"test": "hardhat test --parallel",
"test:sequential": "hardhat test",
"test:coverage": "hardhat coverage",
"test:trace": "hardhat test --trace",
"test:watch": "hardhat watch test",
"typecheck": "tsc --noEmit",
"prepare": "husky"
},
"lint-staged": {
Expand All @@ -36,9 +37,12 @@
"@commitlint/config-conventional": "^19.2.2",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-ignition": "^0.15.1",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.1",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.5",
"@nomicfoundation/ignition-core": "^0.15.1",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.14",
Expand Down
Loading

0 comments on commit f80a818

Please sign in to comment.