Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint and Build

on:
release:
types: [created]
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Lint
run: npm run lint

- name: Build package
run: npm run build

13 changes: 6 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
# Publish @meshsdk/hydra to npm when a PR to main is merged and package version was updated.

name: Publish Mesh SDK Hydra
name: Publish @meshsdk/hydra

on:
pull_request:
Expand Down Expand Up @@ -47,7 +46,7 @@ jobs:
- name: Checkout main branch at commit after merge
uses: actions/checkout@v4
with:
ref: "main"
ref: main

- name: Get package version from main branch after merge
id: post-merge-version
Expand All @@ -59,9 +58,9 @@ jobs:
id: compare-versions
run: |
if [[ "${{ steps.pre-merge-version.outputs.pre_merge_version }}" != "${{ steps.post-merge-version.outputs.post_merge_version }}" ]]; then
echo "version-updated=true" >> "$GITHUB_OUTPUT"
echo "version-updated=true" >> "$GITHUB_OUTPUT"
else
echo "version-updated=false" >> "$GITHUB_OUTPUT"
echo "version-updated=false" >> "$GITHUB_OUTPUT"
fi

publish-meshsdk-hydra:
Expand All @@ -77,4 +76,4 @@ jobs:
- run: npm install && npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/hydra",
"version": "1.9.0-beta.96",
"version": "1.9.0-beta.99",
"description": "Mesh Hydra package",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down
2 changes: 0 additions & 2 deletions src/hydra-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ export class HydraProvider implements IFetcher, ISubmitter {
* - Accurate state tracking
*/
async isConnected(timeoutMs = 30_000): Promise<boolean> {
// Fast path
if (this._connectionState === "CONNECTED") {
return true;
}

// Reuse in-flight connection
if (this._connectingPromise) {
return this._connectingPromise;
}
Expand Down