From 7a4d319c22fcca47f2ce8fcdac326675fa29848c Mon Sep 17 00:00:00 2001 From: Gavrila Andrei Date: Tue, 25 Nov 2025 16:39:25 +0200 Subject: [PATCH 1/2] Add spell-check --- .github/workflows/npm-publish.yml | 82 ------------------- .github/workflows/pre-merge-unit-tests.yml | 46 ----------- .../run-template-dapps-integration.yml | 27 ------ .github/workflows/spell-check.yml | 16 ++++ 4 files changed, 16 insertions(+), 155 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml delete mode 100644 .github/workflows/pre-merge-unit-tests.yml delete mode 100644 .github/workflows/run-template-dapps-integration.yml create mode 100644 .github/workflows/spell-check.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 3eaaebaaf..000000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Publish sdk-dapp - -on: - push: - branches: [main] - repository_dispatch: - types: publish-npm - workflow_dispatch: - -permissions: - contents: write - -jobs: - publish-npm: - runs-on: ubuntu-latest - permissions: - contents: write - packages: write - steps: - - name: Fix permissions - run: | - sudo chown -R $USER:$USER ${{ github.workspace }} - sudo chmod -R 755 ${{ github.workspace }} - continue-on-error: true - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - clean: true - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - - name: Setup pnpm - run: npm install -g pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Run tests - run: pnpm test - - - name: Build project - run: pnpm build - - - name: Get package info - id: package - uses: andreigiura/action-nodejs-package-info@v1.0.2 - - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ steps.package.outputs.is-prerelease == 'false' }} - run: | - RELEASE_TAG=v$(node -p "require('./package.json').version") - echo "Creating release for version: $RELEASE_TAG" - - changelog_content=$(awk "/^## \[\[?${RELEASE_TAG#v}[^\]]*\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md) - - cat > release_notes.md << EOF - ## What's Changed - - $changelog_content - EOF - - # Create the release - gh release create "$RELEASE_TAG" \ - --target=$GITHUB_SHA \ - --title="$RELEASE_TAG" \ - --notes-file release_notes.md - - - name: Publish to npmjs next version - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ steps.package.outputs.is-prerelease == 'true'}} - run: echo ${{ steps.package.outputs.is-prerelease}} && npm publish --tag next - - - name: Publish to npmjs - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ steps.package.outputs.is-prerelease == 'false' }} - run: npm publish diff --git a/.github/workflows/pre-merge-unit-tests.yml b/.github/workflows/pre-merge-unit-tests.yml deleted file mode 100644 index dc0ed5fc3..000000000 --- a/.github/workflows/pre-merge-unit-tests.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: 'Jest Unit Tests' -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - branches: [main, development] - paths: - - 'src/**' - - '**.js' - - '**.ts' - - '**.json' - repository_dispatch: - types: run-unit-tests - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - run-unit-tests: - runs-on: ubuntu-latest - if: ${{ !github.event.pull_request.draft }} - steps: - - name: Fix permissions - run: | - sudo chown -R $USER:$USER ${{ github.workspace }} - sudo chmod -R 755 ${{ github.workspace }} - continue-on-error: true - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - clean: true - fetch-depth: 0 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - - name: Setup pnpm - run: npm install -g pnpm - - name: Install Dependencies - run: pnpm install --frozen-lockfile - - name: Build - run: pnpm build - - name: Run unit tests - run: pnpm test --silent diff --git a/.github/workflows/run-template-dapps-integration.yml b/.github/workflows/run-template-dapps-integration.yml deleted file mode 100644 index 7cd56184e..000000000 --- a/.github/workflows/run-template-dapps-integration.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: 'Integration tests' - -on: - pull_request: - branches: [main] - repository_dispatch: - types: run-template-dapps-integration - workflow_dispatch: - -jobs: - run_template_dapps_integration_script: - runs-on: ubuntu-latest - steps: - - name: Fix permissions - run: | - sudo chown -R $USER:$USER ${{ github.workspace }} - sudo chmod -R 755 ${{ github.workspace }} - continue-on-error: true - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - clean: true - - name: Run script file - run: | - chmod +x ./scripts/template-dapps-integration.sh - ./scripts/template-dapps-integration.sh - shell: bash diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 000000000..0f5529693 --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,16 @@ +name: Spell Check + +on: pull_request + +jobs: + spell-check: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Spell Check + uses: streetsidesoftware/cspell-action@v6 + with: + files: '**/*.{ts,tsx,js,jsx,md,json,yml,yaml}' + incremental_files_only: false From 12c3d114fd7a11f5dae08b297575e21c4374b11d Mon Sep 17 00:00:00 2001 From: Gavrila Andrei Date: Tue, 25 Nov 2025 16:59:50 +0200 Subject: [PATCH 2/2] Test comm --- src/providers/DappProvider/DappProvider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/providers/DappProvider/DappProvider.ts b/src/providers/DappProvider/DappProvider.ts index 0188d9621..88ca431df 100644 --- a/src/providers/DappProvider/DappProvider.ts +++ b/src/providers/DappProvider/DappProvider.ts @@ -33,6 +33,7 @@ export class DappProvider { } isInitialized(): boolean { + // Directly return the result of the provider's isInitialized method programaticaly return this.provider.isInitialized(); }