-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pnpm experiment #420
Pnpm experiment #420
Conversation
7705c96
to
8e3c11b
Compare
Pull Request Test Coverage Report for Build 9112973120Details
💛 - Coveralls |
7c04cee
to
68395b7
Compare
@@ -1,6 +1,5 @@ | |||
import dotenv from 'dotenv' | |||
import type { Address } from 'abitype' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with pnpm
importing from transitive dependencies doesn't work well
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@account-abstraction/contracts": "0.7.0", | ||
"@safe-global/safe-4337": "0.3.0", | ||
"@safe-global/safe-passkey": "0.2.0-alpha.1", | ||
"@safe-global/safe-passkey": "workspace:0.2.0-alpha.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with pnpm if you want the package to be installed from the workspace and not the npm registry, you have to explicitly add workspace
"@account-abstraction=../../node_modules/.pnpm/@[email protected]/node_modules/@account-abstraction", | ||
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_/node_modules/@safe-global" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a workaround until certora fixes a bug with specifying solc_allow_path: "../../node_modules"
. Specifying this property now results in a summary not being applied and verification failing.
@@ -1,4 +1,5 @@ | |||
import '@nomicfoundation/hardhat-toolbox' | |||
import '@nomicfoundation/hardhat-ethers' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow not adding this package explicitly to the package.json
and importing here results in a type mess for ethers.provider
"overrides": { | ||
"@safe-global/safe-contracts": { | ||
"ethers": "^6.12.0" | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem to be needed anymore
@@ -1,4 +1,5 @@ | |||
import '@nomicfoundation/hardhat-toolbox' | |||
import '@nomicfoundation/hardhat-ethers' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow not adding this package explicitly to the package.json
and importing here results in a type mess for ethers.provider
- name: Install python | ||
uses: actions/setup-python@v4 | ||
with: { python-version: 3.11 } | ||
|
||
- name: Install certora cli | ||
run: pip install -Iv certora-cli==6.1.3 | ||
run: pip install -Iv certora-cli==7.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context: Unrelated but opportunistic change (was tested with this during development, and there are no additional Certora related changes because of the version bump).
This PR adds missing `typescript` dependency to the `safe-passkey` package which was causing build errors locally (maybe there is a global Typescript installation on CI and on @mmv08's machine). Also, there was some linting errors that weren't caught. Also, PNPM reordered `package.json` for the passkey package, and I manually did it for the other packages.
Created #422 to make sure CI runs without issues. Edit: Full CI passes 🎉 |
Should we have a small section in the main |
In my opinion, it's not rocket science and more than one way to install it exists - they all can be found on the pnpm website. I don't see value in maintaining pnpm installation docs for us |
This PR:
7.3.0
PNPM is more strict about transitive dependencies and sometimes strange things happen with module resolution unless the dependency is explicitly stated in
package.json
and imported. I added comments to highlight such cases.@nlordell please test this change on linux :)