Skip to content

Commit a14f2b8

Browse files
authored
Update deps (#13)
* update deps * update project
1 parent 343af80 commit a14f2b8

File tree

15 files changed

+3280
-5663
lines changed

15 files changed

+3280
-5663
lines changed

.eslintrc.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Main"
2+
on:
3+
- push
4+
5+
jobs:
6+
configure:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
10+
datetime: ${{ steps.get-datetime.outputs.datetime }}
11+
steps:
12+
- id: get-user
13+
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT
14+
- id: get-datetime
15+
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
16+
17+
build:
18+
needs: [configure]
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
with:
24+
submodules: true
25+
- name: Install node
26+
uses: actions/setup-node@v4
27+
- name: Install dependencies
28+
run: yarn install
29+
- name: Run linter
30+
run: yarn lint
31+
- name: Run formatter
32+
run: yarn format
33+
- name: Build
34+
run: yarn build

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Publish packages'
1+
name: "Publish packages"
22

33
on:
44
release:
@@ -24,8 +24,8 @@ jobs:
2424
- name: Install node
2525
uses: actions/setup-node@v4
2626
with:
27-
registry-url: 'https://registry.npmjs.org'
28-
scope: '@avalabs'
27+
registry-url: "https://registry.npmjs.org"
28+
scope: "@avalabs"
2929
- name: Install yarn
3030
run: npm install -g yarn
3131
- name: Create .npmrc

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

eslint.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
const unusedImports = require("eslint-plugin-unused-imports");
2+
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
3+
const tsParser = require("@typescript-eslint/parser");
4+
const tsdoc = require("eslint-plugin-tsdoc");
5+
6+
module.exports = [
7+
{
8+
ignores: [
9+
"dist/**",
10+
"esm/**",
11+
"node_modules/**",
12+
"eslint.config.js",
13+
"jest.config.js",
14+
],
15+
},
16+
{
17+
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"],
18+
languageOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
parser: tsParser,
22+
parserOptions: {
23+
project: "./tsconfig.json",
24+
tsconfigRootDir: __dirname,
25+
},
26+
globals: {
27+
window: "readonly",
28+
document: "readonly",
29+
process: "readonly",
30+
require: "readonly",
31+
},
32+
},
33+
plugins: {
34+
"unused-imports": unusedImports,
35+
"@typescript-eslint": typescriptEslint,
36+
tsdoc: tsdoc,
37+
},
38+
rules: {
39+
curly: "warn",
40+
"prefer-const": "warn",
41+
"no-else-return": "warn",
42+
complexity: ["warn", 1000],
43+
"no-unneeded-ternary": "warn",
44+
"no-alert": "warn",
45+
"no-empty": "warn",
46+
"no-useless-catch": "error",
47+
"require-await": "warn",
48+
"no-continue": "warn",
49+
"no-console": "warn",
50+
"unused-imports/no-unused-imports": "warn",
51+
"no-magic-numbers": "off",
52+
},
53+
},
54+
];

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
5+
};

package.json

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,64 @@
11
{
22
"name": "@avalabs/hw-app-avalanche",
3-
"author": "Zondax AG",
4-
"license": "Apache-2.0",
53
"version": "0.0.0",
64
"description": "Node API for Avalanche App (Ledger Nano S/X/S+)",
7-
"main": "./dist/index.js",
8-
"module": "./esm/index.js",
9-
"typings": "./dist/index.d.ts",
10-
"types": "./dist/index.d.ts",
11-
"homepage": "https://github.com/ava-labs/ledger-avalanche-js",
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/ava-labs/ledger-avalanche-js.git"
15-
},
165
"keywords": [
176
"Zondax",
187
"Ledger",
198
"Avalanche",
209
"Javascript"
2110
],
22-
"scripts": {
23-
"build": "rollup -c && tsc -m commonjs",
24-
"prettier": "prettier --write ./"
25-
},
11+
"homepage": "https://github.com/ava-labs/ledger-avalanche-js",
2612
"bugs": {
2713
"url": "https://github.com/ava-labs/ledger-avalanche-js/issues"
2814
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/ava-labs/ledger-avalanche-js.git"
18+
},
19+
"license": "Apache-2.0",
20+
"author": "Zondax AG",
21+
"main": "./dist/index.js",
22+
"module": "./esm/index.js",
23+
"types": "./dist/index.d.ts",
24+
"typings": "./dist/index.d.ts",
25+
"scripts": {
26+
"build": "tsc",
27+
"format": "FORCE_COLOR=1 prettier --write . && sort-package-json",
28+
"format:check": "FORCE_COLOR=1 prettier --check .",
29+
"lint": "eslint .",
30+
"lint:fix": "eslint --fix .",
31+
"test": "yarn build && jest",
32+
"upgrade": "bunx npm-check-updates -i"
33+
},
34+
"browserslist": [
35+
"> 1%",
36+
"last 2 versions"
37+
],
2938
"dependencies": {
30-
"@ledgerhq/hw-app-eth": "6.38.2",
31-
"@ledgerhq/hw-transport": "6.31.4",
32-
"bs58": "6.0.0",
33-
"sha3": "2.1.4"
39+
"@ledgerhq/hw-app-eth": "6.45.16",
40+
"@ledgerhq/hw-transport": "6.31.9",
41+
"@ledgerhq/types-live": "6.82.0",
42+
"bs58": "6.0.0"
3443
},
3544
"devDependencies": {
36-
"@types/bs58": "^4.0.4",
37-
"@types/ledgerhq__hw-transport": "^4.21.8",
3845
"@typescript-eslint/eslint-plugin": "^8.8.0",
3946
"@typescript-eslint/parser": "^8.8.0",
40-
"bip32": "^4.0.0",
41-
"bip39": "^3.1.0",
42-
"core-js": "^3.38.1",
43-
"crypto-js": "4.2.0",
44-
"esbuild": "0.25.0",
47+
"esbuild": "0.25.9",
4548
"eslint": "^9.11.1",
46-
"eslint-config-prettier": "^9.1.0",
47-
"eslint-plugin-import": "^2.30.0",
48-
"eslint-plugin-jest": "^28.8.3",
49-
"eslint-plugin-prettier": "^5.2.1",
50-
"jest": "^29.7.0",
51-
"prettier": "^3.3.3",
52-
"rollup": "^4.23.0",
53-
"rollup-plugin-dts": "^6.1.1",
54-
"rollup-plugin-esbuild": "^6.1.1",
55-
"semantic-release": "^24.1.2",
49+
"eslint-config-prettier": "^10.1.8",
50+
"eslint-plugin-import": "^2.32.0",
51+
"eslint-plugin-jest": "^29.0.1",
52+
"eslint-plugin-tsdoc": "^0.4.0",
53+
"eslint-plugin-unused-imports": "^4.2.0",
54+
"jest": "^30.1.1",
55+
"prettier": "^3.6.2",
56+
"sort-package-json": "^3.4.0",
5657
"typescript": "^5.6.2"
5758
},
59+
"publishConfig": {
60+
"access": "public"
61+
},
5862
"moduleDirectories": [
5963
"node_modules",
6064
"dist"
@@ -63,12 +67,5 @@
6367
"plugins": {
6468
"autoprefixer": {}
6569
}
66-
},
67-
"browserslist": [
68-
"> 1%",
69-
"last 2 versions"
70-
],
71-
"publishConfig": {
72-
"access": "public"
7370
}
7471
}

rollup.config.mjs

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)