Skip to content

Commit

Permalink
Don't use packageManager field (#469)
Browse files Browse the repository at this point in the history
This PR removes the use of the `pacakgeManager` field for a couple of
reasons:
- `corepack` stuff is experimental
([source](https://nodejs.org/api/corepack.html))
- It only supports exact versions - so updating our package manager
locally can lead to

Instead, I changed to use the `engines` field that will produce warnings
on incompatible versions.

I also removed the `safe-contracts` exception by solving the lints. It
also means we have an ultra-consistent Safe contracts version that we
use across all our modules (which has some nice benefits).
  • Loading branch information
nlordell authored Jul 19, 2024
1 parent 562ccba commit 1774e79
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 24 deletions.
4 changes: 2 additions & 2 deletions examples/4337-passkeys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@account-abstraction/contracts": "0.7.0",
"@safe-global/safe-4337": "0.3.0",
"@safe-global/safe-contracts": "^1.4.1-build.0",
"@safe-global/safe-contracts": "1.4.1-build.0",
"@safe-global/safe-deployments": "^1.37.0",
"@safe-global/safe-modules-deployments": "^2.2.0",
"@safe-global/safe-passkey": "0.2.0",
Expand All @@ -32,4 +32,4 @@
"vite": "^5.3.1",
"vite-plugin-commonjs": "^0.10.1"
}
}
}
4 changes: 2 additions & 2 deletions modules/passkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@safe-global/mock-contract": "^4.1.0",
"@safe-global/safe-4337": "workspace:^0.3.0-1",
"@safe-global/safe-4337-local-bundler": "workspace:^0.0.0",
"@safe-global/safe-contracts": "^1.4.1-build.0",
"@safe-global/safe-contracts": "1.4.1-build.0",
"@simplewebauthn/server": "^10.0.0",
"@types/node": "^20.14.8",
"dotenv": "^16.4.5",
Expand All @@ -66,7 +66,7 @@
},
"dependencies": {
"@account-abstraction/contracts": "0.7.0",
"@openzeppelin/contracts": "=5.0.0",
"@openzeppelin/contracts": "5.0.0",
"cbor": "^9.0.2"
}
}
6 changes: 3 additions & 3 deletions modules/recovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"dependencies": {
"candide-contracts": "github:5afe/CandideWalletContracts#113d3c059e039e332637e8f686d9cbd505f1e738",
"@openzeppelin/contracts": "=4.9.6",
"@safe-global/safe-contracts": "=1.4.1-build.0"
"@openzeppelin/contracts": "4.9.6",
"@safe-global/safe-contracts": "1.4.1-build.0"
}
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.0.0",
"description": "A monorepo for Safe modules",
"private": true,
"packageManager": "pnpm@9.4.0",
"main": "dist/index.js",
"workspaces": [
"packages/*",
Expand All @@ -13,7 +12,7 @@
"scripts": {
"fmt:global": "prettier --write .",
"fmt:global-check": "prettier --check .",
"lint:monorepo": "sherif -i @openzeppelin/contracts -i @safe-global/safe-contracts"
"lint:monorepo": "sherif -i @openzeppelin/contracts -r root-package-manager-field"
},
"repository": {
"type": "git",
Expand All @@ -30,6 +29,10 @@
"Wallet",
"Safe"
],
"engines": {
"node": "^20",
"pnpm": "^9"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/4337-local-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@account-abstraction/contracts": "0.7.0",
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@safe-global/safe-4337-provider": "workspace:^0.0.0",
"@safe-global/safe-contracts": "^1.4.1-build.0",
"@safe-global/safe-contracts": "1.4.1-build.0",
"ethers": "^6.13.1",
"hardhat": "^2.22.5",
"hardhat-deploy": "^0.12.4",
"node-fetch": "^3.3.2",
"typescript": "^5.5.2"
}
}
}
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 1774e79

Please sign in to comment.