Skip to content

upgrade all dependencies to latest version #4081

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

Open
wants to merge 80 commits into
base: development
Choose a base branch
from

Conversation

0oM4R
Copy link
Contributor

@0oM4R 0oM4R commented Apr 30, 2025

Description

Please use node ^22 lts and try to reclone the repo

Changes

Root package changes

ESLint Migration

  • Removed legacy .eslintrc.json and added modern eslint.config.js
  • Implemented flat config format for improved maintainability
  • Updated linting rules and configurations across the codebase

Husky: update pre-commit script and remove deprecated command

Workflow

  • Updated build workflows to use node 20
  • Remove the old branch development_2.7

Playground changes

  • Replaced the deprecated $vuetify theme with use theme
  • Some changes related to marked package upgrade
  • Include stellar sdk in package.json and update the import
  • Replace contains from cider-tools with containsCidr upgrade compatibility
  • Update "@vue/tsconfig” in tsconfig
  • Replace "@noble/secp256k1" utils.sha2 with "@noble/hashes/sha2"
  • Update elsint

Gridclient changes

Stellar Module Enhancements

  • Updated Stellar SDK implementation for v13 compatibility
  • Enhanced asset handling and balance calculation with proper typings
  • Improved error handling and validation for network operations

Primitives and Modules

  • In many places in modules fixed assigning mycelium to object and create Mycelium and MyceliumIP instance instead
  • Create a deep copy to create plain objects of deployment with deletable properties (needed for class-transformer's discriminator)
  • Enhanced network light implementation
  • Updated VM primitive for better resource utilization
  • Improved Algorand module with better transaction handling algosdk 3.2.0 compatibility



ZOS

  • Add to all classes that extends WorkloadData this is needed for class transformer
    Tests: 
- as I mentioned before assigning mycelium or any other property that have type will give an error while class transformation, this applied on machine, machine light, network light, workloads
  • Removed the deprecated PublicIPV4 class tests as it will produce an error while class transformation and validation
  • Added test suite for Stellar v13 feature changes

TFChain Client Updates

  • Significant updates to type definitions to support the new version types


Upgrades

Root Package Dependencies

Package Current Version New Version
@typescript-eslint/eslint-plugin ^5.58.0 ^8.31.1
@typescript-eslint/parser ^5.57.0 ^8.31.1
@vue/eslint-config-typescript ^11.0.2 ^14.5.0
eslint ^8.37.0 ^9.26.0
eslint-config-prettier ^8.8.0 ^10.1.2
eslint-plugin-cypress ^2.13.2 ^4.3.0
eslint-plugin-prettier ^4.2.1 ^5.3.1
eslint-plugin-simple-import-sort ^10.0.0 ^12.1.1
eslint-plugin-svelte3 ^4.0.0 Removed
eslint-plugin-vue ^9.10.0 ^10.1.0
husky ^8.0.3 ^9.1.7
lerna 8.0.0 8.2.2
lint-staged ^13.2.0 ^15.5.1
prettier ^2.8.7 ^3.5.3
prettier-plugin-svelte ^2.10.0 ^3.3.3
cypress ^13.1.0 Removed

graphql_client

Package Current Version New Version
ts-mixer ^6.0.2 ^6.0.4
typescript ^4.9.3 ^5.8.3

grid_client

Package Current Version New Version
@noble/secp256k1 ^1.7.1 1.7.1 (pinned)
@stellar/stellar-sdk Not present ^13.3.0 (added)
algosdk ^1.19.0 ^3.2.0
axios ^1.7.8 ^1.9.0
bip39 ^3.0.4 ^3.1.0
class-validator ^0.14.0 ^0.14.2
crypto-js ^4.1.1 ^4.2.0
decimal.js ^10.3.1 ^10.5.0
libsodium-wrappers ^0.7.10 ^0.7.15
private-ip ^2.3.3 2.3.4 (pinned)
reflect-metadata ^0.1.13 ^0.2.2
semver ^7.6.2 ^7.7.1
stellar-sdk ^10.4.1 Removed (replaced by @stellar/stellar-sdk)
typescript ^4.7.4 ^5.8.3
uuid4 ^2.0.2 ^2.0.3
@types/jest ^29.2.6 ^29.5.14
@types/semver ^7.5.8 ^7.7.0
jest ^29.3.1 ^29.7.0
jest-junit ^14.0.1 ^16.0.0
node-ssh ^13.0.0 ^13.2.1
ts-jest ^29.0.5 ^29.3.2
ts-node ^10.9.1 ^10.9.2
tsconfig-paths-webpack-plugin ^4.0.0 ^4.2.0
typedoc ^0.22.10 ^0.28.4

grid_http_server

Package Current Version New Version
express ^4.21.2 ^5.1.0
typescript ^4.7.4 ^5.8.3
ts-node ^10.9.1 ^10.9.2

grid_rmb_server

Package Current Version New Version
typescript ^4.7.4 ^5.8.3
ts-node ^10.9.1 ^10.9.2

gridproxy_client

Package Current Version New Version
typescript ^4.8.4 ^5.8.3

monitoring

Package Current Version New Version
ts-node ^10.9.1 ^10.9.2
typescript ^5.3.3 ^5.8.3
@types/jest 29.5.11 29.5.14
ts-jest 29.1.2 29.3.2

playground

Package Current Version New Version
@mdi/font ^7.2.96 ^7.4.47
@sentry/vue ^8.19.0 ^9.15.0
@stellar/stellar-sdk Not present ^13.3.0 (added)
await-lock ^2.2.2 ^3.0.0
chart.js ^4.4.0 ^4.4.9
cidr-tools ^5.1.4 ^11.0.3
country-code-lookup ^0.1.2 ^0.1.3
cryptr ^6.2.0 ^6.3.0
decimal.js ^10.4.3 ^10.5.0
highlight.js ^11.7.0 ^11.11.1
jspdf-autotable ^3.8.2 ^5.0.2
marked ^5.0.4 ^15.0.11
moment ^2.29.4 ^2.30.1
pinia ^2.0.32 ^3.0.2
qrcode ^1.5.1 ^1.5.4
validator ^13.9.0 ^13.15.0
vue ^3.2.47 ^3.5.13
vue-chartjs ^5.2.0 ^5.3.2
vue-router ^4.1.6 ^4.5.1
vuetify ^3.5.17 ^3.8.3
zod ^3.22.4 ^3.24.3
@types/chart.js ^2.9.38 ^2.9.41
@types/jsdom ^21.1.0 ^21.1.7
@types/lodash ^4.14.192 ^4.17.16
@types/marked ^5.0.0 ^6.0.0
@types/node ^18.14.2 ^22.15.3
@types/qrcode ^1.5.0 ^1.5.5
@vitejs/plugin-vue ^4.0.0 ^5.2.3
@vue/eslint-config-typescript ^11.0.2 ^11.0.3
@vue/test-utils ^2.3.0 ^2.4.6
@vue/tsconfig ^0.1.3 ^0.7.0
jsdom ^21.1.0 ^26.1.0
sass ^1.60.0 ^1.87.0
start-server-and-test ^2.0.0 ^2.0.11
typescript ~4.8.4 ~5.8.3
utility-types ^3.10.0 ^3.11.0
vite ^4.1.4 ^6.3.4
vite-plugin-node-polyfills ^0.7.0 ^0.23.0
vitest ^0.29.1 ^3.1.2
vue-tsc ^1.2.0 ^2.2.10

rmb_direct_client

Package Current Version New Version
@polkadot/api ^8.9.1 ^15.9.2
crypto-js ^4.1.1 ^4.2.0
google-protobuf ^3.21.2 ^3.21.4
js-crypto-aes ^1.0.4 ^1.0.6
uuid ^8.3.2 ^11.1.0
ws ^8.12.0 ^8.18.2
@types/crypto-js ^4.1.1 ^4.2.2
@types/google-protobuf ^3.15.6 ^3.15.12
@types/jest Not present ^29.5.14 (added)
@types/node ^18.11.18 ^22.15.3
@types/uuid ^9.0.0 ^10.0.0
@types/ws ^8.5.4 ^8.18.1
jest Not present ^29.7.0 (added)
nodemon ^2.0.20 ^3.1.10
protoc-gen-ts ^0.8.5 ^0.8.7
ts-jest Not present ^29.3.2 (added)
ts-node ^10.9.1 ^10.9.2
typescript ^4.9 ^5.8.3

rmb_peer_client

Package Current Version New Version
redis ^4.3.1 ^4.7.0
typescript ^4.7.4 ^5.8.3
uuid4 ^2.0.2 ^2.0.3
@types/uuid4 ^2.0.0 ^2.0.3
ts-node ^10.9.1 ^10.9.2

rmb_peer_server

Package Current Version New Version
redis ^4.3.1 ^4.7.0
typescript ^4.7.4 ^5.8.3
ts-node ^10.9.1 ^10.9.2

stats

Package Current Version New Version
vue ^3.3.5 ^3.5.13
vuetify ^3.3.21 ^3.8.3
@tsconfig/node18 ^18.2.2 ^18.2.4
@types/jsdom ^21.1.3 ^21.1.7
@types/node ^18.17.17 ^22.15.3
@vitejs/plugin-vue ^4.3.4 ^5.2.3
@vitejs/plugin-vue-jsx ^3.0.2 ^4.1.2
@vue/test-utils ^2.4.1 ^2.4.6
@vue/tsconfig ^0.4.0 ^0.7.0
jsdom ^22.1.0 ^26.1.0
npm-run-all2 ^6.0.6 ^7.0.2
start-server-and-test ^2.0.0 ^2.0.11
typescript ~5.2.0 ~5.8.3
vite ^4.4.9 ^6.3.4
vitest ^0.34.4 ^3.1.2
vue-tsc ^1.8.11 ^2.2.10

stellar_solana_bridge

Package Current Version New Version
@solana/web3.js ^1.98.0 ^1.98.2
@stellar/stellar-sdk ^13.1.0 ^13.3.0
vuetify ^3.7.18 ^3.8.3
@tsconfig/node18 ^18.2.2 ^18.2.4
@types/jsdom ^21.1.3 ^21.1.7
@types/node ^18.17.17 ^22.15.3
@vitejs/plugin-vue-jsx ^3.0.2 ^4.1.2
@vue/test-utils ^2.4.1 ^2.4.6
jsdom ^22.1.0 ^26.1.0
npm-run-all2 ^6.0.6 ^8.0.1
sass ^1.86.0 ^1.87.0
start-server-and-test ^2.0.0 ^2.0.11
typescript ~5.2.0 ~5.8.3
vite ^4.4.9 ^6.3.4
vite-plugin-vuetify ^2.1.0 ^2.1.1
vue-tsc ^1.8.11 ^2.2.10

tfchain_client

Package Current Version New Version
@polkadot/typegen ^8.9.1 ^15.9.2
ts-node ^10.9.1 ^10.9.2
typedoc ^0.23.28 ^0.28.4
typescript ^5.0.2 ^5.8.3
@polkadot/api ^8.9.1 ^15.9.2

types

Package Current Version New Version
@types/node ^18.11.9 ^22.15.3
ts-node ^10.9.1 ^10.9.2
typescript ^4.9.3 ^5.8.3

please note that some packages are not on the latest major versions due to CJS removed build
those packages are:

  • @noble/secp256k1
  • private-ip
  • url-join

Also @jimber/pkid upgrade will not help, please see threefoldtech/pkid_node_client#9

Related Issues

#2978

Tested Scenarios

please note all the failing tests are not related to this pr

Documentation PR

For UI changes, Please provide the Documentation PR on info_grid

To consider

Preliminary Checks:

  • Preliminary Checks
    • Does it completely address the issue linked?
    • What about edge cases?
    • Does it meet the specified acceptance criteria?
    • Are there any unintended side effects?
    • Does the PR adhere to the team's coding conventions, style guides, and best practices?
    • Does it integrate well with existing features?
    • Does it impact the overall performance of the application?
    • Are there any bottlenecks or slowdowns?
    • Has it been optimized for efficiency?
    • Has it been adequately tested with unit, integration, and end-to-end tests?
    • Are there any known defects or issues?
    • Is the code well-documented?
    • Are changes to documentation reflected in the code?

UI Checks:

  • UI Checks
    • If a UI design is provided/ does it follow it?
    • Does every button work?
    • Is the data displayed logical? Is it what you expected?
    • Does every validation work?
    • Does this interface feel intuitive?
    • What about slow network? Offline?
    • What if the gridproxy/graphql/chain is failing?
    • What would a first time user have a hard time navigating here?

Code Quality Checks:

  • Code Quality Checks
    • Code formatted/linted? Are there unused imports? .. etc
    • Is there redundant/repeated code?
    • Are there conditionals that are always true or always false?
    • Can we write this more concisely?
    • Can we reuse this code? If yes, where?
    • Will the changes be easy to maintain and update in the future?
    • Can this code become too complex to understand for other devs?
    • Can this code cause future integration problems?

Testing Checklist

  • Does it Meet the specified acceptance criteria.
  • Test if changes can affect any other functionality.
  • Tested with unit, integration, and end-to-end tests.
  • Tested the un-happy path and rollback scenarios.
  • Documentation updated to meet the latest changes.
  • Check automated tests working successfully with the changes.
  • Can be covered by automated tests.

General Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring
  • Screenshots/Video attached (needed for UI changes)

0oM4R added 28 commits April 16, 2025 15:28
* audit:
@noble/secp256k1: 1.7.1 --> 2.2.3
algosdk: 1.19.0 --> 3.2.0, also update the algo module to be compatible with the new version.
stellar-sdk --> @stellar/stellar-sdk v13.2.0

* audit:
crypto-js
update repo url, and upgrade ts version
@0oM4R 0oM4R force-pushed the development_upgrades branch from ec1ff5d to 8833469 Compare May 4, 2025 09:41
@samaradel
Copy link
Contributor

samaradel commented May 12, 2025

output of the cloned repo:
image
Steller script too:
image

@0oM4R
Copy link
Contributor Author

0oM4R commented May 12, 2025

output of the cloned repo:

image

Steller script too:

image

Please note that if we yarn and build the repo on another branch so the issue of caching will be reproduced.
I suggest to have separate path for testing this pr

PS the mentioned modules are working with me

@samaradel
Copy link
Contributor

samaradel commented May 19, 2025

I got many warnings about vue/require-default-prop , vue/attributes-order , vue/v-slot-style and vue/max-attributes-per-line

image
image
image
image

@0oM4R
Copy link
Contributor Author

0oM4R commented May 19, 2025

I got many warnings about vue/require-default-prop , vue/attributes-order , vue/v-slot-style and vue/max-attributes-per-line

About the new eslint rules, we are now using totally new versions of elsint and its plugins; so I tried as much as I can to introduce rules that are similar to the old rules, which are (many of them) not compatible with the new version.

Some warnings I add to enhance code quality with warnings only ,but not all of them are breaking

we have 2 options here, keep the rules as it and handle it in #4086, or disable the new rules

<img
v-else
:src="countryFlagSrc"
class="h-100"
:alt="(node?.location.country ?? 'node') + '-flag'"
v-bind="props"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removed? should be self-closing

@@ -275,7 +366,7 @@
<reserve-btn
v-if="node?.dedicated && node?.status !== 'down'"
class="ml-4"
:node="(node as GridNode)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing brackets causes some formatting issues

image

After getting it back
image

@@ -1,6 +1,7 @@
import { Mycelium } from "../zos";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import, please remove.

import { ValidateMembers } from "../helpers";
import { WorkloadData, WorkloadDataResult } from "./workload_base";
import { WorkloadTypes } from "./workload";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used, please use it

@@ -0,0 +1,226 @@
import { Buffer } from "buffer";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used , please remove

@samaradel
Copy link
Contributor

Screencast.from.19-05-25.13.58.48.webm

@0oM4R 0oM4R requested a review from samaradel May 20, 2025 15:08
@amiraabouhadid
Copy link
Contributor

image
Screenshot 2025-05-20 at 23 18 34

@0oM4R
Copy link
Contributor Author

0oM4R commented May 21, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants