Skip to content
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

Merged
merged 13 commits into from
Feb 28, 2023
Merged

[sdk] Add new SDK packages to lerna #630

merged 13 commits into from
Feb 28, 2023

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented Feb 24, 2023

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.

@vercel
Copy link

vercel bot commented Feb 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
example-oracle-amm ⬜️ Ignored (Inspect) Feb 27, 2023 at 8:40PM (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Feb 27, 2023 at 8:40PM (UTC)

@@ -55,6 +55,7 @@ async function run() {
providerOrUrl: network,
});

// @ts-ignore
Copy link
Contributor Author

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.

Copy link
Collaborator

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"
Copy link
Collaborator

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.

@@ -13,7 +13,7 @@ jobs:
node-version: 18
cache: "npm"
- name: Install deps
run: npm ci
run: npm install
Copy link
Collaborator

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.

Copy link
Contributor Author

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",
Copy link
Contributor Author

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.

@ali-bahjati ali-bahjati merged commit b9430ae into main Feb 28, 2023
@ali-bahjati ali-bahjati deleted the js_build branch February 28, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants