Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: clean dependendies and add check script #450

Merged
merged 28 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
313b5db
Ignore eslint in scripts
sebastijankuzner Feb 22, 2024
a2feb56
Use async calls
sebastijankuzner Feb 22, 2024
8d877a6
Ignore tests
sebastijankuzner Feb 22, 2024
ba7a286
Show testonly dependencies
sebastijankuzner Feb 22, 2024
2aa4385
Calculate deps
sebastijankuzner Feb 23, 2024
2ae1135
Add docs
sebastijankuzner Feb 23, 2024
e9a4fb6
Implement methods on Package
sebastijankuzner Feb 23, 2024
92a8648
Cleanup
sebastijankuzner Feb 23, 2024
6c7b0c0
Rename deps to imports
sebastijankuzner Feb 23, 2024
c74a29b
Fix exceptions
sebastijankuzner Feb 23, 2024
445062e
Pass method
sebastijankuzner Feb 23, 2024
4c71a40
Go trough all packages
sebastijankuzner Feb 23, 2024
9129c20
Improve logs
sebastijankuzner Feb 23, 2024
257695d
Rename file
sebastijankuzner Feb 23, 2024
075ebb7
Remove old scripts
sebastijankuzner Feb 23, 2024
f8d8594
Exit with 1 if failing
sebastijankuzner Feb 23, 2024
6efcddc
Fix validator-set-vote-weighted
sebastijankuzner Feb 23, 2024
d24e418
Validator set static
sebastijankuzner Feb 26, 2024
2ff46ae
Fix validator
sebastijankuzner Feb 26, 2024
f3cb9db
Fix utils
sebastijankuzner Feb 26, 2024
25fabde
Fix transaction pool
sebastijankuzner Feb 26, 2024
3e841a6
Fix test-framework
sebastijankuzner Feb 26, 2024
f44e8fc
Fix packages
sebastijankuzner Feb 26, 2024
96cf37c
Add deps check
sebastijankuzner Feb 26, 2024
e809dce
style: resolve style guide violations
sebastijankuzner Feb 26, 2024
ac429d5
Fix ci
sebastijankuzner Feb 26, 2024
bd371d9
Fix api
sebastijankuzner Feb 26, 2024
83ff398
style: resolve style guide violations
sebastijankuzner Feb 26, 2024
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ distribution
node_modules
LICENSE
CODE_OF_CONDUCT.md
scripts

packages/p2p/source/hapi-nes
52 changes: 52 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
jobs:
source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
version: latest
- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache pnpm modules
uses: actions/cache@v3
with:
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
restore-keys: ${{ runner.os }}-pnpm-
- name: Cache lerna
uses: actions/cache@v3
with:
key: ${{ runner.os }}-lerna
path: ./.cache
restore-keys: ${{ runner.os }}-lerna-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Check dependencies
run: pnpm run deps:check
strategy:
matrix:
node-version:
- 20.x
name: Dependencies
on:
pull_request:
types:
- ready_for_review
- synchronize
- opened
push:
branches:
- main
- develop
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"clean:all": "pnpm run clean && pnpm run clean:node_modules && rm -r .cache",
"clean:node_modules": "del packages/*/node_modules && del node_modules",
"deps": "cross-env-shell ./scripts/deps/update.sh",
"deps:missing": "node ./scripts/deps/missing.js",
"deps:check": "node ./scripts/deps/check.js",
"deps:types": "./node_modules/typesync/bin/typesync",
"deps:unused": "node ./scripts/deps/unused.js",
"docker": "node ./scripts/docker/generate-docker.js",
"format": "pnpm run lint && pnpm run prettier",
"lint": "eslint packages/*/source --ext .ts --ignore-pattern *.test.ts --fix",
Expand Down
2 changes: 0 additions & 2 deletions packages/api-database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"dayjs": "1.11.10",
"pg": "8.11.3",
"reflect-metadata": "0.2.0",
"typeorm": "0.3.17"
},
"devDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions packages/api-development/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,15 @@
"dependencies": {
"@hapi/boom": "10.0.1",
"@hapi/hapi": "21.3.2",
"@hapi/hoek": "11.0.4",
"@mainsail/api-common": "workspace:*",
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/transactions": "workspace:*",
"@mainsail/utils": "workspace:*",
"joi": "17.11.0",
"nanomatch": "1.2.13",
"rate-limiter-flexible": "3.0.6",
"semver": "7.5.4"
},
"devDependencies": {
"@types/ip": "1.1.3",
"@types/semver": "7.5.6",
"uvu": "^0.5.6"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/api-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@
"dependencies": {
"@hapi/boom": "10.0.1",
"@hapi/hapi": "21.3.2",
"@hapi/hoek": "11.0.4",
"@mainsail/api-common": "workspace:*",
"@mainsail/api-database": "workspace:*",
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"dayjs": "1.11.10",
"joi": "17.11.0",
"nanomatch": "1.2.13",
"rate-limiter-flexible": "3.0.6"
"joi": "17.11.0"
},
"devDependencies": {
"@types/ip": "1.1.3",
Expand Down
10 changes: 1 addition & 9 deletions packages/api-transaction-pool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,15 @@
"dependencies": {
"@hapi/boom": "10.0.1",
"@hapi/hapi": "21.3.2",
"@hapi/hoek": "11.0.4",
"@mainsail/api-common": "workspace:*",
"@mainsail/api-database": "workspace:*",
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/transactions": "workspace:*",
"@mainsail/utils": "workspace:*",
"dayjs": "1.11.10",
"joi": "17.11.0",
"nanomatch": "1.2.13",
"rate-limiter-flexible": "3.0.6"
"joi": "17.11.0"
},
"devDependencies": {
"@types/ip": "1.1.3",
"@types/semver": "7.5.6",
"got": "11.8.6",
"uvu": "^0.5.6"
},
"engines": {
Expand Down
18 changes: 9 additions & 9 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@
"@mainsail/api-database": "workspace:*",
"@mainsail/api-http": "workspace:*",
"@mainsail/cli": "workspace:*",
"@mainsail/configuration-generator": "workspace:*",
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/logger-pino": "workspace:*",
"@mainsail/test-framework": "workspace:*",
"@mainsail/utils": "workspace:*",
"boxen": "4.2.0",
"cross-env": "7.0.3",
"dayjs": "1.11.10",
"envfile": "7.0.0",
"execa": "5.1.1",
"fs-extra": "11.2.0",
"joi": "17.11.0",
"kleur": "4.1.5",
"prompts": "2.4.2",
"tmp": "0.2.1",
"uvu": "^0.5.6"
"kleur": "4.1.5"
},
"devDependencies": {
"@mainsail/test-framework": "workspace:*",
"@types/boxen": "3.0.1",
"@types/execa": "2.0.0",
"@types/fs-extra": "11.0.4",
"@types/prompts": "2.4.9",
"@types/tmp": "0.2.6"
"@types/tmp": "0.2.6",
"cross-env": "7.0.3",
"env-paths": "2.2.1",
"execa": "5.1.1",
"prompts": "2.4.2",
"tmp": "0.2.1",
"uvu": "^0.5.6"
},
"peerDependencies": {
"pm2": "^5.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/configuration-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"@mainsail/validation": "workspace:*",
"bip39": "3.1.0",
"dayjs": "1.11.10",
"env-paths": "2.2.1",
"envfile": "7.0.0",
"fs-extra": "11.2.0"
},
"devDependencies": {
"@types/env-paths": "2.1.0",
"@types/fs-extra": "11.0.4",
"@types/tmp": "0.2.6",
"env-paths": "2.2.1",
"tmp": "0.2.1",
"uvu": "^0.5.6"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/consensus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"dayjs": "1.11.10",
"delay": "5.0.0",
"lmdb": "2.9.2"
},
"devDependencies": {
"@mainsail/test-framework": "workspace:*",
"@types/delay": "3.1.0",
"@types/seedrandom": "^3.0.8",
"rewiremock": "3.14.5",
"uvu": "^0.5.6"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
},
"dependencies": {
"inversify": "6.0.2",
"reflect-metadata": "0.2.0",
"reflect-metadata": "0.2.0"
},
"devDependencies": {
"uvu": "^0.5.6"
},
"engines": {
Expand Down
14 changes: 7 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"@mainsail/proposer": "workspace:*",
"@mainsail/serializer": "workspace:*",
"@mainsail/state": "workspace:*",
"@mainsail/test-framework": "workspace:*",
"@mainsail/transaction-pool": "workspace:*",
"@mainsail/transactions": "workspace:*",
"@mainsail/utils": "workspace:*",
Expand All @@ -91,25 +90,26 @@
"@mainsail/webhooks": "workspace:*",
"bip39": "3.1.0",
"boxen": "4.2.0",
"cross-env": "7.0.3",
"dayjs": "1.11.10",
"env-paths": "2.2.1",
"envfile": "7.0.0",
"execa": "5.1.1",
"fs-extra": "11.2.0",
"joi": "17.11.0",
"kleur": "4.1.5",
"prompts": "2.4.2",
"tmp": "0.2.1",
"uvu": "^0.5.6"
"prompts": "2.4.2"
},
"devDependencies": {
"@mainsail/test-framework": "workspace:*",
"@types/boxen": "3.0.1",
"@types/env-paths": "2.1.0",
"@types/execa": "2.0.0",
"@types/fs-extra": "11.0.4",
"@types/prompts": "2.4.9",
"@types/tmp": "0.2.6"
"@types/tmp": "0.2.6",
"cross-env": "7.0.3",
"execa": "5.1.1",
"tmp": "0.2.1",
"uvu": "^0.5.6"
},
"peerDependencies": {
"pm2": "^5.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-address-keccak256/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"ethers": "^6.9.0"
},
"devDependencies": {
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-key-pair-ecdsa": "workspace:*",
"@mainsail/crypto-key-pair-schnorr": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-transaction": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"@mainsail/validation": "workspace:*",
"ajv": "8.12.0"
},
"devDependencies": {
"@mainsail/crypto-address-bech32m": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-key-pair-schnorr": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"@types/lodash.clone": "^4.5.9",
"lodash.clone": "^4.5.0",
"uvu": "^0.5.6"
Expand Down
7 changes: 1 addition & 6 deletions packages/crypto-commit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-block": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"ajv": "8.12.0"
"@mainsail/utils": "workspace:*"
},
"devDependencies": {
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"uvu": "^0.5.6"
},
"engines": {
Expand Down
8 changes: 1 addition & 7 deletions packages/crypto-consensus-bls12-381/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-key-pair-bls12-381": "workspace:*",
"@mainsail/crypto-signature-bls12-381": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"ajv": "8.12.0",
"dayjs": "1.11.10",
"inversify": "6.0.2",
"reflect-metadata": "0.2.0",
"type-fest": "4.8.3"
"@mainsail/kernel": "workspace:*"
},
"devDependencies": {
"uvu": "^0.5.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-key-pair-bls12-381/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"@chainsafe/blst": "^0.2.9",
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"@scure/bip39": "^1.2.1",
"bls12-381-keygen": "^0.2.3",
"wif": "^4.0.0"
},
"devDependencies": {
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"@types/wif": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-key-pair-ecdsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"bcrypto": "5.5.2",
"wif": "^4.0.0"
},
"devDependencies": {
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"@types/wif": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-key-pair-ed25519/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"@noble/ed25519": "^2.0.0",
Expand All @@ -31,6 +30,7 @@
"wif": "^4.0.0"
},
"devDependencies": {
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"@types/wif": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-key-pair-schnorr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"dependencies": {
"@mainsail/container": "workspace:*",
"@mainsail/contracts": "workspace:*",
"@mainsail/crypto-config": "workspace:*",
"@mainsail/kernel": "workspace:*",
"@mainsail/utils": "workspace:*",
"bcrypto": "5.5.2",
"wif": "^4.0.0"
},
"devDependencies": {
"@mainsail/crypto-config": "workspace:*",
"@mainsail/crypto-validation": "workspace:*",
"@mainsail/validation": "workspace:*",
"@types/wif": "^2.0.5",
Expand Down
Loading
Loading