Skip to content

Commit

Permalink
feat: add branch to get registry (#650)
Browse files Browse the repository at this point in the history
### Description
- Add `branch` to getRegistry() to allow fetching the Registry of
different branches
- Up the sdk version to latest to allow `yarn link`

### Backward compatibility
Yes

### Testing
Tested check-deploy using `yarn link`
  • Loading branch information
ltyu authored Mar 6, 2025
1 parent ef406d6 commit c093d06
Show file tree
Hide file tree
Showing 4 changed files with 848 additions and 810 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-garlics-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/registry': minor
---

Add `branch` to getRegistry to allow reading of specific commit/branches. Also up the SDK version
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@eslint/js": "^9.1.1",
"@hyperlane-xyz/sdk": "7.0.0",
"@hyperlane-xyz/sdk": "8.8.1",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@typescript-eslint/parser": "^7.7.0",
Expand Down
2 changes: 2 additions & 0 deletions src/registry/registry-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const isCanonicalRepoUrl = (url: string): boolean => {
export function getRegistry(
registryUris: string[],
enableProxy: boolean,
branch?: string,
logger?: Logger,
): IRegistry {
const registryLogger = logger?.child({ module: 'MergedRegistry' });
Expand All @@ -33,6 +34,7 @@ export function getRegistry(
if (isHttpsUrl(uri)) {
return new GithubRegistry({
uri,
branch,
logger: childLogger,
proxyUrl: enableProxy && isCanonicalRepoUrl(uri) ? PROXY_DEPLOYED_URL : undefined,
});
Expand Down
Loading

0 comments on commit c093d06

Please sign in to comment.