Skip to content

Commit

Permalink
feat: Updated packages; add EssentialWeb3 for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
opanasiuk-oleksii authored and AntonKozAllB committed Jan 14, 2025
1 parent 2d2e5df commit 9fe61fa
Show file tree
Hide file tree
Showing 88 changed files with 7,416 additions and 9,164 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"node_modules/**",
"src/configs/",
"src/__tests__/services/liquidity-pool/sol/data/",
"src/services/models/srb/token-contract.ts",
"src/services/models/srb/",
"src/services/models/abi/",
"src/services/utils/srb/assembled-tx.ts"
]
}
63 changes: 0 additions & 63 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion esbuild-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const cache = {};

function esbuildHook(code, filepath) {
const result = transformSync(code, {
target: "node16",
target: "node22",
sourcemap: "both",
loader: "ts",
format: "cjs",
Expand Down
90 changes: 90 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import _import from "eslint-plugin-import";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["scripts/*", "**/esbuild-hook.js"],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier",
)), {
plugins: {
import: fixupPluginRules(_import),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "commonjs",

parserOptions: {
project: "./tsconfig.lint.json",
},
},

settings: {
"import/resolver": {
typescript: {
project: "tsconfig.json",
},
},
},

rules: {
"import/order": ["error", {
alphabetize: {
order: "asc",
caseInsensitive: true,
},
}],

"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-unused-modules": "error",

"@typescript-eslint/no-unused-vars": ["warn", {
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^ignore"
}],

"eslint-comments/no-unlimited-disable": "off",
"eslint-comments/disable-enable-pair": "off",
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/ban-ts-comment": ["warn", {
minimumDescriptionLength: 3,
}],

"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
},
}];
98 changes: 49 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@
"/dist"
],
"engines": {
"node": "^18.7.0 || >= 16",
"npm": "^8.16.0 || >= 8"
"node": "^22.4.0 || >= 20",
"npm": "^10.8.1 || >= 10"
},
"volta": {
"node": "18.7.0",
"npm": "8.16.0"
"node": "22.4.0",
"npm": "10.8.1"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"preins": "rm -rf node_modules && pnpm i",
"build": "pnpm run clean && pnpm run type:dts && tsc && pnpm run build:main",
"build:main": "node -r ./esbuild-hook ./scripts/build",
"clean": "node -r ./esbuild-hook ./scripts/clean",
"type:dts": "tsc --emitDeclarationOnly",
"type:check": "tsc --noEmit",
"format": "prettier \"src/**/*.ts\" \"examples/**/*.ts\" --write",
"format:check": "prettier \"src/**/*.ts\" \"examples/**/*.ts\" --check",
"lint": "eslint src --ext .ts --fix",
"lint:check": "eslint src --ext .ts",
"lint": "eslint src --fix",
"lint:check": "eslint src",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
Expand All @@ -48,69 +49,68 @@
},
"keywords": [],
"devDependencies": {
"@eslint/compat": "^1.2.4",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@ryansonshine/commitizen": "^4.2.8",
"@ryansonshine/cz-conventional-changelog": "^3.3.4",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/github": "^8.1.0",
"@semantic-release/npm": "^10.0.5",
"@semantic-release/release-notes-generator": "^10.0.3",
"@types/bn.js": "^5.1.1",
"@types/jest": "^29.5.4",
"@types/node": "^18.17.15",
"@types/prompts": "^2.4.4",
"@types/randombytes": "^2.0.0",
"@types/timed-cache": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bs58": "^5.0.0",
"c8": "^7.14.0",
"cspell": "^6.31.3",
"dotenv": "^16.3.1",
"esbuild": "^0.21.4",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/github": "^11.0.1",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.2",
"@types/big.js": "^6.2.2",
"@types/bn.js": "^5.1.6",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/prompts": "^2.4.9",
"@types/randombytes": "^2.0.3",
"@types/timed-cache": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"bs58": "^6.0.0",
"c8": "^10.1.3",
"cspell": "^8.17.1",
"dotenv": "^16.4.7",
"esbuild": "^0.24.2",
"esbuild-plugin-copy": "^2.1.1",
"esbuild-plugin-noexternal": "^0.1.6",
"esbuild-plugin-polyfill-node": "^0.3.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-import": "^2.31.0",
"globals": "^15.14.0",
"jest": "^29.7.0",
"jest-extended": "^3.2.4",
"nock": "^13.3.3",
"nyc": "^15.1.0",
"prettier": "^2.8.8",
"semantic-release": "^19.0.5",
"jest-extended": "^4.0.2",
"nock": "^13.5.6",
"nyc": "^17.1.0",
"prettier": "^3.4.2",
"semantic-release": "^24.2.0",
"source-map-support": "^0.5.21",
"tronweb-typings": "^1.0.1",
"ts-jest": "^29.1.1",
"typechain": "^8.3.1",
"typedoc": "^0.23.28",
"typescript": "^4.9.5"
"ts-jest": "^29.2.5",
"typechain": "^8.3.2",
"typedoc": "^0.27.6",
"typescript": "5.5.4"
},
"overrides": {
"semver-regex": "3.1.4"
},
"dependencies": {
"@project-serum/anchor": "^0.25.0",
"@stellar/stellar-sdk": "12.2.0",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.78.5",
"@types/big.js": "^6.2.0",
"assert": "^2.1.0",
"axios": "^1.7.2",
"big.js": "^6.2.1",
"@solana/web3.js": "^1.98.0",
"@stellar/stellar-sdk": "^13.1.0",
"axios": "^1.7.9",
"big.js": "^6.2.2",
"bn.js": "^5.2.1",
"erc-20-abi": "^1.0.0",
"querystring": "^0.2.1",
"randombytes": "^2.1.0",
"timed-cache": "^2.0.0",
"tronweb": "^4.4.0",
"web3": "1.9.0",
"web3-core": "1.9.0",
"web3-eth-contract": "1.9.0",
"web3-utils": "1.9.0"
"tronweb": "^6.0.0",
"web3": "^4.16.0",
"web3-eth-contract": "^4.7.2"
},
"jest": {
"transform": {
Expand Down
Loading

0 comments on commit 9fe61fa

Please sign in to comment.