-
Notifications
You must be signed in to change notification settings - Fork 192
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
[sdk] Add new SDK packages to lerna #630
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
@@ -55,6 +55,7 @@ async function run() { | |||
providerOrUrl: network, | |||
}); | |||
|
|||
// @ts-ignore |
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 weird one: the package versions changed, and in the process somehow the HDWalletProvider
is no longer type-compatible with the argument to Web3
. I tried changing the versions a bit and couldn't get this to work out. I validated that the script still runs properly though.
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.
oh this one is a very painful thing. i made some progress in the price pusher but let's ignore it.
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pyth-network/pyth-crosschain", | ||
"directory": "target_chains/ethereum/sdk/js" |
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.
I did not know this existed. will keep it in mind to add to other packages.
.github/workflows/lerna.yaml
Outdated
@@ -13,7 +13,7 @@ jobs: | |||
node-version: 18 | |||
cache: "npm" | |||
- name: Install deps | |||
run: npm ci | |||
run: npm install |
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.
Please don't change this to install. We want to make sure the lock is updated.
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.
yes, will fix. (i'm just trying to debug the ci failure, which works fine locally, so not sure what's going on)
"scripts": { | ||
"test": "jest src/ --passWithNoTests", | ||
"build": "tsc", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
"lint": "eslint src/", | ||
"start": "node lib/index.js", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm test && npm run lint", | ||
"prepublishOnly": "npm run build && npm test && npm run lint", |
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.
it seems like prepare
doesn't play nicely with lerna, as this runs on npm ci
when you're installing the packages, and tsc can fail to find the other packages defined in the monorepo. I've moved the build step to only happen before the package is published. I'm sure if this works for publishing yet (but this is how the other packages in this repo do it). I will move the publishing over in a subsequent pr.
Add the packages to the lerna build and fix dependencies. Note that this change also makes CI work: adding the packages to the root package.json means the existing lerna build / test CI step runs on these packages as well.