Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit f9bcf3f

Browse files
authored
Bump common-js dependency versions + small refactor (#73)
* Bump pyth-common-js version on upstream pkgs * Bump pyth-aptos-js to 1.0.0 + fix lint issue * Bump pyth-terra-js package * Update Readme * Update env access to fix tsc error
1 parent b2192f9 commit f9bcf3f

File tree

8 files changed

+60
-58
lines changed

8 files changed

+60
-58
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ We require the [pre-commit hooks](https://pre-commit.com/) defined in [`.pre-com
2121
We use [Semantic Versioning](https://semver.org/) for our releases. In order to release a new version of any of the packages and publish it to npm, follow these steps:
2222

2323
1. Run `npm version <new version number> --no-git-tag-version`. This command will update the version of the package. Then push your changes to github.
24-
2. Once your change is merged into `main`, create a release with tag `<package>:v<new version number>` like `pyth-evm-js:v1.5.2`, and a github action will automatically publish the new version of this package to npm.
24+
2. Once your change is merged into `main`, create a release with tag `<package>-v<new version number>` like `pyth-evm-js-v1.5.2`, and a github action will automatically publish the new version of this package to npm.

pyth-aptos-js/package-lock.json

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyth-aptos-js/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-aptos-js",
3-
"version": "0.2.0",
3+
"version": "1.0.0",
44
"description": "Pyth Network Aptos Utilities",
55
"homepage": "https://pyth.network",
66
"author": {
@@ -47,7 +47,7 @@
4747
"yargs": "^17.4.1"
4848
},
4949
"dependencies": {
50-
"@pythnetwork/pyth-common-js": "^1.0.0",
50+
"@pythnetwork/pyth-common-js": "^1.2.0",
5151
"aptos": "^1.3.14",
5252
"buffer": "^6.0.3"
5353
}

pyth-aptos-js/src/examples/AptosRelay.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { hideBin } from "yargs/helpers";
44
import { AptosPriceServiceConnection } from "../index";
55
import { AptosAccount, AptosClient, TxnBuilderTypes } from "aptos";
66

7-
const APTOS_KEY = "APTOS_KEY";
8-
97
const argv = yargs(hideBin(process.argv))
108
.option("price-ids", {
119
description:
@@ -45,7 +43,11 @@ async function run() {
4543
);
4644

4745
// Update the Pyth Contract using this update data
48-
const sender = new AptosAccount(Buffer.from(process.env[APTOS_KEY]!, "hex"));
46+
if (process.env.APTOS_KEY === undefined) {
47+
throw new Error(`APTOS_KEY environment variable should be set.`);
48+
}
49+
50+
const sender = new AptosAccount(Buffer.from(process.env.APTOS_KEY, "hex"));
4951
const client = new AptosClient(argv.fullNode);
5052
const result = await client.generateSignSubmitWaitForTransaction(
5153
sender,

pyth-evm-js/package-lock.json

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyth-evm-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"yargs": "^17.4.1"
5050
},
5151
"dependencies": {
52-
"@pythnetwork/pyth-common-js": "^1.0.0",
52+
"@pythnetwork/pyth-common-js": "^1.2.0",
5353
"buffer": "^6.0.3"
5454
}
5555
}

pyth-terra-js/package-lock.json

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyth-terra-js/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-terra-js",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Pyth Network Terra Utils in JS",
55
"homepage": "https://pyth.network",
66
"author": {
@@ -43,7 +43,7 @@
4343
"yargs": "^17.4.1"
4444
},
4545
"dependencies": {
46-
"@pythnetwork/pyth-common-js": "^1.0.0",
46+
"@pythnetwork/pyth-common-js": "^1.2.0",
4747
"@terra-money/terra.js": "^3.0.11",
4848
"axios": "^0.26.1"
4949
}

0 commit comments

Comments
 (0)