Skip to content

Commit

Permalink
Fix CLI error from version command (#2995)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy authored Nov 28, 2023
1 parent 68d4f2f commit 433c5aa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-ducks-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': patch
---

Fix error form version command
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint": "yarn workspaces foreach --since --parallel run lint",
"test": "yarn workspaces foreach --since --parallel run test",
"coverage": "yarn workspaces foreach --since --parallel run coverage",
"version:prepare": "yarn changeset version && yarn install --no-immutable",
"version:prepare": "yarn changeset version && yarn workspaces foreach --all --parallel run version:update && yarn install --no-immutable",
"version:check": "yarn changeset status",
"release": "yarn build && yarn changeset publish",
"postinstall": "husky install"
Expand Down
6 changes: 2 additions & 4 deletions typescript/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,22 @@ import { configCommand } from './src/commands/config.js';
import { deployCommand } from './src/commands/deploy.js';
import { sendCommand } from './src/commands/send.js';
import { statusCommand } from './src/commands/status.js';
import { readJson } from './src/utils/files.js';
import { VERSION } from './src/version.js';

// From yargs code:
const MISSING_PARAMS_ERROR = 'Not enough non-option arguments';

console.log(chalk.blue('Hyperlane'), chalk.magentaBright('CLI'));

try {
const version = readJson<any>('./package.json').version;

await yargs(process.argv.slice(2))
.scriptName('hyperlane')
.command(chainsCommand)
.command(configCommand)
.command(deployCommand)
.command(sendCommand)
.command(statusCommand)
.version(version)
.version(VERSION)
.demandCommand()
.strict()
.help()
Expand Down
7 changes: 4 additions & 3 deletions typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
},
"scripts": {
"hyperlane": "node ./dist/cli.js",
"build": "tsc",
"build": "yarn version:update && tsc",
"dev": "yarn version:update && tsc --watch",
"clean": "rm -rf ./dist",
"dev": "tsc --watch",
"lint": "eslint . --ext .ts",
"prettier": "prettier --write ./src ./examples",
"test": "mocha --config .mocharc.json"
"test": "mocha --config .mocharc.json",
"version:update": "echo \"export const VERSION = '$npm_package_version';\" > src/version.ts"
},
"files": [
"./dist",
Expand Down
1 change: 1 addition & 0 deletions typescript/cli/src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VERSION = '3.1.10';
1 change: 1 addition & 0 deletions typescript/sdk/src/consts/chainMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ export const neutrontestnet: ChainMetadata = {
{ http: 'http://54.149.31.83:1317' },
],
bech32Prefix: 'dual',
slip44: 118,
isTestnet: true,
};

Expand Down

0 comments on commit 433c5aa

Please sign in to comment.