Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
16 changes: 0 additions & 16 deletions .eslintrc.json

This file was deleted.

34 changes: 17 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Basic dependabot.yml file with
# minimum configuration for two package managers

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "daily"
target-branch: dev

# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
commit-message:
prefix: "deps"
open-pull-requests-limit: 5
target-branch: "main"
groups:
all:
patterns: ["*"]
ignore:
# Ignore major version updates for stability
- dependency-name: "*"
update-types: ["version-update:semver-major"]

Comment thread
jleni marked this conversation as resolved.
Outdated
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'daily'
time: '11:00'
interval: "daily"
commit-message:
prefix: 'chore'
prefix-development: 'chore'
include: 'scope'
target-branch: dev
prefix: "ci"
target-branch: "main"
Comment thread
jleni marked this conversation as resolved.
Outdated
52 changes: 52 additions & 0 deletions .github/workflows/ci-ts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI-ts

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
- cron: "0 0 * * *" # Daily at midnight UTC

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }}
cancel-in-progress: true

jobs:
ts-checks:
uses: zondax/_workflows/.github/workflows/_checks-ts.yaml@main
with:
package_manager: pnpm
node_version: "22"
enable_tests: false # Disable tests here since they need Docker
enable_coverage: false
test_command: "test"
lint_command: "check"
format_command: "check"

test-with-docker:
runs-on: ubuntu-latest
needs: ts-checks

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Run tests with Docker
run: pnpm test
env:
DISPLAY: :99
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

67 changes: 18 additions & 49 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,24 @@
name: Publish package
name: Publish NPM Package

on:
release:
types:
- created
types: [created]
push:
tags:
- "v[0-9]+(\\.[0-9]+)*"
- "v[0-9]+"
- "v[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"

jobs:
build-test:
name: Build and Test
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install node
uses: actions/setup-node@v4
- run: npm install -g yarn
- run: yarn install
- run: yarn build
- run: yarn test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

publish:
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build-test]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install node
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
scope: "@zondax"
- run: npm install -g yarn
- run: yarn install
- run: yarn build
- run: mv README-npm README.md
- name: Get latest release version number
id: get_version
run: echo "version=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- name: Show version
run: echo ${{ steps.get_version.outputs.version }}
- name: Update tag
run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version }}
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }}
jobs:
publish-npm:
uses: zondax/_workflows/.github/workflows/_publish-npm.yaml@main
with:
timeout_minutes: 10
dry_run: false
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }}
Comment thread
jleni marked this conversation as resolved.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,5 @@ dist

# Finder (MacOS) folder config
.DS_Store
tests/snapshots-tmp/

31 changes: 31 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[tools]
node = "22"
pnpm = "latest"

[env]
# Ensure pnpm uses the correct Node.js version
NODE_ENV = "development"

[tasks.install]
description = "Install dependencies"
run = "pnpm install"

[tasks.build]
description = "Build the project"
run = "pnpm build"

[tasks.test]
description = "Run tests"
run = "pnpm test"

[tasks.check]
description = "Run linting and formatting checks"
run = "pnpm check"

[tasks.dev]
description = "Development setup"
run = [
"pnpm install",
"pnpm check",
"pnpm build"
]
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome"]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.words": ["zemu"]
}
3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

Loading
Loading