diff --git a/.changeset/spotty-pumpkins-buy.md b/.changeset/spotty-pumpkins-buy.md new file mode 100644 index 0000000000..2d8f0fcb3a --- /dev/null +++ b/.changeset/spotty-pumpkins-buy.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/utils': minor +--- + +Add toUpperCamelCase and deepFind functionss diff --git a/.changeset/yellow-baboons-kneel.md b/.changeset/yellow-baboons-kneel.md new file mode 100644 index 0000000000..7a7ab64578 --- /dev/null +++ b/.changeset/yellow-baboons-kneel.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/sdk': minor +--- + +Add decodeIsmMetadata function diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 4d284e827e..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -dist -coverage -*.cts \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index a23e3c2f93..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,65 +0,0 @@ -{ - "env": { - "node": true, - "browser": true, - "es2021": true - }, - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint","jest"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "rules": { - "no-console": ["error"], - "no-eval": ["error"], - "no-extra-boolean-cast": ["error"], - "no-ex-assign": ["error"], - "no-constant-condition": ["off"], - "no-return-await": ["error"], - "no-restricted-imports": ["error", { - "name": "console", - "message": "Please use a logger and/or the utils' package assert" - }, { - "name": "fs", - "message": "Avoid use of node-specific libraries" - }], - "guard-for-in": ["error"], - "@typescript-eslint/ban-ts-comment": ["off"], - "@typescript-eslint/explicit-module-boundary-types": ["off"], - "@typescript-eslint/no-explicit-any": ["off"], - "@typescript-eslint/no-floating-promises": ["error"], - "@typescript-eslint/no-non-null-assertion": ["off"], - "@typescript-eslint/no-require-imports": ["warn"], - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - } - ], - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - // Unban the {} type which is a useful shorthand for non-nullish value - "{}": false - }, - "extendDefaults": true - } - ], - "jest/no-disabled-tests": "warn", - "jest/no-focused-tests": "error", - "jest/no-identical-title": "error", - "jest/prefer-to-have-length": "warn", - "jest/valid-expect": "error" - } -} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52410ecd6f..f46b984ec3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,12 @@ jobs: .yarn key: ${{ runner.os }}-yarn-4.5.1-cache-${{ hashFiles('./yarn.lock') }} fail-on-cache-miss: true + + # Build required before linting or the intra-monorepo package cycle checking won't work + - name: yarn-build + uses: ./.github/actions/yarn-build-with-cache + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: lint run: yarn lint diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..3be951d450 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,115 @@ +import { FlatCompat } from '@eslint/eslintrc'; +import js from '@eslint/js'; +import typescriptEslint from '@typescript-eslint/eslint-plugin'; +import tsParser from '@typescript-eslint/parser'; +import importPlugin from 'eslint-plugin-import'; +import jest from 'eslint-plugin-jest'; +import globals from 'globals'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +export const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +export default [ + { + ignores: [ + '**/node_modules', + '**/dist', + '**/coverage', + '**/*.cjs', + '**/*.cts', + '**/*.mjs', + 'jest.config.js', + ], + }, + ...compat.extends( + 'eslint:recommended', + 'plugin:import/recommended', + 'plugin:import/typescript', + 'plugin:@typescript-eslint/recommended', + 'prettier', + ), + { + plugins: { + import: importPlugin, + '@typescript-eslint': typescriptEslint, + jest, + }, + + languageOptions: { + globals: { + ...globals.node, + ...globals.browser, + }, + + parser: tsParser, + ecmaVersion: 12, + sourceType: 'module', + + parserOptions: { + project: './tsconfig.json', + }, + }, + + settings: { + 'import/resolver': { + typescript: true, + node: true, + }, + }, + + rules: { + 'guard-for-in': ['error'], + 'import/no-cycle': ['error'], + 'import/no-self-import': ['error'], + 'import/no-named-as-default-member': ['off'], + 'no-console': ['error'], + 'no-eval': ['error'], + 'no-extra-boolean-cast': ['error'], + 'no-ex-assign': ['error'], + 'no-constant-condition': ['off'], + 'no-return-await': ['error'], + + 'no-restricted-imports': [ + 'error', + { + name: 'console', + message: 'Please use a logger and/or the utils package assert', + }, + { + name: 'fs', + message: 'Avoid use of node-specific libraries', + }, + ], + + '@typescript-eslint/ban-ts-comment': ['off'], + '@typescript-eslint/explicit-module-boundary-types': ['off'], + '@typescript-eslint/no-explicit-any': ['off'], + '@typescript-eslint/no-floating-promises': ['error'], + '@typescript-eslint/no-non-null-assertion': ['off'], + '@typescript-eslint/no-require-imports': ['warn'], + '@typescript-eslint/no-unused-expressions': ['off'], + '@typescript-eslint/no-empty-object-type': ['off'], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + + 'jest/no-disabled-tests': 'warn', + 'jest/no-focused-tests': 'error', + 'jest/no-identical-title': 'error', + 'jest/prefer-to-have-length': 'warn', + 'jest/valid-expect': 'error', + }, + }, +]; diff --git a/package.json b/package.json index 2a2400e965..ca00bcd3cb 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,14 @@ "description": "A yarn workspace of core Hyperlane packages", "version": "0.0.0", "devDependencies": { + "@eslint/js": "^9.15.0", "@trivago/prettier-plugin-sort-imports": "^4.2.1", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", - "eslint": "^8.57.0", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", + "eslint": "^9.15.0", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.2.0", "husky": "^8.0.0", "lint-staged": "^12.4.3", @@ -41,6 +44,7 @@ "async": "^2.6.4", "fetch-ponyfill": "^7.1", "flat": "^5.0.2", + "globals": "^14.0.0", "lodash": "^4.17.21", "recursive-readdir": "^2.2.3", "underscore": "^1.13", diff --git a/typescript/ccip-server/.eslintrc b/typescript/ccip-server/.eslintrc deleted file mode 100644 index 05936cd4e4..0000000000 --- a/typescript/ccip-server/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "no-console": ["off"] - } - } - \ No newline at end of file diff --git a/typescript/ccip-server/eslint.config.mjs b/typescript/ccip-server/eslint.config.mjs new file mode 100644 index 0000000000..17cd27a740 --- /dev/null +++ b/typescript/ccip-server/eslint.config.mjs @@ -0,0 +1,17 @@ +import MonorepoDefaults from '../../eslint.config.mjs'; + +export default [ + ...MonorepoDefaults, + { + files: ['./src/**/*.ts'], + }, + { + rules: { + 'no-console': ['off'], + 'no-restricted-imports': ['off'], + }, + }, + { + ignores: ['**/__mocks__/*','**/tests/*',] + } +]; diff --git a/typescript/ccip-server/package.json b/typescript/ccip-server/package.json index 9089365167..7920161da7 100644 --- a/typescript/ccip-server/package.json +++ b/typescript/ccip-server/package.json @@ -12,9 +12,11 @@ "node": ">=16" }, "scripts": { + "build": "tsc -p tsconfig.json", "start": "tsx src/server.ts", "dev": "nodemon src/server.ts", "test": "jest", + "lint": "eslint -c ./eslint.config.mjs", "prettier": "prettier --write ./src/* ./tests/" }, "author": "brolee", @@ -22,6 +24,7 @@ "devDependencies": { "@jest/globals": "^29.7.0", "@types/node": "^16.9.1", + "eslint": "^9.15.0", "jest": "^29.7.0", "nodemon": "^3.0.3", "prettier": "^2.8.8", diff --git a/typescript/ccip-server/src/server.ts b/typescript/ccip-server/src/server.ts index 0f69c499f4..4151b98644 100644 --- a/typescript/ccip-server/src/server.ts +++ b/typescript/ccip-server/src/server.ts @@ -6,12 +6,14 @@ import { ProofsService } from './services/ProofsService'; // Initialize Services const proofsService = new ProofsService( - config.LIGHT_CLIENT_ADDR, - config.RPC_ADDRESS, - config.STEP_FN_ID, - config.CHAIN_ID, - config.SUCCINCT_PLATFORM_URL, - config.SUCCINCT_API_KEY, + { + lightClientAddress: config.LIGHT_CLIENT_ADDR, + stepFunctionId: config.STEP_FN_ID, + platformUrl: config.SUCCINCT_PLATFORM_URL, + apiKey: config.SUCCINCT_API_KEY, + }, + { url: config.RPC_ADDRESS, chainId: config.CHAIN_ID }, + { url: `${config.SERVER_URL_PREFIX}:${config.SERVER_PORT}` }, ); // Initialize Server and add Service handlers diff --git a/typescript/ccip-server/src/services/LightClientService.ts b/typescript/ccip-server/src/services/LightClientService.ts index f3aae5b097..4511229669 100644 --- a/typescript/ccip-server/src/services/LightClientService.ts +++ b/typescript/ccip-server/src/services/LightClientService.ts @@ -27,8 +27,8 @@ class LightClientService { * @param slot * @returns */ - async getSyncCommitteePoseidons(slot: bigint): Promise { - return await this.lightClientContract.syncCommitteePoseidons( + getSyncCommitteePoseidons(slot: bigint): Promise { + return this.lightClientContract.syncCommitteePoseidons( this.getSyncCommitteePeriod(slot), ); } diff --git a/typescript/ccip-server/src/services/ProofsService.ts b/typescript/ccip-server/src/services/ProofsService.ts index 1d05e7a3f7..5db40c5648 100644 --- a/typescript/ccip-server/src/services/ProofsService.ts +++ b/typescript/ccip-server/src/services/ProofsService.ts @@ -4,8 +4,7 @@ import { TelepathyCcipReadIsmAbi } from '../abis/TelepathyCcipReadIsmAbi'; import { HyperlaneService } from './HyperlaneService'; import { LightClientService, SuccinctConfig } from './LightClientService'; -import { RPCService } from './RPCService'; -import { ProofResult } from './RPCService'; +import { ProofResult, RPCService } from './RPCService'; import { ProofStatus } from './common/ProofStatusEnum'; type RPCConfig = { @@ -100,10 +99,7 @@ class ProofsService { ); const slot = await this.lightClientService.calculateSlot(BigInt(timestamp)); const syncCommitteePoseidon = ''; // TODO get from LC - return await this.lightClientService.requestProof( - syncCommitteePoseidon, - slot, - ); + return this.lightClientService.requestProof(syncCommitteePoseidon, slot); } /** diff --git a/typescript/ccip-server/tsconfig.json b/typescript/ccip-server/tsconfig.json new file mode 100644 index 0000000000..793d16b8e4 --- /dev/null +++ b/typescript/ccip-server/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "./dist/", + "rootDir": "./src" + }, + "exclude": ["./node_modules/", "./dist/"], + "include": ["./src/*.ts"] +} diff --git a/typescript/cli/.eslintignore b/typescript/cli/.eslintignore deleted file mode 100644 index 76add878f8..0000000000 --- a/typescript/cli/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist \ No newline at end of file diff --git a/typescript/cli/.eslintrc b/typescript/cli/.eslintrc deleted file mode 100644 index 4d2a6fe74f..0000000000 --- a/typescript/cli/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "no-console": ["off"], - "no-restricted-imports": ["off"] - } -} diff --git a/typescript/cli/eslint.config.mjs b/typescript/cli/eslint.config.mjs new file mode 100644 index 0000000000..30f5895c6a --- /dev/null +++ b/typescript/cli/eslint.config.mjs @@ -0,0 +1,20 @@ +import MonorepoDefaults from '../../eslint.config.mjs'; + +export default [ + ...MonorepoDefaults, + { + files: ['./src/**/*.ts', './cli.ts', './env.ts'], + }, + { + rules: { + 'no-console': ['off'], + 'no-restricted-imports': ['off'], + }, + }, + { + ignores: ['./src/tests/**/*.ts'], + rules: { + 'import/no-cycle': ['off'], + }, + }, +]; diff --git a/typescript/cli/package.json b/typescript/cli/package.json index aead4269af..8826421988 100644 --- a/typescript/cli/package.json +++ b/typescript/cli/package.json @@ -26,18 +26,21 @@ "zx": "^8.1.4" }, "devDependencies": { + "@eslint/js": "^9.15.0", "@ethersproject/abi": "*", "@ethersproject/providers": "*", "@types/chai-as-promised": "^8", "@types/mocha": "^10.0.1", "@types/node": "^18.14.5", "@types/yargs": "^17.0.24", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", "chai": "^4.5.0", "chai-as-promised": "^8.0.0", - "eslint": "^8.57.0", + "eslint": "^9.15.0", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "mocha": "^10.2.0", "prettier": "^2.8.8", "typescript": "5.3.3" @@ -47,7 +50,7 @@ "build": "yarn version:update && tsc", "dev": "yarn version:update && tsc --watch", "clean": "rm -rf ./dist", - "lint": "eslint . --ext .ts", + "lint": "eslint -c ./eslint.config.mjs", "prettier": "prettier --write ./src ./examples", "test:ci": "yarn mocha --config .mocharc.json", "test:e2e": "./scripts/run-e2e-test.sh", diff --git a/typescript/cli/src/avs/check.ts b/typescript/cli/src/avs/check.ts index 6730463e62..27055c6848 100644 --- a/typescript/cli/src/avs/check.ts +++ b/typescript/cli/src/avs/check.ts @@ -429,7 +429,7 @@ const getEcdsaStakeRegistryAddress = ( ): Address | undefined => { try { return avsAddresses[chain]['ecdsaStakeRegistry']; - } catch (err) { + } catch { topLevelErrors.push( `❗️ EcdsaStakeRegistry address not found for ${chain}`, ); diff --git a/typescript/cli/src/check/warp.ts b/typescript/cli/src/check/warp.ts index a31fac62e4..f0d147a468 100644 --- a/typescript/cli/src/check/warp.ts +++ b/typescript/cli/src/check/warp.ts @@ -4,7 +4,6 @@ import { WarpRouteDeployConfig, normalizeConfig } from '@hyperlane-xyz/sdk'; import { ObjectDiff, diffObjMerge } from '@hyperlane-xyz/utils'; import { log, logGreen } from '../logger.js'; -import '../utils/output.js'; import { formatYamlViolationsOutput } from '../utils/output.js'; export async function runWarpRouteCheck({ diff --git a/typescript/cli/src/commands/relayer.ts b/typescript/cli/src/commands/relayer.ts index 0d7672e734..c07a4d4120 100644 --- a/typescript/cli/src/commands/relayer.ts +++ b/typescript/cli/src/commands/relayer.ts @@ -9,7 +9,7 @@ import { Address } from '@hyperlane-xyz/utils'; import { CommandModuleWithContext } from '../context/types.js'; import { log } from '../logger.js'; import { tryReadJson, writeJson } from '../utils/files.js'; -import { getWarpCoreConfigOrExit } from '../utils/input.js'; +import { getWarpCoreConfigOrExit } from '../utils/warp.js'; import { agentTargetsCommandOption, diff --git a/typescript/cli/src/commands/warp.ts b/typescript/cli/src/commands/warp.ts index c2f4916b01..3cd99fe6a0 100644 --- a/typescript/cli/src/commands/warp.ts +++ b/typescript/cli/src/commands/warp.ts @@ -23,8 +23,8 @@ import { removeEndingSlash, writeYamlOrJson, } from '../utils/files.js'; -import { getWarpCoreConfigOrExit } from '../utils/input.js'; import { selectRegistryWarpRoute } from '../utils/tokens.js'; +import { getWarpCoreConfigOrExit } from '../utils/warp.js'; import { runVerifyWarpRoute } from '../verify/warp.js'; import { diff --git a/typescript/cli/src/config/agent.ts b/typescript/cli/src/config/agent.ts index 05fa165596..a176a6f040 100644 --- a/typescript/cli/src/config/agent.ts +++ b/typescript/cli/src/config/agent.ts @@ -99,7 +99,7 @@ async function getStartBlocks( try { const deployedBlock = await mailbox.deployedBlock(); return deployedBlock.toNumber(); - } catch (err) { + } catch { errorRed( `❌ Failed to get deployed block to set an index for ${chain}, this is potentially an issue with rpc provider or a misconfiguration`, ); diff --git a/typescript/cli/src/config/submit.ts b/typescript/cli/src/config/submit.ts index 3b7e3c59e7..6ce067a8a0 100644 --- a/typescript/cli/src/config/submit.ts +++ b/typescript/cli/src/config/submit.ts @@ -3,9 +3,8 @@ import { stringify as yamlStringify } from 'yaml'; import { AnnotatedEV5Transaction, SubmissionStrategy, - getChainIdFromTxs, } from '@hyperlane-xyz/sdk'; -import { assert, errorToString } from '@hyperlane-xyz/utils'; +import { ProtocolType, assert, errorToString } from '@hyperlane-xyz/utils'; import { WriteCommandContext } from '../context/types.js'; import { logGray, logRed } from '../logger.js'; @@ -27,17 +26,15 @@ export async function runSubmit({ receiptsFilepath: string; submissionStrategy: SubmissionStrategy; }) { - const { chainMetadata, multiProvider } = context; + const { multiProvider } = context; assert( submissionStrategy, 'Submission strategy required to submit transactions.\nPlease create a submission strategy. See examples in cli/examples/submit/strategy/*.', ); const transactions = getTransactions(transactionsFilepath); - const chainId = getChainIdFromTxs(transactions); - const protocol = chainMetadata[chainId].protocol; - const submitterBuilder = await getSubmitterBuilder({ + const submitterBuilder = await getSubmitterBuilder({ submissionStrategy, multiProvider, }); diff --git a/typescript/cli/src/deploy/core.ts b/typescript/cli/src/deploy/core.ts index 28ff4d50e5..9bbd7bcbda 100644 --- a/typescript/cli/src/deploy/core.ts +++ b/typescript/cli/src/deploy/core.ts @@ -1,12 +1,12 @@ import { stringify as yamlStringify } from 'yaml'; import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js'; -import { DeployedCoreAddresses } from '@hyperlane-xyz/sdk'; import { ChainMap, ChainName, ContractVerifier, CoreConfig, + DeployedCoreAddresses, EvmCoreModule, ExplorerLicenseType, } from '@hyperlane-xyz/sdk'; diff --git a/typescript/cli/src/deploy/dry-run.ts b/typescript/cli/src/deploy/dry-run.ts index f821dc179f..fa0c309725 100644 --- a/typescript/cli/src/deploy/dry-run.ts +++ b/typescript/cli/src/deploy/dry-run.ts @@ -5,12 +5,11 @@ import { resetFork, setFork, } from '@hyperlane-xyz/sdk'; +import { toUpperCamelCase } from '@hyperlane-xyz/utils'; import { logGray, logGreen, warnYellow } from '../logger.js'; import { ENV } from '../utils/env.js'; -import { toUpperCamelCase } from './utils.js'; - /** * Forks a provided network onto MultiProvider * @param multiProvider the MultiProvider to be prepared diff --git a/typescript/cli/src/deploy/utils.ts b/typescript/cli/src/deploy/utils.ts index d8ced32dc7..125e7b1e77 100644 --- a/typescript/cli/src/deploy/utils.ts +++ b/typescript/cli/src/deploy/utils.ts @@ -169,10 +169,6 @@ export async function completeDeploy( if (isDryRun) await completeDryRun(command); } -export function toUpperCamelCase(string: string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} - function transformChainMetadataForDisplay(chainMetadata: ChainMetadata) { return { Name: chainMetadata.name, diff --git a/typescript/cli/src/deploy/warp.ts b/typescript/cli/src/deploy/warp.ts index 161d296f88..639d5d5c8a 100644 --- a/typescript/cli/src/deploy/warp.ts +++ b/typescript/cli/src/deploy/warp.ts @@ -955,7 +955,7 @@ async function getWarpApplySubmitter({ context: WriteCommandContext; strategyUrl?: string; }): Promise> { - const { chainMetadata, multiProvider } = context; + const { multiProvider } = context; const submissionStrategy: SubmissionStrategy = strategyUrl ? readChainSubmissionStrategy(strategyUrl)[chain] @@ -966,8 +966,7 @@ async function getWarpApplySubmitter({ }, }; - const protocol = chainMetadata[chain].protocol; - return getSubmitterBuilder({ + return getSubmitterBuilder({ submissionStrategy, multiProvider, }); diff --git a/typescript/cli/src/read/warp.ts b/typescript/cli/src/read/warp.ts index 9139d890c2..bd5d01e95e 100644 --- a/typescript/cli/src/read/warp.ts +++ b/typescript/cli/src/read/warp.ts @@ -15,7 +15,7 @@ import { isAddressEvm, objMap, promiseObjAll } from '@hyperlane-xyz/utils'; import { CommandContext } from '../context/types.js'; import { logGray, logRed, logTable } from '../logger.js'; -import { getWarpCoreConfigOrExit } from '../utils/input.js'; +import { getWarpCoreConfigOrExit } from '../utils/warp.js'; export async function runWarpRouteRead({ context, diff --git a/typescript/cli/src/status/message.ts b/typescript/cli/src/status/message.ts index 2c1e9af96c..df3ff1d983 100644 --- a/typescript/cli/src/status/message.ts +++ b/typescript/cli/src/status/message.ts @@ -52,7 +52,7 @@ export async function checkMessageStatus({ } else { try { dispatchedReceipt = await core.getDispatchTx(origin, messageId); - } catch (e) { + } catch { logRed(`Failed to infer dispatch transaction for message ${messageId}`); dispatchTx = await input({ diff --git a/typescript/cli/src/utils/env.ts b/typescript/cli/src/utils/env.ts index 51ab1ce352..a0a5b232f1 100644 --- a/typescript/cli/src/utils/env.ts +++ b/typescript/cli/src/utils/env.ts @@ -1,4 +1,4 @@ -import z from 'zod'; +import { z } from 'zod'; const envScheme = z.object({ HYP_KEY: z.string().optional(), diff --git a/typescript/cli/src/utils/files.ts b/typescript/cli/src/utils/files.ts index 9c7cb6216e..50f56d1b77 100644 --- a/typescript/cli/src/utils/files.ts +++ b/typescript/cli/src/utils/files.ts @@ -42,7 +42,7 @@ export function isFile(filepath: string) { if (!filepath) return false; try { return fs.existsSync(filepath) && fs.lstatSync(filepath).isFile(); - } catch (error) { + } catch { log(`Error checking for file: ${filepath}`); return false; } @@ -70,7 +70,7 @@ export function readJson(filepath: string): T { export function tryReadJson(filepath: string): T | null { try { return readJson(filepath) as T; - } catch (error) { + } catch { return null; } } @@ -98,7 +98,7 @@ export function readYaml(filepath: string): T { export function tryReadYamlAtPath(filepath: string): T | null { try { return readYaml(filepath); - } catch (error) { + } catch { return null; } } diff --git a/typescript/cli/src/utils/input.ts b/typescript/cli/src/utils/input.ts index 2ccef32db8..1466fe692d 100644 --- a/typescript/cli/src/utils/input.ts +++ b/typescript/cli/src/utils/input.ts @@ -19,19 +19,13 @@ import ansiEscapes from 'ansi-escapes'; import chalk from 'chalk'; import { ProxyAdmin__factory } from '@hyperlane-xyz/core'; -import { - ChainName, - DeployedOwnableConfig, - WarpCoreConfig, -} from '@hyperlane-xyz/sdk'; +import { ChainName, DeployedOwnableConfig } from '@hyperlane-xyz/sdk'; import { Address, isAddress, rootLogger } from '@hyperlane-xyz/utils'; -import { readWarpCoreConfig } from '../config/warp.js'; import { CommandContext } from '../context/types.js'; -import { logGray, logRed } from '../logger.js'; +import { logGray } from '../logger.js'; import { indentYamlOrJson } from './files.js'; -import { selectRegistryWarpRoute } from './tokens.js'; export async function detectAndConfirmOrPrompt( detect: () => Promise, @@ -52,8 +46,9 @@ export async function detectAndConfirmOrPrompt( return detectedValue; } } - // eslint-disable-next-line no-empty - } catch (e) {} + } catch { + // Fallback to input prompt + } return input({ message: `${prompt} ${label}:`, default: detectedValue }); } @@ -136,34 +131,6 @@ export async function setProxyAdminConfig( } } -/** - * Gets a {@link WarpCoreConfig} based on the provided path or prompts the user to choose one: - * - if `symbol` is provided the user will have to select one of the available warp routes. - * - if `warp` is provided the config will be read by the provided file path. - * - if none is provided the CLI will exit. - */ -export async function getWarpCoreConfigOrExit({ - context, - symbol, - warp, -}: { - context: CommandContext; - symbol?: string; - warp?: string; -}): Promise { - let warpCoreConfig: WarpCoreConfig; - if (symbol) { - warpCoreConfig = await selectRegistryWarpRoute(context.registry, symbol); - } else if (warp) { - warpCoreConfig = readWarpCoreConfig(warp); - } else { - logRed(`Please specify either a symbol or warp config`); - process.exit(0); - } - - return warpCoreConfig; -} - /** * Searchable checkbox code * diff --git a/typescript/cli/src/utils/warp.ts b/typescript/cli/src/utils/warp.ts new file mode 100644 index 0000000000..08888628e5 --- /dev/null +++ b/typescript/cli/src/utils/warp.ts @@ -0,0 +1,35 @@ +import { WarpCoreConfig } from '@hyperlane-xyz/sdk'; + +import { readWarpCoreConfig } from '../config/warp.js'; +import { CommandContext } from '../context/types.js'; +import { logRed } from '../logger.js'; + +import { selectRegistryWarpRoute } from './tokens.js'; + +/** + * Gets a {@link WarpCoreConfig} based on the provided path or prompts the user to choose one: + * - if `symbol` is provided the user will have to select one of the available warp routes. + * - if `warp` is provided the config will be read by the provided file path. + * - if none is provided the CLI will exit. + */ +export async function getWarpCoreConfigOrExit({ + context, + symbol, + warp, +}: { + context: CommandContext; + symbol?: string; + warp?: string; +}): Promise { + let warpCoreConfig: WarpCoreConfig; + if (symbol) { + warpCoreConfig = await selectRegistryWarpRoute(context.registry, symbol); + } else if (warp) { + warpCoreConfig = readWarpCoreConfig(warp); + } else { + logRed(`Please specify either a symbol or warp config`); + process.exit(0); + } + + return warpCoreConfig; +} diff --git a/typescript/cli/src/validator/preFlightCheck.ts b/typescript/cli/src/validator/preFlightCheck.ts index ca0c4d8504..ba674b48b9 100644 --- a/typescript/cli/src/validator/preFlightCheck.ts +++ b/typescript/cli/src/validator/preFlightCheck.ts @@ -44,7 +44,7 @@ export const checkValidatorSetup = async ( try { validatorStorageLocations = await validatorAnnounce.getAnnouncedStorageLocations(validatorsArray); - } catch (e) { + } catch { errorSet.add('Failed to read announced storage locations on chain.'); } @@ -64,7 +64,7 @@ export const checkValidatorSetup = async ( let s3Validator: S3Validator; try { s3Validator = await S3Validator.fromStorageLocation(s3StorageLocation); - } catch (e) { + } catch { errorRed( `❌ Failed to fetch storage locations for validator ${validator}, this may be due to the storage location not being an S3 bucket\n\n`, ); diff --git a/typescript/helloworld/.eslintignore b/typescript/helloworld/.eslintignore deleted file mode 100644 index d461f0fa89..0000000000 --- a/typescript/helloworld/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -dist -coverage -src/types -hardhat.config.ts \ No newline at end of file diff --git a/typescript/helloworld/.eslintrc b/typescript/helloworld/.eslintrc deleted file mode 100644 index 446616f52f..0000000000 --- a/typescript/helloworld/.eslintrc +++ /dev/null @@ -1,39 +0,0 @@ -{ - "env": { - "node": true, - "browser": true, - "es2021": true - }, - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "rules": { - "no-eval": ["error"], - "no-ex-assign": ["error"], - "no-constant-condition": ["off"], - "@typescript-eslint/ban-ts-comment": ["off"], - "@typescript-eslint/explicit-module-boundary-types": ["off"], - "@typescript-eslint/no-explicit-any": ["off"], - "@typescript-eslint/no-floating-promises": ["error"], - "@typescript-eslint/no-non-null-assertion": ["off"], - "@typescript-eslint/no-require-imports": ["warn"], - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - } - ] - } -} diff --git a/typescript/helloworld/eslint.config.mjs b/typescript/helloworld/eslint.config.mjs new file mode 100644 index 0000000000..f88d208157 --- /dev/null +++ b/typescript/helloworld/eslint.config.mjs @@ -0,0 +1,17 @@ +import MonorepoDefaults from '../../eslint.config.mjs'; + +export default [ + ...MonorepoDefaults, + { + files: ['./src/**/*.ts'], + }, + { + ignores: ["**/src/types/*"], + }, + { + ignores: ['./src/scripts'], + rules: { + 'no-console': ['off'], + }, + }, +]; \ No newline at end of file diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index 3191ce2134..8d8005181e 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -10,17 +10,20 @@ "ethers": "^5.7.2" }, "devDependencies": { + "@eslint/js": "^9.15.0", "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-waffle": "^2.0.6", "@trivago/prettier-plugin-sort-imports": "^4.2.1", "@typechain/ethers-v5": "^11.1.2", "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", "chai": "4.5.0", - "eslint": "^8.57.0", + "eslint": "^9.15.0", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "ethereum-waffle": "^4.0.10", "hardhat": "^2.22.2", "hardhat-gas-reporter": "^1.0.9", @@ -56,7 +59,9 @@ "build": "yarn hardhat-esm compile && tsc", "clean": "yarn hardhat-esm clean && rm -rf dist cache src/types", "coverage": "yarn hardhat-esm coverage", - "lint": "solhint contracts/**/*.sol && eslint . --ext .ts", + "lint": "yarn lint:sol && yarn lint:ts", + "lint:sol": "solhint contracts/**/*.sol", + "lint:ts": "eslint -c ./eslint.config.mjs", "hardhat-esm": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only --no-warnings=ExperimentalWarning' hardhat --config hardhat.config.cts", "prettier": "prettier --write ./contracts ./src", "test": "yarn hardhat-esm test ./src/test/**/*.test.ts", diff --git a/typescript/sdk/.eslintrc b/typescript/sdk/.eslintrc deleted file mode 100644 index a0a6842678..0000000000 --- a/typescript/sdk/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "rules": { - "@typescript-eslint/explicit-module-boundary-types": ["warn", { - "allowArgumentsExplicitlyTypedAsAny": true - }] - } -} diff --git a/typescript/sdk/eslint.config.mjs b/typescript/sdk/eslint.config.mjs new file mode 100644 index 0000000000..2855488799 --- /dev/null +++ b/typescript/sdk/eslint.config.mjs @@ -0,0 +1,25 @@ +import MonorepoDefaults from '../../eslint.config.mjs'; + +export default [ + ...MonorepoDefaults, + { + files: ['./src/**/*.ts'], + rules: { + '@typescript-eslint/explicit-module-boundary-types': [ + 'warn', + { + allowArgumentsExplicitlyTypedAsAny: true, + }, + ], + }, + }, + { + ignores: ['./src/ism/metadata/**/*.ts'], + rules: { + 'import/no-cycle': ['off'], + }, + }, + { + ignores: ['src/**/*.js'], + }, +]; diff --git a/typescript/sdk/package.json b/typescript/sdk/package.json index 9f4fd06159..33aff0eb40 100644 --- a/typescript/sdk/package.json +++ b/typescript/sdk/package.json @@ -24,6 +24,7 @@ "zod": "^3.21.2" }, "devDependencies": { + "@eslint/js": "^9.15.0", "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-waffle": "^2.0.6", "@types/mocha": "^10.0.1", @@ -31,9 +32,14 @@ "@types/sinon": "^17.0.1", "@types/sinon-chai": "^3.2.12", "@types/ws": "^8.5.5", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", "chai": "4.5.0", "dotenv": "^10.0.0", - "eslint": "^8.57.0", + "eslint": "^9.15.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "ethereum-waffle": "^4.0.10", "hardhat": "^2.22.2", "mocha": "^10.2.0", @@ -70,7 +76,7 @@ "dev": "tsc --watch", "check": "tsc --noEmit", "clean": "rm -rf ./dist ./cache", - "lint": "eslint src --ext .ts", + "lint": "eslint -c ./eslint.config.mjs", "prepublishOnly": "yarn build", "prettier": "prettier --write ./src", "test": "yarn test:unit && yarn test:hardhat && yarn test:foundry", diff --git a/typescript/sdk/src/consts/.eslintrc b/typescript/sdk/src/consts/.eslintrc deleted file mode 100644 index 7242f12412..0000000000 --- a/typescript/sdk/src/consts/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "sort-keys": ["error"] - } -} diff --git a/typescript/sdk/src/consts/multisigIsmVerifyCosts.ts b/typescript/sdk/src/consts/multisigIsmVerifyCosts.ts index 2891527b2c..16be1a1951 100644 --- a/typescript/sdk/src/consts/multisigIsmVerifyCosts.ts +++ b/typescript/sdk/src/consts/multisigIsmVerifyCosts.ts @@ -1,4 +1,3 @@ -/* eslint-disable sort-keys */ export const multisigIsmVerifyCosts = { '1': { '1': 151966, diff --git a/typescript/sdk/src/core/CoreDeployer.hardhat-test.ts b/typescript/sdk/src/core/CoreDeployer.hardhat-test.ts index 525ca4acd0..665133ed0f 100644 --- a/typescript/sdk/src/core/CoreDeployer.hardhat-test.ts +++ b/typescript/sdk/src/core/CoreDeployer.hardhat-test.ts @@ -195,7 +195,7 @@ describe('core', async () => { try { await deployer.deploy(coreConfig); // eslint-disable-next-line no-empty - } catch (e: any) {} + } catch {} }); afterEach(async () => { @@ -252,7 +252,7 @@ describe('core', async () => { deployer.chainTimeoutMs = 1; try { await deployer.deploy(coreConfig); - } catch (e: any) { + } catch { // TODO: figure out how to test specific error case // expect(e.message).to.include('Timed out in 1ms'); } diff --git a/typescript/sdk/src/core/EvmCoreModule.ts b/typescript/sdk/src/core/EvmCoreModule.ts index a14cdc5fe9..0d783aa341 100644 --- a/typescript/sdk/src/core/EvmCoreModule.ts +++ b/typescript/sdk/src/core/EvmCoreModule.ts @@ -21,8 +21,6 @@ import { HyperlaneAddresses, HyperlaneContractsMap, } from '../contracts/types.js'; -import { DeployedCoreAddresses } from '../core/schemas.js'; -import { CoreConfig } from '../core/types.js'; import { HyperlaneProxyFactoryDeployer } from '../deploy/HyperlaneProxyFactoryDeployer.js'; import { ProxyFactoryFactories, @@ -47,7 +45,8 @@ import { EvmCoreReader } from './EvmCoreReader.js'; import { EvmIcaModule } from './EvmIcaModule.js'; import { HyperlaneCoreDeployer } from './HyperlaneCoreDeployer.js'; import { CoreFactories } from './contracts.js'; -import { CoreConfigSchema } from './schemas.js'; +import { CoreConfigSchema, DeployedCoreAddresses } from './schemas.js'; +import { CoreConfig } from './types.js'; export class EvmCoreModule extends HyperlaneModule< ProtocolType.Ethereum, diff --git a/typescript/sdk/src/core/HyperlaneRelayer.ts b/typescript/sdk/src/core/HyperlaneRelayer.ts index 0a1a451ebf..48ddfd3234 100644 --- a/typescript/sdk/src/core/HyperlaneRelayer.ts +++ b/typescript/sdk/src/core/HyperlaneRelayer.ts @@ -17,10 +17,10 @@ import { } from '@hyperlane-xyz/utils'; import { DerivedHookConfig, EvmHookReader } from '../hook/EvmHookReader.js'; -import { HookConfigSchema } from '../hook/schemas.js'; +import { HookConfigSchema } from '../hook/types.js'; import { DerivedIsmConfig, EvmIsmReader } from '../ism/EvmIsmReader.js'; import { BaseMetadataBuilder } from '../ism/metadata/builder.js'; -import { IsmConfigSchema } from '../ism/schemas.js'; +import { IsmConfigSchema } from '../ism/types.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { ChainName } from '../types.js'; @@ -307,7 +307,7 @@ export class HyperlaneRelayer { // TODO: handle batching await this.relayMessage(dispatchReceipt, undefined, dispatchMsg); - } catch (error) { + } catch { this.logger.error( `Failed to relay message ${id} (attempt #${attempts + 1})`, ); @@ -320,7 +320,7 @@ export class HyperlaneRelayer { } } - protected whitelistChains() { + protected whitelistChains(): string[] | undefined { return this.whitelist ? Object.keys(this.whitelist) : undefined; } diff --git a/typescript/sdk/src/core/schemas.ts b/typescript/sdk/src/core/schemas.ts index 470df95ab0..9959c30242 100644 --- a/typescript/sdk/src/core/schemas.ts +++ b/typescript/sdk/src/core/schemas.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; import { ProxyFactoryFactoriesSchema } from '../deploy/schemas.js'; -import { HookConfigSchema } from '../hook/schemas.js'; -import { IsmConfigSchema } from '../ism/schemas.js'; +import { HookConfigSchema } from '../hook/types.js'; +import { IsmConfigSchema } from '../ism/types.js'; import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; export const CoreConfigSchema = OwnableSchema.extend({ diff --git a/typescript/sdk/src/deploy/HyperlaneDeployer.ts b/typescript/sdk/src/deploy/HyperlaneDeployer.ts index c6cd2048c6..4deee15ac6 100644 --- a/typescript/sdk/src/deploy/HyperlaneDeployer.ts +++ b/typescript/sdk/src/deploy/HyperlaneDeployer.ts @@ -29,7 +29,7 @@ import { HyperlaneFactories, } from '../contracts/types.js'; import { HookConfig } from '../hook/types.js'; -import { HyperlaneIsmFactory } from '../ism/HyperlaneIsmFactory.js'; +import type { HyperlaneIsmFactory } from '../ism/HyperlaneIsmFactory.js'; import { IsmConfig } from '../ism/types.js'; import { moduleMatchesConfig } from '../ism/utils.js'; import { InterchainAccount } from '../middleware/account/InterchainAccount.js'; diff --git a/typescript/sdk/src/deploy/verify/.eslintrc b/typescript/sdk/src/deploy/verify/.eslintrc deleted file mode 100644 index e3f712414b..0000000000 --- a/typescript/sdk/src/deploy/verify/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "no-console": ["off"] - } -} diff --git a/typescript/sdk/src/deploy/verify/ContractVerifier.ts b/typescript/sdk/src/deploy/verify/ContractVerifier.ts index 992d2de3b9..49ecd30980 100644 --- a/typescript/sdk/src/deploy/verify/ContractVerifier.ts +++ b/typescript/sdk/src/deploy/verify/ContractVerifier.ts @@ -183,7 +183,7 @@ export class ContractVerifier { 'Parsing response from explorer...', ); responseJson = JSON.parse(responseTextString); - } catch (error) { + } catch { verificationLogger.trace( { failure: response.statusText, diff --git a/typescript/sdk/src/gas/adapters/serialization.ts b/typescript/sdk/src/gas/adapters/serialization.ts index 70cd808259..e7d34a4790 100644 --- a/typescript/sdk/src/gas/adapters/serialization.ts +++ b/typescript/sdk/src/gas/adapters/serialization.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { PublicKey } from '@solana/web3.js'; import { Domain } from '@hyperlane-xyz/utils'; diff --git a/typescript/sdk/src/gas/types.ts b/typescript/sdk/src/gas/types.ts index 55114478d2..6cb46630eb 100644 --- a/typescript/sdk/src/gas/types.ts +++ b/typescript/sdk/src/gas/types.ts @@ -5,7 +5,7 @@ import { InterchainGasPaymaster } from '@hyperlane-xyz/core'; import type { Address } from '@hyperlane-xyz/utils'; import type { CheckerViolation } from '../deploy/types.js'; -import { IgpSchema } from '../hook/schemas.js'; +import { IgpSchema } from '../hook/types.js'; import { ChainMap } from '../types.js'; export type IgpConfig = z.infer; diff --git a/typescript/sdk/src/hook/EvmHookModule.hardhat-test.ts b/typescript/sdk/src/hook/EvmHookModule.hardhat-test.ts index aa4c9d559d..ae66d7adbf 100644 --- a/typescript/sdk/src/hook/EvmHookModule.hardhat-test.ts +++ b/typescript/sdk/src/hook/EvmHookModule.hardhat-test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { expect } from 'chai'; import { Signer } from 'ethers'; import hre from 'hardhat'; diff --git a/typescript/sdk/src/hook/EvmHookModule.ts b/typescript/sdk/src/hook/EvmHookModule.ts index 5f6a64e344..a1e82177a9 100644 --- a/typescript/sdk/src/hook/EvmHookModule.ts +++ b/typescript/sdk/src/hook/EvmHookModule.ts @@ -56,13 +56,13 @@ import { normalizeConfig } from '../utils/ism.js'; import { EvmHookReader } from './EvmHookReader.js'; import { DeployedHook, HookFactories, hookFactories } from './contracts.js'; -import { HookConfigSchema } from './schemas.js'; import { AggregationHookConfig, ArbL2ToL1HookConfig, DomainRoutingHookConfig, FallbackRoutingHookConfig, HookConfig, + HookConfigSchema, HookType, IgpHookConfig, MUTABLE_HOOK_TYPE, diff --git a/typescript/sdk/src/hook/EvmHookReader.test.ts b/typescript/sdk/src/hook/EvmHookReader.test.ts index befd73a431..3a8bb45763 100644 --- a/typescript/sdk/src/hook/EvmHookReader.test.ts +++ b/typescript/sdk/src/hook/EvmHookReader.test.ts @@ -148,7 +148,6 @@ describe('EvmHookReader', () => { expect(config).to.deep.equal(hookConfig); }); - // eslint-disable-next-line @typescript-eslint/no-empty-function it('should derive op stack config correctly', async () => { const mockAddress = randomAddress(); const mockOwner = randomAddress(); diff --git a/typescript/sdk/src/hook/EvmHookReader.ts b/typescript/sdk/src/hook/EvmHookReader.ts index 9ebcd8ae03..dae0f9d589 100644 --- a/typescript/sdk/src/hook/EvmHookReader.ts +++ b/typescript/sdk/src/hook/EvmHookReader.ts @@ -269,7 +269,7 @@ export class EvmHookReader extends HyperlaneReader implements HookReader { this.provider, ); return oracle.owner(); - } catch (error) { + } catch { this.logger.debug( 'Domain not configured on IGP Hook', domainId, @@ -451,7 +451,7 @@ export class EvmHookReader extends HyperlaneReader implements HookReader { if (domainHook !== ethers.constants.AddressZero) { domainHooks[chainName] = await this.deriveHookConfig(domainHook); } - } catch (error) { + } catch { this.logger.debug( `Domain not configured on ${hook.constructor.name}`, domainId, diff --git a/typescript/sdk/src/hook/schemas.ts b/typescript/sdk/src/hook/schemas.ts deleted file mode 100644 index 16bd01b27f..0000000000 --- a/typescript/sdk/src/hook/schemas.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { z } from 'zod'; - -import { StorageGasOracleConfigSchema } from '../gas/oracle/types.js'; -import { ZHash } from '../metadata/customZodTypes.js'; -import { OwnableSchema, PausableSchema } from '../schemas.js'; - -import { - AggregationHookConfig, - DomainRoutingHookConfig, - FallbackRoutingHookConfig, - HookType, -} from './types.js'; - -export const ProtocolFeeSchema = OwnableSchema.extend({ - type: z.literal(HookType.PROTOCOL_FEE), - beneficiary: z.string(), - maxProtocolFee: z.string(), - protocolFee: z.string(), -}); - -export const MerkleTreeSchema = z.object({ - type: z.literal(HookType.MERKLE_TREE), -}); - -export const PausableHookSchema = PausableSchema.extend({ - type: z.literal(HookType.PAUSABLE), -}); - -export const OpStackHookSchema = OwnableSchema.extend({ - type: z.literal(HookType.OP_STACK), - nativeBridge: z.string(), - destinationChain: z.string(), -}); - -export const ArbL2ToL1HookSchema = z.object({ - type: z.literal(HookType.ARB_L2_TO_L1), - arbSys: z - .string() - .describe( - 'precompile for sending messages to L1, interface here: https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/precompiles/ArbSys.sol#L12', - ), - bridge: z - .string() - .optional() - .describe( - 'address of the bridge contract on L1, optional only needed for non @arbitrum/sdk chains', - ), - destinationChain: z.string(), - childHook: z.lazy((): z.ZodSchema => HookConfigSchema), -}); - -export const IgpSchema = OwnableSchema.extend({ - type: z.literal(HookType.INTERCHAIN_GAS_PAYMASTER), - beneficiary: z.string(), - oracleKey: z.string(), - overhead: z.record(z.number()), - oracleConfig: z.record(StorageGasOracleConfigSchema), -}); - -export const DomainRoutingHookConfigSchema: z.ZodSchema = - z.lazy(() => - OwnableSchema.extend({ - type: z.literal(HookType.ROUTING), - domains: z.record(HookConfigSchema), - }), - ); - -export const FallbackRoutingHookConfigSchema: z.ZodSchema = - z.lazy(() => - OwnableSchema.extend({ - type: z.literal(HookType.FALLBACK_ROUTING), - domains: z.record(HookConfigSchema), - fallback: HookConfigSchema, - }), - ); - -export const AggregationHookConfigSchema: z.ZodSchema = - z.lazy(() => - z.object({ - type: z.literal(HookType.AGGREGATION), - hooks: z.array(HookConfigSchema), - }), - ); - -export const HookConfigSchema = z.union([ - ZHash, - ProtocolFeeSchema, - PausableHookSchema, - OpStackHookSchema, - MerkleTreeSchema, - IgpSchema, - DomainRoutingHookConfigSchema, - FallbackRoutingHookConfigSchema, - AggregationHookConfigSchema, - ArbL2ToL1HookSchema, -]); diff --git a/typescript/sdk/src/hook/types.ts b/typescript/sdk/src/hook/types.ts index 01d5b0df74..3cfd824b7a 100644 --- a/typescript/sdk/src/hook/types.ts +++ b/typescript/sdk/src/hook/types.ts @@ -1,18 +1,11 @@ import { z } from 'zod'; import { OwnableConfig } from '../deploy/types.js'; +import { StorageGasOracleConfigSchema } from '../gas/oracle/types.js'; +import { ZHash } from '../metadata/customZodTypes.js'; +import { OwnableSchema, PausableSchema } from '../schemas.js'; import { ChainMap } from '../types.js'; -import { - ArbL2ToL1HookSchema, - HookConfigSchema, - IgpSchema, - MerkleTreeSchema, - OpStackHookSchema, - PausableHookSchema, - ProtocolFeeSchema, -} from './schemas.js'; - // As found in IPostDispatchHook.sol export enum OnchainHookType { UNUSED, @@ -75,3 +68,87 @@ export const MUTABLE_HOOK_TYPE = [ HookType.FALLBACK_ROUTING, HookType.PAUSABLE, ]; + +export const ProtocolFeeSchema = OwnableSchema.extend({ + type: z.literal(HookType.PROTOCOL_FEE), + beneficiary: z.string(), + maxProtocolFee: z.string(), + protocolFee: z.string(), +}); + +export const MerkleTreeSchema = z.object({ + type: z.literal(HookType.MERKLE_TREE), +}); + +export const PausableHookSchema = PausableSchema.extend({ + type: z.literal(HookType.PAUSABLE), +}); + +export const OpStackHookSchema = OwnableSchema.extend({ + type: z.literal(HookType.OP_STACK), + nativeBridge: z.string(), + destinationChain: z.string(), +}); + +export const ArbL2ToL1HookSchema = z.object({ + type: z.literal(HookType.ARB_L2_TO_L1), + arbSys: z + .string() + .describe( + 'precompile for sending messages to L1, interface here: https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/precompiles/ArbSys.sol#L12', + ), + bridge: z + .string() + .optional() + .describe( + 'address of the bridge contract on L1, optional only needed for non @arbitrum/sdk chains', + ), + destinationChain: z.string(), + childHook: z.lazy((): z.ZodSchema => HookConfigSchema), +}); + +export const IgpSchema = OwnableSchema.extend({ + type: z.literal(HookType.INTERCHAIN_GAS_PAYMASTER), + beneficiary: z.string(), + oracleKey: z.string(), + overhead: z.record(z.number()), + oracleConfig: z.record(StorageGasOracleConfigSchema), +}); + +export const DomainRoutingHookConfigSchema: z.ZodSchema = + z.lazy(() => + OwnableSchema.extend({ + type: z.literal(HookType.ROUTING), + domains: z.record(HookConfigSchema), + }), + ); + +export const FallbackRoutingHookConfigSchema: z.ZodSchema = + z.lazy(() => + OwnableSchema.extend({ + type: z.literal(HookType.FALLBACK_ROUTING), + domains: z.record(HookConfigSchema), + fallback: HookConfigSchema, + }), + ); + +export const AggregationHookConfigSchema: z.ZodSchema = + z.lazy(() => + z.object({ + type: z.literal(HookType.AGGREGATION), + hooks: z.array(HookConfigSchema), + }), + ); + +export const HookConfigSchema = z.union([ + ZHash, + ProtocolFeeSchema, + PausableHookSchema, + OpStackHookSchema, + MerkleTreeSchema, + IgpSchema, + DomainRoutingHookConfigSchema, + FallbackRoutingHookConfigSchema, + AggregationHookConfigSchema, + ArbL2ToL1HookSchema, +]); diff --git a/typescript/sdk/src/index.ts b/typescript/sdk/src/index.ts index cdb86b504b..61495f53c5 100644 --- a/typescript/sdk/src/index.ts +++ b/typescript/sdk/src/index.ts @@ -135,12 +135,12 @@ export { } from './gas/types.js'; export { EvmHookReader } from './hook/EvmHookReader.js'; export { HyperlaneHookDeployer } from './hook/HyperlaneHookDeployer.js'; -export { HookConfigSchema } from './hook/schemas.js'; export { AggregationHookConfig, DomainRoutingHookConfig, FallbackRoutingHookConfig, HookConfig, + HookConfigSchema, HookType, IgpHookConfig, MerkleTreeHookConfig, @@ -150,6 +150,7 @@ export { } from './hook/types.js'; export { DerivedIsmConfig, EvmIsmReader } from './ism/EvmIsmReader.js'; export { HyperlaneIsmFactory } from './ism/HyperlaneIsmFactory.js'; +export { decodeIsmMetadata } from './ism/metadata/decode.js'; export { buildAggregationIsmConfigs, buildMultisigIsmConfigs, @@ -522,8 +523,8 @@ export { AggregationIsmConfigSchema, IsmConfigSchema, MultisigIsmConfigSchema, -} from './ism/schemas.js'; -export { MailboxClientConfigSchema as mailboxClientConfigSchema } from './router/schemas.js'; +} from './ism/types.js'; +export { MailboxClientConfigSchema as mailboxClientConfigSchema } from './router/types.js'; export { CollateralConfig, NativeConfig, diff --git a/typescript/sdk/src/ism/EvmIsmModule.hardhat-test.ts b/typescript/sdk/src/ism/EvmIsmModule.hardhat-test.ts index 00c31fc715..4f815138cc 100644 --- a/typescript/sdk/src/ism/EvmIsmModule.hardhat-test.ts +++ b/typescript/sdk/src/ism/EvmIsmModule.hardhat-test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import assert from 'assert'; import { expect } from 'chai'; import { Signer } from 'ethers'; diff --git a/typescript/sdk/src/ism/EvmIsmModule.ts b/typescript/sdk/src/ism/EvmIsmModule.ts index 2f4e1ee1d8..6cb0593542 100644 --- a/typescript/sdk/src/ism/EvmIsmModule.ts +++ b/typescript/sdk/src/ism/EvmIsmModule.ts @@ -28,10 +28,10 @@ import { normalizeConfig } from '../utils/ism.js'; import { EvmIsmReader } from './EvmIsmReader.js'; import { HyperlaneIsmFactory } from './HyperlaneIsmFactory.js'; -import { IsmConfigSchema } from './schemas.js'; import { DeployedIsm, IsmConfig, + IsmConfigSchema, IsmType, MUTABLE_ISM_TYPE, RoutingIsmConfig, diff --git a/typescript/sdk/src/ism/EvmIsmReader.ts b/typescript/sdk/src/ism/EvmIsmReader.ts index 06493cb450..6257e7a6e2 100644 --- a/typescript/sdk/src/ism/EvmIsmReader.ts +++ b/typescript/sdk/src/ism/EvmIsmReader.ts @@ -158,7 +158,7 @@ export class EvmIsmReader extends HyperlaneReader implements IsmReader { let ismType = IsmType.FALLBACK_ROUTING; try { await ism.mailbox(); - } catch (error) { + } catch { ismType = IsmType.ROUTING; this.logger.debug( 'Error accessing mailbox property, implying this is not a fallback routing ISM.', @@ -248,7 +248,7 @@ export class EvmIsmReader extends HyperlaneReader implements IsmReader { relayer, type: IsmType.TRUSTED_RELAYER, }; - } catch (error) { + } catch { this.logger.debug( 'Error accessing "trustedRelayer" property, implying this is not a Trusted Relayer ISM.', address, @@ -266,7 +266,7 @@ export class EvmIsmReader extends HyperlaneReader implements IsmReader { type: IsmType.PAUSABLE, paused, }; - } catch (error) { + } catch { this.logger.debug( 'Error accessing "paused" property, implying this is not a Pausable ISM.', address, @@ -283,7 +283,7 @@ export class EvmIsmReader extends HyperlaneReader implements IsmReader { origin: address, nativeBridge: '', // no way to extract native bridge from the ism }; - } catch (error) { + } catch { this.logger.debug( 'Error accessing "VERIFIED_MASK_INDEX" property, implying this is not an OP Stack ISM.', address, diff --git a/typescript/sdk/src/ism/HyperlaneIsmFactory.ts b/typescript/sdk/src/ism/HyperlaneIsmFactory.ts index 2835e4a351..246f3d27f6 100644 --- a/typescript/sdk/src/ism/HyperlaneIsmFactory.ts +++ b/typescript/sdk/src/ism/HyperlaneIsmFactory.ts @@ -466,7 +466,7 @@ export class HyperlaneIsmFactory extends HyperlaneApp { .map((log) => { try { return domainRoutingIsmFactory.interface.parseLog(log); - } catch (e) { + } catch { return undefined; } }) diff --git a/typescript/sdk/src/ism/metadata/aggregation.ts b/typescript/sdk/src/ism/metadata/aggregation.ts index 5c347a6007..0f35e7e2cf 100644 --- a/typescript/sdk/src/ism/metadata/aggregation.ts +++ b/typescript/sdk/src/ism/metadata/aggregation.ts @@ -10,12 +10,13 @@ import { import { DerivedIsmConfig } from '../EvmIsmReader.js'; import { AggregationIsmConfig, IsmType } from '../types.js'; +import type { BaseMetadataBuilder } from './builder.js'; +import { decodeIsmMetadata } from './decode.js'; import { - BaseMetadataBuilder, MetadataBuilder, MetadataContext, StructuredMetadata, -} from './builder.js'; +} from './types.js'; // null indicates that metadata is NOT INCLUDED for this submodule // empty or 0x string indicates that metadata is INCLUDED but NULL @@ -137,7 +138,7 @@ export class AggregationMetadataBuilder implements MetadataBuilder { const range = this.metadataRange(metadata, index); if (range.start == 0) return null; if (typeof ism === 'string') return range.encoded; - return BaseMetadataBuilder.decode(range.encoded, { + return decodeIsmMetadata(range.encoded, { ...context, ism: ism as DerivedIsmConfig, }); diff --git a/typescript/sdk/src/ism/metadata/arbL2ToL1.hardhat-test.ts b/typescript/sdk/src/ism/metadata/arbL2ToL1.hardhat-test.ts index f2b66d9cb9..e186da5c9a 100644 --- a/typescript/sdk/src/ism/metadata/arbL2ToL1.hardhat-test.ts +++ b/typescript/sdk/src/ism/metadata/arbL2ToL1.hardhat-test.ts @@ -16,8 +16,12 @@ import { MockArbSys__factory, TestRecipient, } from '@hyperlane-xyz/core'; -import { Address, WithAddress, objMap } from '@hyperlane-xyz/utils'; -import { bytes32ToAddress } from '@hyperlane-xyz/utils'; +import { + Address, + WithAddress, + bytes32ToAddress, + objMap, +} from '@hyperlane-xyz/utils'; import { testChains } from '../../consts/testChains.js'; import { @@ -38,7 +42,7 @@ import { HyperlaneIsmFactory } from '../HyperlaneIsmFactory.js'; import { ArbL2ToL1IsmConfig } from '../types.js'; import { ArbL2ToL1MetadataBuilder } from './arbL2ToL1.js'; -import { MetadataContext } from './builder.js'; +import { MetadataContext } from './types.js'; describe('ArbL2ToL1MetadataBuilder', () => { const origin: ChainName = 'test4'; diff --git a/typescript/sdk/src/ism/metadata/arbL2ToL1.ts b/typescript/sdk/src/ism/metadata/arbL2ToL1.ts index 9b12010eb7..5279f1dafe 100644 --- a/typescript/sdk/src/ism/metadata/arbL2ToL1.ts +++ b/typescript/sdk/src/ism/metadata/arbL2ToL1.ts @@ -20,7 +20,7 @@ import { ArbL2ToL1HookConfig } from '../../hook/types.js'; import { findMatchingLogEvents } from '../../utils/logUtils.js'; import { ArbL2ToL1IsmConfig, IsmType } from '../types.js'; -import { MetadataBuilder, MetadataContext } from './builder.js'; +import type { MetadataBuilder, MetadataContext } from './types.js'; export type NitroChildToParentTransactionEvent = EventArgs; export type ArbL2ToL1Metadata = Omit< diff --git a/typescript/sdk/src/ism/metadata/builder.hardhat-test.ts b/typescript/sdk/src/ism/metadata/builder.hardhat-test.ts index fbda40a5b5..53fc89d3d9 100644 --- a/typescript/sdk/src/ism/metadata/builder.hardhat-test.ts +++ b/typescript/sdk/src/ism/metadata/builder.hardhat-test.ts @@ -39,7 +39,9 @@ import { EvmIsmReader } from '../EvmIsmReader.js'; import { randomIsmConfig } from '../HyperlaneIsmFactory.hardhat-test.js'; import { HyperlaneIsmFactory } from '../HyperlaneIsmFactory.js'; -import { BaseMetadataBuilder, MetadataContext } from './builder.js'; +import { BaseMetadataBuilder } from './builder.js'; +import { decodeIsmMetadata } from './decode.js'; +import { MetadataContext } from './types.js'; const MAX_ISM_DEPTH = 5; const MAX_NUM_VALIDATORS = 10; @@ -198,7 +200,7 @@ describe('BaseMetadataBuilder', () => { }); it(`should decode metadata for random ism config (${i})`, async () => { - BaseMetadataBuilder.decode(metadata, context); + decodeIsmMetadata(metadata, context); }); } }); diff --git a/typescript/sdk/src/ism/metadata/builder.ts b/typescript/sdk/src/ism/metadata/builder.ts index e290f390f7..c316c20dbf 100644 --- a/typescript/sdk/src/ism/metadata/builder.ts +++ b/typescript/sdk/src/ism/metadata/builder.ts @@ -1,53 +1,30 @@ -/* eslint-disable no-case-declarations */ -import { TransactionReceipt } from '@ethersproject/providers'; - -import { WithAddress, assert, rootLogger } from '@hyperlane-xyz/utils'; +import { + WithAddress, + assert, + deepFind, + rootLogger, +} from '@hyperlane-xyz/utils'; -import { deepFind } from '../../../../utils/dist/objects.js'; import { HyperlaneCore } from '../../core/HyperlaneCore.js'; -import { DispatchedMessage } from '../../core/types.js'; -import { DerivedHookConfig } from '../../hook/EvmHookReader.js'; import { ArbL2ToL1HookConfig, HookType, MerkleTreeHookConfig, } from '../../hook/types.js'; import { MultiProvider } from '../../providers/MultiProvider.js'; -import { DerivedIsmConfig } from '../EvmIsmReader.js'; import { IsmType } from '../types.js'; -import { - AggregationMetadata, - AggregationMetadataBuilder, -} from './aggregation.js'; -import { ArbL2ToL1Metadata, ArbL2ToL1MetadataBuilder } from './arbL2ToL1.js'; -import { MultisigMetadata, MultisigMetadataBuilder } from './multisig.js'; -import { NullMetadata, NullMetadataBuilder } from './null.js'; -import { - DefaultFallbackRoutingMetadataBuilder, - RoutingMetadata, -} from './routing.js'; - -export type StructuredMetadata = - | NullMetadata - | MultisigMetadata - | ArbL2ToL1Metadata - | AggregationMetadata - | RoutingMetadata; - -export interface MetadataContext< - IsmContext = DerivedIsmConfig, - HookContext = DerivedHookConfig, -> { - message: DispatchedMessage; - dispatchTx: TransactionReceipt; - ism: IsmContext; - hook: HookContext; -} - -export interface MetadataBuilder { - build(context: MetadataContext): Promise; -} +import { AggregationMetadataBuilder } from './aggregation.js'; +import { ArbL2ToL1MetadataBuilder } from './arbL2ToL1.js'; +import { decodeIsmMetadata } from './decode.js'; +import { MultisigMetadataBuilder } from './multisig.js'; +import { NullMetadataBuilder } from './null.js'; +import { DefaultFallbackRoutingMetadataBuilder } from './routing.js'; +import type { + MetadataBuilder, + MetadataContext, + StructuredMetadata, +} from './types.js'; export class BaseMetadataBuilder implements MetadataBuilder { public nullMetadataBuilder: NullMetadataBuilder; @@ -91,6 +68,7 @@ export class BaseMetadataBuilder implements MetadataBuilder { if (typeof hook === 'string') { throw new Error('Hook context must be an object (for multisig ISM)'); } + // eslint-disable-next-line no-case-declarations const merkleTreeHook = deepFind( hook, (v): v is WithAddress => @@ -137,32 +115,6 @@ export class BaseMetadataBuilder implements MetadataBuilder { metadata: string, context: MetadataContext, ): StructuredMetadata { - const { ism } = context; - switch (ism.type) { - case IsmType.TRUSTED_RELAYER: - return NullMetadataBuilder.decode(ism); - - case IsmType.MERKLE_ROOT_MULTISIG: - case IsmType.MESSAGE_ID_MULTISIG: - return MultisigMetadataBuilder.decode(metadata, ism.type); - - case IsmType.AGGREGATION: - return AggregationMetadataBuilder.decode(metadata, { ...context, ism }); - - case IsmType.ROUTING: - return DefaultFallbackRoutingMetadataBuilder.decode(metadata, { - ...context, - ism, - }); - - case IsmType.ARB_L2_TO_L1: - return ArbL2ToL1MetadataBuilder.decode(metadata, { - ...context, - ism, - }); - - default: - throw new Error(`Unsupported ISM type: ${ism.type}`); - } + return decodeIsmMetadata(metadata, context); } } diff --git a/typescript/sdk/src/ism/metadata/decode.ts b/typescript/sdk/src/ism/metadata/decode.ts new file mode 100644 index 0000000000..cdd4c6194d --- /dev/null +++ b/typescript/sdk/src/ism/metadata/decode.ts @@ -0,0 +1,41 @@ +import { IsmType } from '../types.js'; + +import { AggregationMetadataBuilder } from './aggregation.js'; +import { ArbL2ToL1MetadataBuilder } from './arbL2ToL1.js'; +import { MultisigMetadataBuilder } from './multisig.js'; +import { NullMetadataBuilder } from './null.js'; +import { DefaultFallbackRoutingMetadataBuilder } from './routing.js'; +import { MetadataContext, StructuredMetadata } from './types.js'; + +export function decodeIsmMetadata( + metadata: string, + context: MetadataContext, +): StructuredMetadata { + const { ism } = context; + switch (ism.type) { + case IsmType.TRUSTED_RELAYER: + return NullMetadataBuilder.decode(ism); + + case IsmType.MERKLE_ROOT_MULTISIG: + case IsmType.MESSAGE_ID_MULTISIG: + return MultisigMetadataBuilder.decode(metadata, ism.type); + + case IsmType.AGGREGATION: + return AggregationMetadataBuilder.decode(metadata, { ...context, ism }); + + case IsmType.ROUTING: + return DefaultFallbackRoutingMetadataBuilder.decode(metadata, { + ...context, + ism, + }); + + case IsmType.ARB_L2_TO_L1: + return ArbL2ToL1MetadataBuilder.decode(metadata, { + ...context, + ism, + }); + + default: + throw new Error(`Unsupported ISM type: ${ism.type}`); + } +} diff --git a/typescript/sdk/src/ism/metadata/multisig.ts b/typescript/sdk/src/ism/metadata/multisig.ts index 1de554fa5d..74e50e355b 100644 --- a/typescript/sdk/src/ism/metadata/multisig.ts +++ b/typescript/sdk/src/ism/metadata/multisig.ts @@ -26,7 +26,7 @@ import { MerkleTreeHookConfig } from '../../hook/types.js'; import { ChainName } from '../../types.js'; import { IsmType, MultisigIsmConfig } from '../types.js'; -import { MetadataBuilder, MetadataContext } from './builder.js'; +import type { MetadataBuilder, MetadataContext } from './types.js'; interface MessageIdMultisigMetadata { type: IsmType.MESSAGE_ID_MULTISIG; diff --git a/typescript/sdk/src/ism/metadata/null.ts b/typescript/sdk/src/ism/metadata/null.ts index ed66277ce4..e4be778b73 100644 --- a/typescript/sdk/src/ism/metadata/null.ts +++ b/typescript/sdk/src/ism/metadata/null.ts @@ -3,7 +3,7 @@ import { WithAddress, assert, eqAddress } from '@hyperlane-xyz/utils'; import { MultiProvider } from '../../providers/MultiProvider.js'; import { IsmType, NullIsmConfig } from '../types.js'; -import { MetadataBuilder, MetadataContext } from './builder.js'; +import type { MetadataBuilder, MetadataContext } from './types.js'; export const NULL_METADATA = '0x'; diff --git a/typescript/sdk/src/ism/metadata/routing.ts b/typescript/sdk/src/ism/metadata/routing.ts index 36fd69e605..6a2e2168c4 100644 --- a/typescript/sdk/src/ism/metadata/routing.ts +++ b/typescript/sdk/src/ism/metadata/routing.ts @@ -5,12 +5,13 @@ import { ChainName } from '../../types.js'; import { DerivedIsmConfig, EvmIsmReader } from '../EvmIsmReader.js'; import { IsmType, RoutingIsmConfig } from '../types.js'; -import { - BaseMetadataBuilder, +import type { BaseMetadataBuilder } from './builder.js'; +import { decodeIsmMetadata } from './decode.js'; +import type { MetadataBuilder, MetadataContext, StructuredMetadata, -} from './builder.js'; +} from './types.js'; export type RoutingMetadata = { type: IsmType.ROUTING; @@ -45,7 +46,7 @@ export class RoutingMetadataBuilder implements MetadataBuilder { const originMetadata = typeof ism === 'string' ? metadata - : BaseMetadataBuilder.decode(metadata, { + : decodeIsmMetadata(metadata, { ...context, ism: ism as DerivedIsmConfig, }); diff --git a/typescript/sdk/src/ism/metadata/types.ts b/typescript/sdk/src/ism/metadata/types.ts new file mode 100644 index 0000000000..104ef5757d --- /dev/null +++ b/typescript/sdk/src/ism/metadata/types.ts @@ -0,0 +1,32 @@ +import type { providers } from 'ethers'; + +import type { DispatchedMessage } from '../../core/types.js'; +import type { DerivedHookConfig } from '../../hook/EvmHookReader.js'; +import type { DerivedIsmConfig } from '../EvmIsmReader.js'; + +import type { AggregationMetadata } from './aggregation.js'; +import type { ArbL2ToL1Metadata } from './arbL2ToL1.js'; +import type { MultisigMetadata } from './multisig.js'; +import type { NullMetadata } from './null.js'; +import type { RoutingMetadata } from './routing.js'; + +export type StructuredMetadata = + | NullMetadata + | MultisigMetadata + | ArbL2ToL1Metadata + | AggregationMetadata + | RoutingMetadata; + +export interface MetadataContext< + IsmContext = DerivedIsmConfig, + HookContext = DerivedHookConfig, +> { + message: DispatchedMessage; + dispatchTx: providers.TransactionReceipt; + ism: IsmContext; + hook: HookContext; +} + +export interface MetadataBuilder { + build(context: MetadataContext): Promise; +} diff --git a/typescript/sdk/src/ism/schemas.ts b/typescript/sdk/src/ism/schemas.ts deleted file mode 100644 index e9d2e1cda8..0000000000 --- a/typescript/sdk/src/ism/schemas.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { z } from 'zod'; - -import { ZHash } from '../metadata/customZodTypes.js'; -import { OwnableSchema, PausableSchema } from '../schemas.js'; - -import { AggregationIsmConfig, IsmType, RoutingIsmConfig } from './types.js'; - -const ValidatorInfoSchema = z.object({ - signingAddress: ZHash, - weight: z.number(), -}); - -export const TestIsmConfigSchema = z.object({ - type: z.literal(IsmType.TEST_ISM), -}); - -export const MultisigConfigSchema = z.object({ - validators: z.array(ZHash), - threshold: z.number(), -}); - -export const WeightedMultisigConfigSchema = z.object({ - validators: z.array(ValidatorInfoSchema), - thresholdWeight: z.number(), -}); - -export const TrustedRelayerIsmConfigSchema = z.object({ - type: z.literal(IsmType.TRUSTED_RELAYER), - relayer: z.string(), -}); - -export const OpStackIsmConfigSchema = z.object({ - type: z.literal(IsmType.OP_STACK), - origin: z.string(), - nativeBridge: z.string(), -}); - -export const ArbL2ToL1IsmConfigSchema = z.object({ - type: z.literal(IsmType.ARB_L2_TO_L1), - bridge: z.string(), -}); - -export const PausableIsmConfigSchema = PausableSchema.and( - z.object({ - type: z.literal(IsmType.PAUSABLE), - }), -); - -export const MultisigIsmConfigSchema = MultisigConfigSchema.and( - z.object({ - type: z.union([ - z.literal(IsmType.MERKLE_ROOT_MULTISIG), - z.literal(IsmType.MESSAGE_ID_MULTISIG), - z.literal(IsmType.STORAGE_MERKLE_ROOT_MULTISIG), - z.literal(IsmType.STORAGE_MESSAGE_ID_MULTISIG), - ]), - }), -); - -export const WeightedMultisigIsmConfigSchema = WeightedMultisigConfigSchema.and( - z.object({ - type: z.union([ - z.literal(IsmType.WEIGHTED_MERKLE_ROOT_MULTISIG), - z.literal(IsmType.WEIGHTED_MESSAGE_ID_MULTISIG), - ]), - }), -); - -export const RoutingIsmConfigSchema: z.ZodSchema = z.lazy( - () => - OwnableSchema.extend({ - type: z.union([ - z.literal(IsmType.ROUTING), - z.literal(IsmType.FALLBACK_ROUTING), - ]), - domains: z.record(IsmConfigSchema), - }), -); - -export const AggregationIsmConfigSchema: z.ZodSchema = z - .lazy(() => - z.object({ - type: z.literal(IsmType.AGGREGATION), - modules: z.array(IsmConfigSchema), - threshold: z.number(), - }), - ) - .refine((data) => data.threshold <= data.modules.length, { - message: 'Threshold must be less than or equal to the number of modules', - }); - -export const IsmConfigSchema = z.union([ - ZHash, - TestIsmConfigSchema, - OpStackIsmConfigSchema, - PausableIsmConfigSchema, - TrustedRelayerIsmConfigSchema, - MultisigIsmConfigSchema, - WeightedMultisigIsmConfigSchema, - RoutingIsmConfigSchema, - AggregationIsmConfigSchema, - ArbL2ToL1IsmConfigSchema, -]); diff --git a/typescript/sdk/src/ism/schemas.test.ts b/typescript/sdk/src/ism/types.test.ts similarity index 85% rename from typescript/sdk/src/ism/schemas.test.ts rename to typescript/sdk/src/ism/types.test.ts index 7605382c24..9c57ebf042 100644 --- a/typescript/sdk/src/ism/schemas.test.ts +++ b/typescript/sdk/src/ism/types.test.ts @@ -1,8 +1,7 @@ import { expect } from 'chai'; import { ethers } from 'ethers'; -import { AggregationIsmConfigSchema } from './schemas.js'; -import { IsmType } from './types.js'; +import { AggregationIsmConfigSchema, IsmType } from './types.js'; const SOME_ADDRESS = ethers.Wallet.createRandom().address; describe('AggregationIsmConfigSchema refine', () => { diff --git a/typescript/sdk/src/ism/types.ts b/typescript/sdk/src/ism/types.ts index 82e025a049..c215c346da 100644 --- a/typescript/sdk/src/ism/types.ts +++ b/typescript/sdk/src/ism/types.ts @@ -15,19 +15,10 @@ import { import type { Address, Domain, ValueOf } from '@hyperlane-xyz/utils'; import { OwnableConfig } from '../deploy/types.js'; +import { ZHash } from '../metadata/customZodTypes.js'; +import { OwnableSchema, PausableSchema } from '../schemas.js'; import { ChainMap } from '../types.js'; -import { - ArbL2ToL1IsmConfigSchema, - IsmConfigSchema, - MultisigIsmConfigSchema, - OpStackIsmConfigSchema, - PausableIsmConfigSchema, - TestIsmConfigSchema, - TrustedRelayerIsmConfigSchema, - WeightedMultisigIsmConfigSchema, -} from './schemas.js'; - // this enum should match the IInterchainSecurityModule.sol enum // meant for the relayer export enum ModuleType { @@ -167,3 +158,100 @@ export type RoutingIsmDelta = { owner?: Address; // is the owner different mailbox?: Address; // is the mailbox different (only for fallback routing) }; + +const ValidatorInfoSchema = z.object({ + signingAddress: ZHash, + weight: z.number(), +}); + +export const TestIsmConfigSchema = z.object({ + type: z.literal(IsmType.TEST_ISM), +}); + +export const MultisigConfigSchema = z.object({ + validators: z.array(ZHash), + threshold: z.number(), +}); + +export const WeightedMultisigConfigSchema = z.object({ + validators: z.array(ValidatorInfoSchema), + thresholdWeight: z.number(), +}); + +export const TrustedRelayerIsmConfigSchema = z.object({ + type: z.literal(IsmType.TRUSTED_RELAYER), + relayer: z.string(), +}); + +export const OpStackIsmConfigSchema = z.object({ + type: z.literal(IsmType.OP_STACK), + origin: z.string(), + nativeBridge: z.string(), +}); + +export const ArbL2ToL1IsmConfigSchema = z.object({ + type: z.literal(IsmType.ARB_L2_TO_L1), + bridge: z.string(), +}); + +export const PausableIsmConfigSchema = PausableSchema.and( + z.object({ + type: z.literal(IsmType.PAUSABLE), + }), +); + +export const MultisigIsmConfigSchema = MultisigConfigSchema.and( + z.object({ + type: z.union([ + z.literal(IsmType.MERKLE_ROOT_MULTISIG), + z.literal(IsmType.MESSAGE_ID_MULTISIG), + z.literal(IsmType.STORAGE_MERKLE_ROOT_MULTISIG), + z.literal(IsmType.STORAGE_MESSAGE_ID_MULTISIG), + ]), + }), +); + +export const WeightedMultisigIsmConfigSchema = WeightedMultisigConfigSchema.and( + z.object({ + type: z.union([ + z.literal(IsmType.WEIGHTED_MERKLE_ROOT_MULTISIG), + z.literal(IsmType.WEIGHTED_MESSAGE_ID_MULTISIG), + ]), + }), +); + +export const RoutingIsmConfigSchema: z.ZodSchema = z.lazy( + () => + OwnableSchema.extend({ + type: z.union([ + z.literal(IsmType.ROUTING), + z.literal(IsmType.FALLBACK_ROUTING), + ]), + domains: z.record(IsmConfigSchema), + }), +); + +export const AggregationIsmConfigSchema: z.ZodSchema = z + .lazy(() => + z.object({ + type: z.literal(IsmType.AGGREGATION), + modules: z.array(IsmConfigSchema), + threshold: z.number(), + }), + ) + .refine((data) => data.threshold <= data.modules.length, { + message: 'Threshold must be less than or equal to the number of modules', + }); + +export const IsmConfigSchema = z.union([ + ZHash, + TestIsmConfigSchema, + OpStackIsmConfigSchema, + PausableIsmConfigSchema, + TrustedRelayerIsmConfigSchema, + MultisigIsmConfigSchema, + WeightedMultisigIsmConfigSchema, + RoutingIsmConfigSchema, + AggregationIsmConfigSchema, + ArbL2ToL1IsmConfigSchema, +]); diff --git a/typescript/sdk/src/ism/utils.ts b/typescript/sdk/src/ism/utils.ts index 7c28d757a1..4ad2657981 100644 --- a/typescript/sdk/src/ism/utils.ts +++ b/typescript/sdk/src/ism/utils.ts @@ -270,7 +270,7 @@ export async function moduleMatchesConfig( let mailboxAddress; try { mailboxAddress = await client.mailbox(); - } catch (error) { + } catch { matches = false; break; } diff --git a/typescript/sdk/src/middleware/liquidity-layer/.eslintrc b/typescript/sdk/src/middleware/liquidity-layer/.eslintrc deleted file mode 100644 index e3f712414b..0000000000 --- a/typescript/sdk/src/middleware/liquidity-layer/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "no-console": ["off"] - } -} diff --git a/typescript/sdk/src/middleware/liquidity-layer/LiquidityLayerApp.ts b/typescript/sdk/src/middleware/liquidity-layer/LiquidityLayerApp.ts index 93e324a24d..6e26989348 100644 --- a/typescript/sdk/src/middleware/liquidity-layer/LiquidityLayerApp.ts +++ b/typescript/sdk/src/middleware/liquidity-layer/LiquidityLayerApp.ts @@ -11,6 +11,7 @@ import { addressToBytes32, ensure0x, eqAddress, + rootLogger, strip0x, } from '@hyperlane-xyz/utils'; @@ -23,6 +24,8 @@ import { fetchWithTimeout } from '../../utils/fetch.js'; import { BridgeAdapterConfig } from './LiquidityLayerRouterDeployer.js'; import { liquidityLayerFactories } from './contracts.js'; +const logger = rootLogger.child({ module: 'LiquidityLayerApp' }); + const PORTAL_VAA_SERVICE_TESTNET_BASE_URL = 'https://wormhole-v2-testnet-api.certus.one/v1/signed_vaa/'; const CIRCLE_ATTESTATIONS_TESTNET_BASE_URL = @@ -77,7 +80,7 @@ export class LiquidityLayerApp extends HyperlaneApp< } async fetchCircleMessageTransactions(chain: ChainName): Promise { - console.log(`Fetch circle messages for ${chain}`); + logger.info(`Fetch circle messages for ${chain}`); const url = new URL(this.multiProvider.getExplorerApiUrl(chain)); url.searchParams.set('module', 'logs'); url.searchParams.set('action', 'getLogs'); @@ -140,7 +143,7 @@ export class LiquidityLayerApp extends HyperlaneApp< chain: ChainName, txHash: string, ): Promise { - console.debug(`Parse Circle messages for chain ${chain} ${txHash}`); + logger.debug(`Parse Circle messages for chain ${chain} ${txHash}`); const provider = this.multiProvider.getProvider(chain); const receipt = await provider.getTransactionReceipt(txHash); const matchingLogs = receipt.logs @@ -207,7 +210,7 @@ export class LiquidityLayerApp extends HyperlaneApp< await destinationPortalAdapter.portalTransfersProcessed(transferId); if (!eqAddress(transferTokenAddress, ethers.constants.AddressZero)) { - console.log( + logger.info( `Transfer with nonce ${message.nonce} from ${message.origin} to ${message.destination} already processed`, ); return; @@ -229,11 +232,11 @@ export class LiquidityLayerApp extends HyperlaneApp< ).then((response) => response.json()); if (vaa.code && vaa.code === PORTAL_VAA_SERVICE_SUCCESS_CODE) { - console.log(`VAA not yet found for nonce ${message.nonce}`); + logger.info(`VAA not yet found for nonce ${message.nonce}`); return; } - console.debug( + logger.debug( `Complete portal transfer for nonce ${message.nonce} on ${message.destination}`, ); @@ -246,10 +249,10 @@ export class LiquidityLayerApp extends HyperlaneApp< ); } catch (error: any) { if (error?.error?.reason?.includes('no wrapper for this token')) { - console.log( + logger.info( 'No wrapper for this token, you should register the token at https://wormhole-foundation.github.io/example-token-bridge-ui/#/register', ); - console.log(message); + logger.info(message); return; } throw error; @@ -268,11 +271,11 @@ export class LiquidityLayerApp extends HyperlaneApp< const alreadyProcessed = await transmitter.usedNonces(message.nonceHash); if (alreadyProcessed) { - console.log(`Message sent on ${message.txHash} was already processed`); + logger.info(`Message sent on ${message.txHash} was already processed`); return; } - console.log(`Attempt Circle message delivery`, JSON.stringify(message)); + logger.info(`Attempt Circle message delivery`, JSON.stringify(message)); const messageHash = ethers.utils.keccak256(message.message); const baseurl = this.multiProvider.getChainMetadata(message.chain).isTestnet @@ -282,19 +285,19 @@ export class LiquidityLayerApp extends HyperlaneApp< const attestations = await attestationsB.json(); if (attestations.status !== 'complete') { - console.log( + logger.info( `Attestations not available for message nonce ${message.nonce} on ${message.txHash}`, ); return; } - console.log(`Ready to submit attestations for message ${message.nonce}`); + logger.info(`Ready to submit attestations for message ${message.nonce}`); const tx = await transmitter.receiveMessage( message.message, attestations.attestation, ); - console.log( + logger.info( `Submitted attestations in ${this.multiProvider.tryGetExplorerTxUrl( message.remoteChain, tx, diff --git a/typescript/sdk/src/providers/SmartProvider/SmartProvider.ts b/typescript/sdk/src/providers/SmartProvider/SmartProvider.ts index 58ee3e7ef1..d30f9ddd11 100644 --- a/typescript/sdk/src/providers/SmartProvider/SmartProvider.ts +++ b/typescript/sdk/src/providers/SmartProvider/SmartProvider.ts @@ -1,5 +1,5 @@ import { BigNumber, errors as EthersError, providers, utils } from 'ethers'; -import pino, { Logger } from 'pino'; +import { Logger, pino } from 'pino'; import { raceWithContext, @@ -126,7 +126,7 @@ export class HyperlaneSmartProvider async getPriorityFee(): Promise { try { return BigNumber.from(await this.perform('maxPriorityFeePerGas', {})); - } catch (error) { + } catch { return BigNumber.from('1500000000'); } } diff --git a/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts b/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts index 53d1b44524..61616ff3c0 100644 --- a/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts +++ b/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts @@ -1,7 +1,6 @@ import { Logger } from 'pino'; -import { Annotated, rootLogger } from '@hyperlane-xyz/utils'; -import { ProtocolType } from '@hyperlane-xyz/utils'; +import { Annotated, ProtocolType, rootLogger } from '@hyperlane-xyz/utils'; import { ProtocolTypedReceipt, diff --git a/typescript/sdk/src/router/schemas.ts b/typescript/sdk/src/router/schemas.ts deleted file mode 100644 index 19913aedbb..0000000000 --- a/typescript/sdk/src/router/schemas.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { z } from 'zod'; - -import { HookConfigSchema } from '../hook/schemas.js'; -import { IsmConfigSchema } from '../ism/schemas.js'; -import { ZHash } from '../metadata/customZodTypes.js'; -import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; - -export const MailboxClientConfigSchema = OwnableSchema.extend({ - mailbox: ZHash, - hook: HookConfigSchema.optional(), - interchainSecurityModule: IsmConfigSchema.optional(), -}); - -export const ForeignDeploymentConfigSchema = z.object({ - foreignDeployment: z.string().optional(), -}); - -const RemoteRouterDomain = z.string(); -const RemoteRouterRouter = z.string().startsWith('0x'); -export const RemoteRoutersSchema = z.record( - RemoteRouterDomain, - RemoteRouterRouter, -); - -export const RouterConfigSchema = MailboxClientConfigSchema.merge( - ForeignDeploymentConfigSchema, -).merge( - z.object({ - remoteRouters: RemoteRoutersSchema.optional(), - proxyAdmin: DeployedOwnableSchema.optional(), - }), -); - -const DestinationGasDomain = z.string(); -const DestinationGasAmount = z.string(); // This must be a string type to match Ether's type -export const DestinationGasSchema = z.record( - DestinationGasDomain, - DestinationGasAmount, -); -export const GasRouterConfigSchema = RouterConfigSchema.extend({ - gas: z.number().optional(), - destinationGas: DestinationGasSchema.optional(), -}); diff --git a/typescript/sdk/src/router/types.ts b/typescript/sdk/src/router/types.ts index 17e36ead66..d950e43a30 100644 --- a/typescript/sdk/src/router/types.ts +++ b/typescript/sdk/src/router/types.ts @@ -11,16 +11,12 @@ import { Address, AddressBytes32 } from '@hyperlane-xyz/utils'; import { HyperlaneFactories } from '../contracts/types.js'; import { UpgradeConfig } from '../deploy/proxy.js'; import { CheckerViolation } from '../deploy/types.js'; +import { HookConfigSchema } from '../hook/types.js'; +import { IsmConfigSchema } from '../ism/types.js'; +import { ZHash } from '../metadata/customZodTypes.js'; +import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; import { ChainMap } from '../types.js'; -import { - DestinationGasSchema, - GasRouterConfigSchema, - MailboxClientConfigSchema, - RemoteRoutersSchema, - RouterConfigSchema, -} from './schemas.js'; - export type RouterAddress = { router: Address; }; @@ -68,3 +64,40 @@ export interface RouterViolation extends CheckerViolation { export type RemoteRouters = z.infer; export type DestinationGas = z.infer; + +export const MailboxClientConfigSchema = OwnableSchema.extend({ + mailbox: ZHash, + hook: HookConfigSchema.optional(), + interchainSecurityModule: IsmConfigSchema.optional(), +}); + +export const ForeignDeploymentConfigSchema = z.object({ + foreignDeployment: z.string().optional(), +}); + +const RemoteRouterDomain = z.string(); +const RemoteRouterRouter = z.string().startsWith('0x'); +export const RemoteRoutersSchema = z.record( + RemoteRouterDomain, + RemoteRouterRouter, +); + +export const RouterConfigSchema = MailboxClientConfigSchema.merge( + ForeignDeploymentConfigSchema, +).merge( + z.object({ + remoteRouters: RemoteRoutersSchema.optional(), + proxyAdmin: DeployedOwnableSchema.optional(), + }), +); + +const DestinationGasDomain = z.string(); +const DestinationGasAmount = z.string(); // This must be a string type to match Ether's type +export const DestinationGasSchema = z.record( + DestinationGasDomain, + DestinationGasAmount, +); +export const GasRouterConfigSchema = RouterConfigSchema.extend({ + gas: z.number().optional(), + destinationGas: DestinationGasSchema.optional(), +}); diff --git a/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts b/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts index df2ab1affe..d65f4fad7b 100644 --- a/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts +++ b/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts @@ -124,7 +124,7 @@ export class EvmERC20WarpRouteReader extends HyperlaneReader { const warpRoute = factory.connect(warpRouteAddress, this.provider); await warpRoute[method](); return tokenType as TokenType; - } catch (e) { + } catch { continue; } finally { this.setSmartProviderLogLevel(getLogLevel()); // returns to original level defined by rootLogger diff --git a/typescript/sdk/src/token/adapters/CosmWasmTokenAdapter.test.ts b/typescript/sdk/src/token/adapters/CosmWasmTokenAdapter.test.ts index 1205d123bb..f699780c68 100644 --- a/typescript/sdk/src/token/adapters/CosmWasmTokenAdapter.test.ts +++ b/typescript/sdk/src/token/adapters/CosmWasmTokenAdapter.test.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - /* eslint-disable no-console */ import { CosmWasmClient, diff --git a/typescript/sdk/src/token/checker.ts b/typescript/sdk/src/token/checker.ts index 9dcc0569ba..156658ddc1 100644 --- a/typescript/sdk/src/token/checker.ts +++ b/typescript/sdk/src/token/checker.ts @@ -73,7 +73,7 @@ export class HypERC20Checker extends ProxiedRouterChecker< from: await this.multiProvider.getSignerAddress(chain), value: BigNumber.from(1), }); - } catch (e) { + } catch { const violation: TokenMismatchViolation = { type: 'deployed token not payable', chain, diff --git a/typescript/sdk/src/token/deploy.ts b/typescript/sdk/src/token/deploy.ts index aa7376c883..87f77bc882 100644 --- a/typescript/sdk/src/token/deploy.ts +++ b/typescript/sdk/src/token/deploy.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { constants } from 'ethers'; import { diff --git a/typescript/sdk/src/token/schemas.ts b/typescript/sdk/src/token/schemas.ts index ae9ee15a41..7c975530f1 100644 --- a/typescript/sdk/src/token/schemas.ts +++ b/typescript/sdk/src/token/schemas.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { objMap } from '@hyperlane-xyz/utils'; -import { GasRouterConfigSchema } from '../router/schemas.js'; +import { GasRouterConfigSchema } from '../router/types.js'; import { isCompliant } from '../utils/schemas.js'; import { TokenType } from './config.js'; diff --git a/typescript/sdk/src/utils/.eslintrc b/typescript/sdk/src/utils/.eslintrc deleted file mode 100644 index ba8754a123..0000000000 --- a/typescript/sdk/src/utils/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/explicit-module-boundary-types": ["off"] - } -} diff --git a/typescript/sdk/src/utils/gnosisSafe.js b/typescript/sdk/src/utils/gnosisSafe.js index c5c14fca8d..51235e2121 100644 --- a/typescript/sdk/src/utils/gnosisSafe.js +++ b/typescript/sdk/src/utils/gnosisSafe.js @@ -103,7 +103,7 @@ export async function canProposeSafeTransactions( let safeService; try { safeService = getSafeService(chain, multiProvider); - } catch (e) { + } catch { return false; } const safe = await getSafe(chain, multiProvider, safeAddress); diff --git a/typescript/sdk/src/utils/logUtils.ts b/typescript/sdk/src/utils/logUtils.ts index 5e2eeb3665..b35a8e51ac 100644 --- a/typescript/sdk/src/utils/logUtils.ts +++ b/typescript/sdk/src/utils/logUtils.ts @@ -10,7 +10,7 @@ export function findMatchingLogEvents( .map((log) => { try { return iface.parseLog(log); - } catch (e) { + } catch { return undefined; } }) diff --git a/typescript/sdk/src/utils/sealevelSerialization.ts b/typescript/sdk/src/utils/sealevelSerialization.ts index 13b3dcacd3..8d0907c22d 100644 --- a/typescript/sdk/src/utils/sealevelSerialization.ts +++ b/typescript/sdk/src/utils/sealevelSerialization.ts @@ -10,7 +10,6 @@ export class SealevelAccountDataWrapper { initialized!: boolean; discriminator?: unknown; data!: T; - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types constructor(public readonly fields: any) { Object.assign(this, fields); } diff --git a/typescript/utils/eslint.config.mjs b/typescript/utils/eslint.config.mjs new file mode 100644 index 0000000000..b82e3eedb1 --- /dev/null +++ b/typescript/utils/eslint.config.mjs @@ -0,0 +1,3 @@ +import MonorepoDefaults from '../../eslint.config.mjs'; + +export default [...MonorepoDefaults, { files: ['./src/**/*.ts'] }]; diff --git a/typescript/utils/package.json b/typescript/utils/package.json index bbc326da3f..0a757dd0ea 100644 --- a/typescript/utils/package.json +++ b/typescript/utils/package.json @@ -12,11 +12,18 @@ "yaml": "2.4.5" }, "devDependencies": { + "@eslint/js": "^9.15.0", "@types/lodash-es": "^4.17.12", "@types/mocha": "^10.0.1", "@types/sinon": "^17.0.1", "@types/sinon-chai": "^3.2.12", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", "chai": "4.5.0", + "eslint": "^9.15.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "mocha": "^10.2.0", "prettier": "^2.8.8", "sinon": "^13.0.2", @@ -36,6 +43,7 @@ "build": "tsc", "clean": "rm -rf ./dist", "check": "tsc --noEmit", + "lint": "eslint -c ./eslint.config.mjs", "prettier": "prettier --write ./src", "test": "mocha --config .mocharc.json './src/**/*.test.ts'", "test:ci": "yarn test" diff --git a/typescript/utils/src/addresses.ts b/typescript/utils/src/addresses.ts index 01f9fdb107..29a35b6b88 100644 --- a/typescript/utils/src/addresses.ts +++ b/typescript/utils/src/addresses.ts @@ -80,7 +80,7 @@ export function isValidAddressEvm(address: Address) { try { const isValid = address && ethersUtils.isAddress(address); return !!isValid; - } catch (error) { + } catch { return false; } } @@ -90,7 +90,7 @@ export function isValidAddressSealevel(address: Address) { try { const isValid = address && new PublicKey(address).toBase58(); return !!isValid; - } catch (error) { + } catch { return false; } } @@ -104,7 +104,7 @@ export function isValidAddressCosmos(address: Address) { COSMOS_FACTORY_TOKEN_REGEX.test(address) || fromBech32(address)); return !!isValid; - } catch (error) { + } catch { return false; } } @@ -126,7 +126,7 @@ export function normalizeAddressEvm(address: Address) { if (isZeroishAddress(address)) return address; try { return ethersUtils.getAddress(address); - } catch (error) { + } catch { return address; } } @@ -135,7 +135,7 @@ export function normalizeAddressSealevel(address: Address) { if (isZeroishAddress(address)) return address; try { return new PublicKey(address).toBase58(); - } catch (error) { + } catch { return address; } } @@ -144,7 +144,7 @@ export function normalizeAddressCosmos(address: Address) { if (isZeroishAddress(address)) return address; try { return normalizeBech32(address); - } catch (error) { + } catch { return address; } } diff --git a/typescript/utils/src/amount.ts b/typescript/utils/src/amount.ts index f415c268d3..ab8a3b3347 100644 --- a/typescript/utils/src/amount.ts +++ b/typescript/utils/src/amount.ts @@ -82,7 +82,7 @@ export function tryParseAmount( const parsed = BigNumber(value); if (!parsed || parsed.isNaN() || !parsed.isFinite()) return null; else return parsed; - } catch (error) { + } catch { return null; } } diff --git a/typescript/utils/src/base64.ts b/typescript/utils/src/base64.ts index 1d2ae02fab..d09c4502e2 100644 --- a/typescript/utils/src/base64.ts +++ b/typescript/utils/src/base64.ts @@ -4,7 +4,7 @@ export function toBase64(data: any): string | undefined { try { if (!data) throw new Error('No data to encode'); return btoa(JSON.stringify(data)); - } catch (error) { + } catch { rootLogger.error('Unable to serialize + encode data to base64', data); return undefined; } @@ -15,7 +15,7 @@ export function fromBase64(data: string | string[]): T | undefined { if (!data) throw new Error('No data to decode'); const msg = Array.isArray(data) ? data[0] : data; return JSON.parse(atob(msg)); - } catch (error) { + } catch { rootLogger.error('Unable to decode + deserialize data from base64', data); return undefined; } diff --git a/typescript/utils/src/big-numbers.ts b/typescript/utils/src/big-numbers.ts index fa20e0759d..51e7a31ba9 100644 --- a/typescript/utils/src/big-numbers.ts +++ b/typescript/utils/src/big-numbers.ts @@ -15,7 +15,7 @@ export function isBigNumberish( try { const val = BigNumber(value!); return !val.isNaN() && val.isFinite() && BigNumber.isBigNumber(val); - } catch (error) { + } catch { return false; } } @@ -28,7 +28,7 @@ export function isBigNumberish( export function isZeroish(value: BigNumber.Value): boolean { try { return BigNumber(value).isZero(); - } catch (error) { + } catch { return false; } } diff --git a/typescript/utils/src/env.ts b/typescript/utils/src/env.ts index ff24f2486a..8841f56a80 100644 --- a/typescript/utils/src/env.ts +++ b/typescript/utils/src/env.ts @@ -3,7 +3,7 @@ export function safelyAccessEnvVar(name: string, toLowerCase = false) { try { return toLowerCase ? process.env[name]?.toLowerCase() : process.env[name]; - } catch (error) { + } catch { return undefined; } } diff --git a/typescript/utils/src/index.ts b/typescript/utils/src/index.ts index ff226449fe..e665e9ce84 100644 --- a/typescript/utils/src/index.ts +++ b/typescript/utils/src/index.ts @@ -108,6 +108,7 @@ export { arrayToObject, deepCopy, deepEquals, + deepFind, diffObjMerge, invertKeysAndValues, isObjEmpty, @@ -139,6 +140,7 @@ export { streamToString, toHexString, toTitleCase, + toUpperCamelCase, trimToLength, } from './strings.js'; export { isNullish, isNumeric } from './typeof.js'; diff --git a/typescript/utils/src/strings.ts b/typescript/utils/src/strings.ts index 26d40838aa..bc50107bba 100644 --- a/typescript/utils/src/strings.ts +++ b/typescript/utils/src/strings.ts @@ -6,6 +6,10 @@ export function toTitleCase(str: string) { }); } +export function toUpperCamelCase(string: string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + // Only allows letters and numbers const alphanumericRgex = /[^a-zA-Z0-9]/gi; export function sanitizeString(str: string) { diff --git a/typescript/utils/src/url.ts b/typescript/utils/src/url.ts index 98f9ee412d..0d1c2b0abc 100644 --- a/typescript/utils/src/url.ts +++ b/typescript/utils/src/url.ts @@ -3,7 +3,7 @@ export function isUrl(value?: string | null) { if (!value) return false; const url = new URL(value); return !!url.hostname; - } catch (error) { + } catch { return false; } } @@ -13,7 +13,7 @@ export function isHttpsUrl(value?: string | null) { if (!value) return false; const url = new URL(value); return url.protocol === 'https:'; - } catch (error) { + } catch { return false; } } diff --git a/typescript/widgets/.eslintignore b/typescript/widgets/.eslintignore deleted file mode 100644 index c047b2694b..0000000000 --- a/typescript/widgets/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -dist -coverage -tailwind.config.js -postcss.config.js -src/stories/**/*.stories.tsx diff --git a/typescript/widgets/.eslintrc b/typescript/widgets/.eslintrc deleted file mode 100644 index 9041f842f6..0000000000 --- a/typescript/widgets/.eslintrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": [ - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "prettier" - ], - "plugins": ["react", "react-hooks"], - "rules": { - "react/react-in-jsx-scope": "off", - "react/prop-types": "off", - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn" - }, - "settings": { - "react": { - "version": "18", - "defaultVersion": "18" - } - } -} diff --git a/typescript/widgets/eslint.config.mjs b/typescript/widgets/eslint.config.mjs new file mode 100644 index 0000000000..e9f4b3ff39 --- /dev/null +++ b/typescript/widgets/eslint.config.mjs @@ -0,0 +1,40 @@ +import react from 'eslint-plugin-react'; +import reactHooks from 'eslint-plugin-react-hooks'; + +import MonorepoDefaults, {compat} from '../../eslint.config.mjs'; + +export default [ + ...MonorepoDefaults, + ...compat.extends("plugin:react/recommended", "plugin:react-hooks/recommended"), + { + settings: { + react: { + version: '18', + defaultVersion: '18', + }, + }, + }, + { + files: ['./src/**/*.ts', './src/**/*.tsx'], + plugins: { + react, + 'react-hooks': reactHooks, + }, + + + rules: { + 'react/react-in-jsx-scope': 'off', + 'react/prop-types': 'off', + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + }, + }, + { + ignores: [ + '**/src/stories/*', + 'tailwind.config.js', + 'postcss.config.js', + '.storybook/*', + ], + }, +]; diff --git a/typescript/widgets/mg.eslint.config.mjs b/typescript/widgets/mg.eslint.config.mjs new file mode 100644 index 0000000000..a66e159b3d --- /dev/null +++ b/typescript/widgets/mg.eslint.config.mjs @@ -0,0 +1,38 @@ +import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; +import react from "eslint-plugin-react"; +import reactHooks from "eslint-plugin-react-hooks"; +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 [...fixupConfigRules( + compat.extends("plugin:react/recommended", "plugin:react-hooks/recommended", "prettier"), +), { + plugins: { + react: fixupPluginRules(react), + "react-hooks": fixupPluginRules(reactHooks), + }, + + settings: { + react: { + version: "18", + defaultVersion: "18", + }, + }, + + rules: { + "react/react-in-jsx-scope": "off", + "react/prop-types": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + }, +}]; \ No newline at end of file diff --git a/typescript/widgets/package.json b/typescript/widgets/package.json index 8a4331ef0c..0fb3299037 100644 --- a/typescript/widgets/package.json +++ b/typescript/widgets/package.json @@ -26,6 +26,7 @@ "@cosmjs/cosmwasm-stargate": "^0.32.4", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", + "@eslint/js": "^9.15.0", "@hyperlane-xyz/registry": "6.1.0", "@storybook/addon-essentials": "^7.6.14", "@storybook/addon-interactions": "^7.6.14", @@ -40,14 +41,16 @@ "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", "@types/ws": "^8.5.5", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^8.1.6", + "@typescript-eslint/parser": "^8.1.6", "babel-loader": "^8.3.0", - "eslint": "^8.57.0", + "eslint": "^9.15.0", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-storybook": "^0.6.15", + "eslint-plugin-storybook": "^0.11.1", "framer-motion": "^10.16.4", "postcss": "^8.4.21", "prettier": "^2.8.8", @@ -86,7 +89,7 @@ "build:ts": "tsc", "build:css": "tailwindcss -c ./tailwind.config.cjs -i ./src/styles.css -o ./dist/styles.css --minify", "clean": "rm -rf ./dist ./cache ./storybook-static", - "lint": "eslint ./src --ext '.ts,.tsx'", + "lint": "eslint -c ./eslint.config.mjs", "prettier": "prettier --write ./src", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" diff --git a/typescript/widgets/src/chains/ChainAddMenu.tsx b/typescript/widgets/src/chains/ChainAddMenu.tsx index 9b3c4065c0..032366f01e 100644 --- a/typescript/widgets/src/chains/ChainAddMenu.tsx +++ b/typescript/widgets/src/chains/ChainAddMenu.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useState } from 'react'; import { DEFAULT_GITHUB_REGISTRY } from '@hyperlane-xyz/registry'; diff --git a/typescript/widgets/src/chains/ChainDetailsMenu.tsx b/typescript/widgets/src/chains/ChainDetailsMenu.tsx index 7c175d0d88..468b60a8e4 100644 --- a/typescript/widgets/src/chains/ChainDetailsMenu.tsx +++ b/typescript/widgets/src/chains/ChainDetailsMenu.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { PropsWithChildren, useEffect, useMemo, useState } from 'react'; import { stringify as yamlStringify } from 'yaml'; diff --git a/typescript/widgets/src/chains/ChainSearchMenu.tsx b/typescript/widgets/src/chains/ChainSearchMenu.tsx index 59532e9f6d..a945e4bd93 100644 --- a/typescript/widgets/src/chains/ChainSearchMenu.tsx +++ b/typescript/widgets/src/chains/ChainSearchMenu.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { ChainMap, @@ -77,11 +77,11 @@ export function ChainSearchMenu({ showAddChainMenu, defaultSortField, }: ChainSearchMenuProps) { - const [drilldownChain, setDrilldownChain] = React.useState< - ChainName | undefined - >(showChainDetails); + const [drilldownChain, setDrilldownChain] = useState( + showChainDetails, + ); - const [addChain, setAddChain] = React.useState(showAddChainMenu || false); + const [addChain, setAddChain] = useState(showAddChainMenu || false); const { listData, mergedMetadata } = useMemo(() => { const mergedMetadata = mergeChainMetadataMap( diff --git a/typescript/widgets/src/components/Button.tsx b/typescript/widgets/src/components/Button.tsx index 3177af05b7..e983bd5645 100644 --- a/typescript/widgets/src/components/Button.tsx +++ b/typescript/widgets/src/components/Button.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react'; type Props = PropsWithChildren>; diff --git a/typescript/widgets/src/components/IconButton.tsx b/typescript/widgets/src/components/IconButton.tsx index 314ba40fa4..eeeddc57d7 100644 --- a/typescript/widgets/src/components/IconButton.tsx +++ b/typescript/widgets/src/components/IconButton.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react'; type Props = PropsWithChildren> & { diff --git a/typescript/widgets/src/components/LinkButton.tsx b/typescript/widgets/src/components/LinkButton.tsx index 026bf6ba11..5fb6c53c9c 100644 --- a/typescript/widgets/src/components/LinkButton.tsx +++ b/typescript/widgets/src/components/LinkButton.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react'; type Props = PropsWithChildren>; diff --git a/typescript/widgets/src/components/SearchMenu.tsx b/typescript/widgets/src/components/SearchMenu.tsx index 44c1c2c79f..750d2bfb3d 100644 --- a/typescript/widgets/src/components/SearchMenu.tsx +++ b/typescript/widgets/src/components/SearchMenu.tsx @@ -1,6 +1,7 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ComponentType, + forwardRef, useCallback, useEffect, useMemo, @@ -184,7 +185,7 @@ export function SearchMenu< ); } -const SearchBar = React.forwardRef(function SearchBar( +const SearchBar = forwardRef(function SearchBar( { onChange, value, ...props }: InputProps, ref: React.Ref, ) { diff --git a/typescript/widgets/src/components/TextInput.tsx b/typescript/widgets/src/components/TextInput.tsx index e2dfa8e8e7..42f74f199d 100644 --- a/typescript/widgets/src/components/TextInput.tsx +++ b/typescript/widgets/src/components/TextInput.tsx @@ -1,4 +1,4 @@ -import React, { ChangeEvent, InputHTMLAttributes } from 'react'; +import React, { ChangeEvent, InputHTMLAttributes, forwardRef } from 'react'; export type InputProps = Omit< InputHTMLAttributes, @@ -28,4 +28,4 @@ export function _TextInput( ); } -export const TextInput = React.forwardRef(_TextInput); +export const TextInput = forwardRef(_TextInput); diff --git a/typescript/widgets/src/layout/DropdownMenu.tsx b/typescript/widgets/src/layout/DropdownMenu.tsx index 837a219e76..6dbca2248a 100644 --- a/typescript/widgets/src/layout/DropdownMenu.tsx +++ b/typescript/widgets/src/layout/DropdownMenu.tsx @@ -1,5 +1,5 @@ import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ComponentProps, ReactNode } from 'react'; export type DropdownMenuProps = { diff --git a/typescript/widgets/src/layout/Modal.tsx b/typescript/widgets/src/layout/Modal.tsx index bc0b872f01..12a774bbe7 100644 --- a/typescript/widgets/src/layout/Modal.tsx +++ b/typescript/widgets/src/layout/Modal.tsx @@ -4,7 +4,7 @@ import { DialogPanel, DialogTitle, } from '@headlessui/react'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ComponentProps, PropsWithChildren, useState } from 'react'; import { IconButton } from '../components/IconButton.js'; diff --git a/typescript/widgets/src/layout/Popover.tsx b/typescript/widgets/src/layout/Popover.tsx index 34e7793fb2..f0f1b82292 100644 --- a/typescript/widgets/src/layout/Popover.tsx +++ b/typescript/widgets/src/layout/Popover.tsx @@ -3,7 +3,7 @@ import { PopoverPanel, Popover as _Popover, } from '@headlessui/react'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ComponentProps, ReactNode } from 'react'; export type PopoverProps = { diff --git a/typescript/widgets/src/walletIntegrations/AccountList.tsx b/typescript/widgets/src/walletIntegrations/AccountList.tsx index db99a33a44..63d08baada 100644 --- a/typescript/widgets/src/walletIntegrations/AccountList.tsx +++ b/typescript/widgets/src/walletIntegrations/AccountList.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ButtonHTMLAttributes } from 'react'; import { MultiProtocolProvider } from '@hyperlane-xyz/sdk'; diff --git a/typescript/widgets/src/walletIntegrations/ConnectWalletButton.tsx b/typescript/widgets/src/walletIntegrations/ConnectWalletButton.tsx index 8ecc32f846..1d64e9cf70 100644 --- a/typescript/widgets/src/walletIntegrations/ConnectWalletButton.tsx +++ b/typescript/widgets/src/walletIntegrations/ConnectWalletButton.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ButtonHTMLAttributes } from 'react'; import { MultiProtocolProvider } from '@hyperlane-xyz/sdk'; diff --git a/yarn.lock b/yarn.lock index 1a658284c0..751611cc31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7061,34 +7061,68 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": - version: 4.10.0 - resolution: "@eslint-community/regexpp@npm:4.10.0" - checksum: 10/8c36169c815fc5d726078e8c71a5b592957ee60d08c6470f9ce0187c8046af1a00afbda0a065cc40ff18d5d83f82aed9793c6818f7304a74a7488dc9f3ecbd42 +"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1": + version: 4.12.1 + resolution: "@eslint-community/regexpp@npm:4.12.1" + checksum: 10/c08f1dd7dd18fbb60bdd0d85820656d1374dd898af9be7f82cb00451313402a22d5e30569c150315b4385907cdbca78c22389b2a72ab78883b3173be317620cc languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" +"@eslint/config-array@npm:^0.19.0": + version: 0.19.0 + resolution: "@eslint/config-array@npm:0.19.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.4" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10/16e4ec468ebcb10255ab8c61234c1b3e7ac5506016e432fb489a1c5528cace7a60ddb07515516e7fc166b1dbe6c407d8a6bfbaa2e7531d445d8feb845c989913 + languageName: node + linkType: hard + +"@eslint/core@npm:^0.9.0": + version: 0.9.0 + resolution: "@eslint/core@npm:0.9.0" + checksum: 10/2d11e9c6fac14cfa817c7a9939fd6b79f2120928e4933952d061651db93797e0fcd67c858a14980ac26e90f6e0e49051436aefa4a4b06a26f24e3028366f73d9 + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.2.0": + version: 3.2.0 + resolution: "@eslint/eslintrc@npm:3.2.0" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" ignore: "npm:^5.2.0" import-fresh: "npm:^3.2.1" js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 + checksum: 10/b32dd90ce7da68e89b88cd729db46b27aac79a2e6cb1fa75d25a6b766d586b443bfbf59622489efbd3c6f696f147b51111e81ec7cd23d70f215c5d474cad0261 + languageName: node + linkType: hard + +"@eslint/js@npm:9.15.0, @eslint/js@npm:^9.15.0": + version: 9.15.0 + resolution: "@eslint/js@npm:9.15.0" + checksum: 10/cdea71574a8be164147f426ffa5eca05a9c7fbfbae98387ed0cf772292fc9fb5ded69ce96eac110aaa633f6b7504ec551e1d33f2d6690ae95b11ec395553bae1 + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/object-schema@npm:2.1.4" + checksum: 10/221e8d9f281c605948cd6e030874aacce83fe097f8f9c1964787037bccf08e82b7aa9eff1850a30fffac43f1d76555727ec22a2af479d91e268e89d1e035131e languageName: node linkType: hard -"@eslint/js@npm:8.57.0": - version: 8.57.0 - resolution: "@eslint/js@npm:8.57.0" - checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 +"@eslint/plugin-kit@npm:^0.2.3": + version: 0.2.3 + resolution: "@eslint/plugin-kit@npm:0.2.3" + dependencies: + levn: "npm:^0.4.1" + checksum: 10/0d0653ef840823fd5c0354ef8f1937e7763dbe830173eb6d2d55a19374bf04a06dff0e5214330c10a9425cf38655f632bb0d7d0666249b366e506ae291d82f7e languageName: node linkType: hard @@ -8389,14 +8423,20 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.14": - version: 0.11.14 - resolution: "@humanwhocodes/config-array@npm:0.11.14" +"@humanfs/core@npm:^0.19.1": + version: 0.19.1 + resolution: "@humanfs/core@npm:0.19.1" + checksum: 10/270d936be483ab5921702623bc74ce394bf12abbf57d9145a69e8a0d1c87eb1c768bd2d93af16c5705041e257e6d9cc7529311f63a1349f3678abc776fc28523 + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.6": + version: 0.16.6 + resolution: "@humanfs/node@npm:0.16.6" dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.2" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10/3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a + "@humanfs/core": "npm:^0.19.1" + "@humanwhocodes/retry": "npm:^0.3.0" + checksum: 10/6d43c6727463772d05610aa05c83dab2bfbe78291022ee7a92cb50999910b8c720c76cc312822e2dea2b497aa1b3fef5fe9f68803fc45c9d4ed105874a65e339 languageName: node linkType: hard @@ -8407,10 +8447,17 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.2 - resolution: "@humanwhocodes/object-schema@npm:2.0.2" - checksum: 10/ef915e3e2f34652f3d383b28a9a99cfea476fa991482370889ab14aac8ecd2b38d47cc21932526c6d949da0daf4a4a6bf629d30f41b0caca25e146819cbfa70e +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.1 + resolution: "@humanwhocodes/retry@npm:0.3.1" + checksum: 10/eb457f699529de7f07649679ec9e0353055eebe443c2efe71c6dd950258892475a038e13c6a8c5e13ed1fb538cdd0a8794faa96b24b6ffc4c87fb1fc9f70ad7f + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.4.1": + version: 0.4.1 + resolution: "@humanwhocodes/retry@npm:0.4.1" + checksum: 10/39fafc7319e88f61befebd5e1b4f0136534ea6a9bd10d74366698187bd63544210ec5d79a87ed4d91297f1cc64c4c53d45fb0077a2abfdce212cf0d3862d5f04 languageName: node linkType: hard @@ -8422,6 +8469,7 @@ __metadata: "@jest/globals": "npm:^29.7.0" "@types/node": "npm:^16.9.1" dotenv-flow: "npm:^4.1.0" + eslint: "npm:^9.15.0" ethers: "npm:5.7.2" jest: "npm:^29.7.0" nodemon: "npm:^3.0.3" @@ -8439,6 +8487,7 @@ __metadata: dependencies: "@aws-sdk/client-kms": "npm:^3.577.0" "@aws-sdk/client-s3": "npm:^3.577.0" + "@eslint/js": "npm:^9.15.0" "@ethersproject/abi": "npm:*" "@ethersproject/providers": "npm:*" "@hyperlane-xyz/registry": "npm:6.1.0" @@ -8451,16 +8500,18 @@ __metadata: "@types/mocha": "npm:^10.0.1" "@types/node": "npm:^18.14.5" "@types/yargs": "npm:^17.0.24" - "@typescript-eslint/eslint-plugin": "npm:^7.4.0" - "@typescript-eslint/parser": "npm:^7.4.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" ansi-escapes: "npm:^7.0.0" asn1.js: "npm:^5.4.1" bignumber.js: "npm:^9.1.1" chai: "npm:^4.5.0" chai-as-promised: "npm:^8.0.0" chalk: "npm:^5.3.0" - eslint: "npm:^8.57.0" + eslint: "npm:^9.15.0" eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" ethers: "npm:^5.7.2" latest-version: "npm:^8.0.0" mocha: "npm:^10.2.0" @@ -8539,6 +8590,7 @@ __metadata: version: 0.0.0-use.local resolution: "@hyperlane-xyz/helloworld@workspace:typescript/helloworld" dependencies: + "@eslint/js": "npm:^9.15.0" "@hyperlane-xyz/core": "npm:5.8.1" "@hyperlane-xyz/registry": "npm:6.1.0" "@hyperlane-xyz/sdk": "npm:7.1.0" @@ -8549,11 +8601,13 @@ __metadata: "@typechain/ethers-v5": "npm:^11.1.2" "@typechain/ethers-v6": "npm:^0.5.1" "@typechain/hardhat": "npm:^9.1.0" - "@typescript-eslint/eslint-plugin": "npm:^7.4.0" - "@typescript-eslint/parser": "npm:^7.4.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" chai: "npm:4.5.0" - eslint: "npm:^8.57.0" + eslint: "npm:^9.15.0" eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" ethereum-waffle: "npm:^4.0.10" ethers: "npm:^5.7.2" hardhat: "npm:^2.22.2" @@ -8634,11 +8688,14 @@ __metadata: resolution: "@hyperlane-xyz/monorepo@workspace:." dependencies: "@changesets/cli": "npm:^2.26.2" + "@eslint/js": "npm:^9.15.0" "@trivago/prettier-plugin-sort-imports": "npm:^4.2.1" - "@typescript-eslint/eslint-plugin": "npm:^7.4.0" - "@typescript-eslint/parser": "npm:^7.4.0" - eslint: "npm:^8.57.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" + eslint: "npm:^9.15.0" eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" eslint-plugin-jest: "npm:^28.2.0" husky: "npm:^8.0.0" lint-staged: "npm:^12.4.3" @@ -8666,6 +8723,7 @@ __metadata: "@chain-registry/types": "npm:^0.50.14" "@cosmjs/cosmwasm-stargate": "npm:^0.32.4" "@cosmjs/stargate": "npm:^0.32.4" + "@eslint/js": "npm:^9.15.0" "@hyperlane-xyz/core": "npm:5.8.1" "@hyperlane-xyz/utils": "npm:7.1.0" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" @@ -8680,12 +8738,17 @@ __metadata: "@types/sinon": "npm:^17.0.1" "@types/sinon-chai": "npm:^3.2.12" "@types/ws": "npm:^8.5.5" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" bignumber.js: "npm:^9.1.1" chai: "npm:4.5.0" cosmjs-types: "npm:^0.9.0" cross-fetch: "npm:^3.1.5" dotenv: "npm:^10.0.0" - eslint: "npm:^8.57.0" + eslint: "npm:^9.15.0" + eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" ethereum-waffle: "npm:^4.0.10" ethers: "npm:^5.7.2" hardhat: "npm:^2.22.2" @@ -8710,13 +8773,20 @@ __metadata: resolution: "@hyperlane-xyz/utils@workspace:typescript/utils" dependencies: "@cosmjs/encoding": "npm:^0.32.4" + "@eslint/js": "npm:^9.15.0" "@solana/web3.js": "npm:^1.95.4" "@types/lodash-es": "npm:^4.17.12" "@types/mocha": "npm:^10.0.1" "@types/sinon": "npm:^17.0.1" "@types/sinon-chai": "npm:^3.2.12" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" bignumber.js: "npm:^9.1.1" chai: "npm:4.5.0" + eslint: "npm:^9.15.0" + eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" ethers: "npm:^5.7.2" lodash-es: "npm:^4.17.21" mocha: "npm:^10.2.0" @@ -8737,6 +8807,7 @@ __metadata: "@cosmos-kit/react": "npm:^2.18.0" "@emotion/react": "npm:^11.13.3" "@emotion/styled": "npm:^11.13.0" + "@eslint/js": "npm:^9.15.0" "@headlessui/react": "npm:^2.1.8" "@hyperlane-xyz/registry": "npm:6.1.0" "@hyperlane-xyz/sdk": "npm:7.1.0" @@ -8759,15 +8830,17 @@ __metadata: "@types/react": "npm:^18.0.27" "@types/react-dom": "npm:^18.0.10" "@types/ws": "npm:^8.5.5" - "@typescript-eslint/eslint-plugin": "npm:^7.4.0" - "@typescript-eslint/parser": "npm:^7.4.0" + "@typescript-eslint/eslint-plugin": "npm:^8.1.6" + "@typescript-eslint/parser": "npm:^8.1.6" babel-loader: "npm:^8.3.0" clsx: "npm:^2.1.1" - eslint: "npm:^8.57.0" + eslint: "npm:^9.15.0" eslint-config-prettier: "npm:^9.1.0" + eslint-import-resolver-typescript: "npm:^3.6.3" + eslint-plugin-import: "npm:^2.31.0" eslint-plugin-react: "npm:^7.37.2" eslint-plugin-react-hooks: "npm:^5.0.0" - eslint-plugin-storybook: "npm:^0.6.15" + eslint-plugin-storybook: "npm:^0.11.1" framer-motion: "npm:^10.16.4" postcss: "npm:^8.4.21" prettier: "npm:^2.8.8" @@ -10368,7 +10441,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:^1.2.3": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -10378,6 +10451,13 @@ __metadata: languageName: node linkType: hard +"@nolyfill/is-core-module@npm:1.0.39": + version: 1.0.39 + resolution: "@nolyfill/is-core-module@npm:1.0.39" + checksum: 10/0d6e098b871eca71d875651288e1f0fa770a63478b0b50479c99dc760c64175a56b5b04f58d5581bbcc6b552b8191ab415eada093d8df9597ab3423c8cac1815 + languageName: node + linkType: hard + "@nomicfoundation/edr-darwin-arm64@npm:0.3.3": version: 0.3.3 resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.3.3" @@ -13839,6 +13919,13 @@ __metadata: languageName: node linkType: hard +"@rtsao/scc@npm:^1.1.0": + version: 1.1.0 + resolution: "@rtsao/scc@npm:1.1.0" + checksum: 10/17d04adf404e04c1e61391ed97bca5117d4c2767a76ae3e879390d6dec7b317fcae68afbf9e98badee075d0b64fa60f287729c4942021b4d19cd01db77385c01 + languageName: node + linkType: hard + "@safe-global/api-kit@npm:1.3.0": version: 1.3.0 resolution: "@safe-global/api-kit@npm:1.3.0" @@ -15847,16 +15934,7 @@ __metadata: languageName: node linkType: hard -"@storybook/csf@npm:^0.0.1": - version: 0.0.1 - resolution: "@storybook/csf@npm:0.0.1" - dependencies: - lodash: "npm:^4.17.15" - checksum: 10/f6bb019bccd8abc14e45a85258158b7bd8cc525887ac8dc9151ed8c4908be3b5f5523da8a7a9b96ff11b13b6c1744e1a0e070560d63d836b950f595f9a5719d4 - languageName: node - linkType: hard - -"@storybook/csf@npm:^0.1.2": +"@storybook/csf@npm:^0.1.11, @storybook/csf@npm:^0.1.2": version: 0.1.11 resolution: "@storybook/csf@npm:0.1.11" dependencies: @@ -16605,6 +16683,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.6": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10/9d35d475095199c23e05b431bcdd1f6fec7380612aed068b14b2a08aa70494de8a9026765a5a91b1073f636fb0368f6d8973f518a31391d519e20c59388ed88d + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:^4.17.33": version: 4.19.5 resolution: "@types/express-serve-static-core@npm:4.19.5" @@ -16729,7 +16814,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.5": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 @@ -16743,6 +16828,13 @@ __metadata: languageName: node linkType: hard +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: 10/4e5aed58cabb2bbf6f725da13421aa50a49abb6bc17bfab6c31b8774b073fa7b50d557c61f961a09a85f6056151190f8ac95f13f5b48136ba5841f7d4484ec56 + languageName: node + linkType: hard + "@types/jsonfile@npm:*": version: 6.1.4 resolution: "@types/jsonfile@npm:6.1.4" @@ -17183,7 +17275,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.3.12, @types/semver@npm:^7.3.4": +"@types/semver@npm:^7.3.4": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" checksum: 10/3496808818ddb36deabfe4974fd343a78101fa242c4690044ccdc3b95dcf8785b494f5d628f2f47f38a702f8db9c53c67f47d7818f2be1b79f2efb09692e1178 @@ -17363,56 +17455,44 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.4.0" +"@typescript-eslint/eslint-plugin@npm:^8.1.6": + version: 8.16.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.16.0" dependencies: - "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.4.0" - "@typescript-eslint/type-utils": "npm:7.4.0" - "@typescript-eslint/utils": "npm:7.4.0" - "@typescript-eslint/visitor-keys": "npm:7.4.0" - debug: "npm:^4.3.4" + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/type-utils": "npm:8.16.0" + "@typescript-eslint/utils": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.4" + ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - "@typescript-eslint/parser": ^7.0.0 - eslint: ^8.56.0 + "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/9bd8852c7e4e9608c3fded94f7c60506cc7d2b6d8a8c1cad6d48969a7363751b20282874e55ccdf180635cf204cb10b3e1e5c3d1cff34d4fcd07762be3fc138e + checksum: 10/aa3d551d4f09940eee0c08328cb0db3a2391a8bba6d044f6bb38c51ac864896519c647d4b8fd99f7c094cc677bcf22454b27322014a08b2f2fb25695a43820db languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/parser@npm:7.4.0" +"@typescript-eslint/parser@npm:^8.1.6": + version: 8.16.0 + resolution: "@typescript-eslint/parser@npm:8.16.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.4.0" - "@typescript-eslint/types": "npm:7.4.0" - "@typescript-eslint/typescript-estree": "npm:7.4.0" - "@typescript-eslint/visitor-keys": "npm:7.4.0" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" debug: "npm:^4.3.4" peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/142a9e1187d305ed43b4fef659c36fa4e28359467198c986f0955c70b4067c9799f4c85d9881fbf099c55dfb265e30666e28b3ef290520e242b45ca7cb8e4ca9 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10/e827770baa202223bc0387e2fd24f630690809e460435b7dc9af336c77322290a770d62bd5284260fa881c86074d6a9fd6c97b07382520b115f6786b8ed499da + checksum: 10/ac1e2bfdbfe212da470bb17915b5228f7a6b027332b05eb8bcbbad440a81b2476c649e54e232084838e1edc005e6d7dc7a44899587d73672dd3d5484d9dbf9f8 languageName: node linkType: hard @@ -17426,37 +17506,30 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/scope-manager@npm:7.4.0" +"@typescript-eslint/scope-manager@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/scope-manager@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:7.4.0" - "@typescript-eslint/visitor-keys": "npm:7.4.0" - checksum: 10/8cf9292444f9731017a707cac34bef5ae0eb33b5cd42ed07fcd046e981d97889d9201d48e02f470f2315123f53771435e10b1dc81642af28a11df5352a8e8be2 + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" + checksum: 10/e0aea61f248b39049d4ce21c19f9c8af1a8024f4f92abc8c1d5b79ea65b013c6c4ff41efb92995050036aa95b6a705601917b56809d9ec1fbbab387054aeb269 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/type-utils@npm:7.4.0" +"@typescript-eslint/type-utils@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/type-utils@npm:8.16.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.4.0" - "@typescript-eslint/utils": "npm:7.4.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" + "@typescript-eslint/utils": "npm:8.16.0" debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/a8bd0929d8237679b2b8a7817f070a4b9658ee976882fba8ff37e4a70dd33f87793e1b157771104111fe8054eaa8ad437a010b6aa465072fbdb932647125db2d - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/types@npm:5.62.0" - checksum: 10/24e8443177be84823242d6729d56af2c4b47bfc664dd411a1d730506abf2150d6c31bdefbbc6d97c8f91043e3a50e0c698239dcb145b79bb6b0c34469aaf6c45 + checksum: 10/b91f6cef6af7e4f82a1dba9622d5ec9f46d1983eecfb88a1adbd310c7f980fedf5c8a198bfe968aae59fc386e4c437f55a7533988252eb9cbb0bdac8321e3dba languageName: node linkType: hard @@ -17467,28 +17540,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/types@npm:7.4.0" - checksum: 10/2782c5bf65cd3dfa9cd32bc3023676bbca22144987c3f6c6b67fd96c73d4a60b85a57458c49fd11b9971ac6531824bb3ae0664491e7a6de25d80c523c9be92b7 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e +"@typescript-eslint/types@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/types@npm:8.16.0" + checksum: 10/b37b26cd0e45b0cd6f7d492a07af583e4877d798495ab5fc1cfacb3c561b6d7981e3166f0475bb997e6c6d56ef903e160895174c7e63c08322dbb42d026cf7dc languageName: node linkType: hard @@ -17511,57 +17566,39 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.4.0" +"@typescript-eslint/typescript-estree@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:7.4.0" - "@typescript-eslint/visitor-keys": "npm:7.4.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" debug: "npm:^4.3.4" - globby: "npm:^11.1.0" + fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10/162ec9d7582f45588342e1be36fdb60e41f50bbdfbc3035c91b517ff5d45244f776921c88d88e543e1c7d0f1e6ada5474a8316b78f1b0e6d2233b101bc45b166 + checksum: 10/823cf55d331cf7283547a2860a5d7bfd7dbd497be6e87b226dd7456b36db214de1504855afbbaef8d89932c11a1e589d4cb2a4093b6f1c542a4ce8319d988006 languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/utils@npm:7.4.0" +"@typescript-eslint/utils@npm:8.16.0, @typescript-eslint/utils@npm:^8.8.1": + version: 8.16.0 + resolution: "@typescript-eslint/utils@npm:8.16.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.4.0" - "@typescript-eslint/types": "npm:7.4.0" - "@typescript-eslint/typescript-estree": "npm:7.4.0" - semver: "npm:^7.5.4" - peerDependencies: - eslint: ^8.56.0 - checksum: 10/ffed27e770c486cd000ff892d9049b0afe8b9d6318452a5355b78a37436cbb414bceacae413a2ac813f3e584684825d5e0baa2e6376b7ad6013a108ac91bc19d - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:^5.45.0": - version: 5.62.0 - resolution: "@typescript-eslint/utils@npm:5.62.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@types/json-schema": "npm:^7.0.9" - "@types/semver": "npm:^7.3.12" - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - eslint-scope: "npm:^5.1.1" - semver: "npm:^7.3.7" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/15ef13e43998a082b15f85db979f8d3ceb1f9ce4467b8016c267b1738d5e7cdb12aa90faf4b4e6dd6486c236cf9d33c463200465cf25ff997dbc0f12358550a1 + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/80ba35b97a8e80ac2b54a56ac041b4f4583328d764e1693e7d3750de383cbcefcb7e838b75e550e8aa4df446f4b41460da6dc83543517280a4e3a61546c1a8dc languageName: node linkType: hard @@ -17582,16 +17619,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10/dc613ab7569df9bbe0b2ca677635eb91839dfb2ca2c6fa47870a5da4f160db0b436f7ec0764362e756d4164e9445d49d5eb1ff0b87f4c058946ae9d8c92eb388 - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" @@ -17602,20 +17629,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.4.0": - version: 7.4.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.4.0" +"@typescript-eslint/visitor-keys@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:7.4.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/70dc99f2ad116c6e2d9e55af249e4453e06bba2ceea515adef2d2e86e97e557865bb1b1d467667462443eb0d624baba36f7442fd1082f3874339bbc381c26e93 - languageName: node - linkType: hard - -"@ungap/structured-clone@npm:^1.2.0": - version: 1.2.0 - resolution: "@ungap/structured-clone@npm:1.2.0" - checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 + "@typescript-eslint/types": "npm:8.16.0" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10/e3f231a3e8ca2f7a3dc0e9ebdc3ea1f51a377b1285727413b4c89c44dbfaf342f2574b1b4e7f478f295963045a6058e27b4827816fe2a5a2d09f565eb68522c7 languageName: node linkType: hard @@ -18485,7 +18505,16 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.9.0": +"acorn@npm:^8.14.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 10/6df29c35556782ca9e632db461a7f97947772c6c1d5438a81f0c873a3da3a792487e83e404d1c6c25f70513e91aa18745f6eafb1fcc3a43ecd1920b21dd173d2 + languageName: node + linkType: hard + +"acorn@npm:^8.4.1": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -18998,7 +19027,21 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.1": +"array.prototype.findlastindex@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/7c5c821f357cd53ab6cc305de8086430dd8d7a2485db87b13f843e868055e9582b1fd338f02338f67fc3a1603ceaf9610dd2a470b0b506f9d18934780f95b246 + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -21442,7 +21485,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -21453,6 +21496,17 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^7.0.5": + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/0d52657d7ae36eb130999dffff1168ec348687b48dd38e2ff59992ed916c88d328cf1d07ff4a4a10bc78de5e1c23f04b306d569e42f7a2293915c081e4dfee86 + languageName: node + linkType: hard + "crossws@npm:>=0.2.0 <0.4.0": version: 0.3.1 resolution: "crossws@npm:0.3.1" @@ -21658,7 +21712,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.1.0": +"debug@npm:^3.1.0, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -21667,7 +21721,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:~4.3.1, debug@npm:~4.3.2": +"debug@npm:^4.3.5, debug@npm:~4.3.1, debug@npm:~4.3.2": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -22465,6 +22519,16 @@ __metadata: languageName: node linkType: hard +"enhanced-resolve@npm:^5.15.0": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/e8e03cb7a4bf3c0250a89afbd29e5ec20e90ba5fcd026066232a0754864d7d0a393fa6fc0e5379314a6529165a1834b36731147080714459d98924520410d8f5 + languageName: node + linkType: hard + "enquirer@npm:^2.3.0": version: 2.3.6 resolution: "enquirer@npm:2.3.6" @@ -23354,6 +23418,83 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" + dependencies: + debug: "npm:^3.2.7" + is-core-module: "npm:^2.13.0" + resolve: "npm:^1.22.4" + checksum: 10/d52e08e1d96cf630957272e4f2644dcfb531e49dcfd1edd2e07e43369eb2ec7a7d4423d417beee613201206ff2efa4eb9a582b5825ee28802fc7c71fcd53ca83 + languageName: node + linkType: hard + +"eslint-import-resolver-typescript@npm:^3.6.3": + version: 3.6.3 + resolution: "eslint-import-resolver-typescript@npm:3.6.3" + dependencies: + "@nolyfill/is-core-module": "npm:1.0.39" + debug: "npm:^4.3.5" + enhanced-resolve: "npm:^5.15.0" + eslint-module-utils: "npm:^2.8.1" + fast-glob: "npm:^3.3.2" + get-tsconfig: "npm:^4.7.5" + is-bun-module: "npm:^1.0.2" + is-glob: "npm:^4.0.3" + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + eslint-plugin-import-x: "*" + peerDependenciesMeta: + eslint-plugin-import: + optional: true + eslint-plugin-import-x: + optional: true + checksum: 10/5f9956dbbd0becc3d6c6cb945dad0e5e6f529cfd0f488d5688f3c59840cd7f4a44ab6aee0f54b5c4188134dab9a01cb63c1201767bde7fc330b7c1a14747f8ac + languageName: node + linkType: hard + +"eslint-module-utils@npm:^2.12.0, eslint-module-utils@npm:^2.8.1": + version: 2.12.0 + resolution: "eslint-module-utils@npm:2.12.0" + dependencies: + debug: "npm:^3.2.7" + peerDependenciesMeta: + eslint: + optional: true + checksum: 10/dd27791147eca17366afcb83f47d6825b6ce164abb256681e5de4ec1d7e87d8605641eb869298a0dbc70665e2446dbcc2f40d3e1631a9475dd64dd23d4ca5dee + languageName: node + linkType: hard + +"eslint-plugin-import@npm:^2.31.0": + version: 2.31.0 + resolution: "eslint-plugin-import@npm:2.31.0" + dependencies: + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.8" + array.prototype.findlastindex: "npm:^1.2.5" + array.prototype.flat: "npm:^1.3.2" + array.prototype.flatmap: "npm:^1.3.2" + debug: "npm:^3.2.7" + doctrine: "npm:^2.1.0" + eslint-import-resolver-node: "npm:^0.3.9" + eslint-module-utils: "npm:^2.12.0" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.15.1" + is-glob: "npm:^4.0.3" + minimatch: "npm:^3.1.2" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.0" + semver: "npm:^6.3.1" + string.prototype.trimend: "npm:^1.0.8" + tsconfig-paths: "npm:^3.15.0" + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + checksum: 10/6b76bd009ac2db0615d9019699d18e2a51a86cb8c1d0855a35fb1b418be23b40239e6debdc6e8c92c59f1468ed0ea8d7b85c817117a113d5cc225be8a02ad31c + languageName: node + linkType: hard + "eslint-plugin-jest@npm:^28.2.0": version: 28.2.0 resolution: "eslint-plugin-jest@npm:28.2.0" @@ -23409,37 +23550,26 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-storybook@npm:^0.6.15": - version: 0.6.15 - resolution: "eslint-plugin-storybook@npm:0.6.15" +"eslint-plugin-storybook@npm:^0.11.1": + version: 0.11.1 + resolution: "eslint-plugin-storybook@npm:0.11.1" dependencies: - "@storybook/csf": "npm:^0.0.1" - "@typescript-eslint/utils": "npm:^5.45.0" - requireindex: "npm:^1.1.0" + "@storybook/csf": "npm:^0.1.11" + "@typescript-eslint/utils": "npm:^8.8.1" ts-dedent: "npm:^2.2.0" peerDependencies: eslint: ">=6" - checksum: 10/0c278594c8474ce2f176ffc6610240ae9d6c8f9dafbff02be61e6ae05f15081ce858c5b16e64d8995a3a3777c9d1725953fcde4312efab9118aa544a75b27c46 + checksum: 10/3a8757e403227665566a9ee35a735bf72529a8eb2d6ba270c99e6df140601984b43e7fcf274ebee601fe3d946c76edfeefcce4200077da53edc26212ba5bd03c languageName: node linkType: hard -"eslint-scope@npm:^5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: 10/c541ef384c92eb5c999b7d3443d80195fcafb3da335500946f6db76539b87d5826c8f2e1d23bf6afc3154ba8cd7c8e566f8dc00f1eea25fdf3afc8fb9c87b238 - languageName: node - linkType: hard - -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" +"eslint-scope@npm:^8.2.0": + version: 8.2.0 + resolution: "eslint-scope@npm:8.2.0" dependencies: esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 + checksum: 10/cd9ab60d5a68f3a0fcac04d1cff5a7383d0f331964d5f1c446259123caec5b3ccc542284d07846e4f4d1389da77750821cc9a6e1ce18558c674977351666f9a6 languageName: node linkType: hard @@ -23457,69 +23587,70 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b +"eslint-visitor-keys@npm:^4.2.0": + version: 4.2.0 + resolution: "eslint-visitor-keys@npm:4.2.0" + checksum: 10/9651b3356b01760e586b4c631c5268c0e1a85236e3292bf754f0472f465bf9a856c0ddc261fceace155334118c0151778effafbab981413dbf9288349343fa25 languageName: node linkType: hard -"eslint@npm:^8.57.0": - version: 8.57.0 - resolution: "eslint@npm:8.57.0" +"eslint@npm:^9.15.0": + version: 9.15.0 + resolution: "eslint@npm:9.15.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.0" - "@humanwhocodes/config-array": "npm:^0.11.14" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.19.0" + "@eslint/core": "npm:^0.9.0" + "@eslint/eslintrc": "npm:^3.2.0" + "@eslint/js": "npm:9.15.0" + "@eslint/plugin-kit": "npm:^0.2.3" + "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" + "@humanwhocodes/retry": "npm:^0.4.1" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" + cross-spawn: "npm:^7.0.5" debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" + eslint-scope: "npm:^8.2.0" + eslint-visitor-keys: "npm:^4.2.0" + espree: "npm:^10.3.0" + esquery: "npm:^1.5.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" + file-entry-cache: "npm:^8.0.0" find-up: "npm:^5.0.0" glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" ignore: "npm:^5.2.0" imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" lodash.merge: "npm:^4.6.2" minimatch: "npm:^3.1.2" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true bin: eslint: bin/eslint.js - checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 + checksum: 10/7ac1a2e6070bae64b2b0588fabad528cd3e478a6ba5e9f8185d8d9f2dce17a36630bd019b5d32d1052ea177444ab9c83f3c08baa76121c13e1ed0584ef158956 languageName: node linkType: hard -"espree@npm:^9.6.0, espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" +"espree@npm:^10.0.1, espree@npm:^10.3.0": + version: 10.3.0 + resolution: "espree@npm:10.3.0" dependencies: - acorn: "npm:^8.9.0" + acorn: "npm:^8.14.0" acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10/3412d44d4204c9e29d6b5dd0277400cfa0cd68495dc09eae1b9ce79d0c8985c1c5cc09cb9ba32a1cd963f48a49b0c46bdb7736afe395a300aa6bb1c0d86837e8 languageName: node linkType: hard @@ -23543,12 +23674,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" +"esquery@npm:^1.5.0": + version: 1.6.0 + resolution: "esquery@npm:1.6.0" dependencies: estraverse: "npm:^5.1.0" - checksum: 10/e65fcdfc1e0ff5effbf50fb4f31ea20143ae5df92bb2e4953653d8d40aa4bc148e0d06117a592ce4ea53eeab1dafdfded7ea7e22a5be87e82d73757329a1b01d + checksum: 10/c587fb8ec9ed83f2b1bc97cf2f6854cc30bf784a79d62ba08c6e358bf22280d69aee12827521cf38e69ae9761d23fb7fde593ce315610f85655c139d99b05e5a languageName: node linkType: hard @@ -23568,13 +23699,6 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb - languageName: node - linkType: hard - "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" @@ -24285,7 +24409,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.3.0": +"fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -24396,12 +24520,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b + flat-cache: "npm:^4.0.0" + checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 languageName: node linkType: hard @@ -24557,13 +24681,13 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^3.0.4": - version: 3.0.4 - resolution: "flat-cache@npm:3.0.4" +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" dependencies: - flatted: "npm:^3.1.0" - rimraf: "npm:^3.0.2" - checksum: 10/9fe5d0cb97c988e3b25242e71346965fae22757674db3fca14206850af2efa3ca3b04a3ba0eba8d5e20fd8a3be80a2e14b1c2917e70ffe1acb98a8c3327e4c9f + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc languageName: node linkType: hard @@ -24576,10 +24700,10 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.1.0": - version: 3.2.5 - resolution: "flatted@npm:3.2.5" - checksum: 10/eed01f72ad0317561e4d6187f7408dc391f7849d9cd6700520ce06155d1859539b6899afdfefc815ce51ec48f97d1015350287c541b5302a49581cf25cec1cd2 +"flatted@npm:^3.2.9": + version: 3.3.2 + resolution: "flatted@npm:3.3.2" + checksum: 10/ac3c159742e01d0e860a861164bcfd35bb567ccbebb8a0dd041e61cf3c64a435b917dd1e7ed1c380c2ebca85735fb16644485ec33665bc6aafc3b316aa1eed44 languageName: node linkType: hard @@ -25520,19 +25644,10 @@ __metadata: languageName: node linkType: hard -"globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 - languageName: node - linkType: hard - -"globals@npm:^13.19.0": - version: 13.20.0 - resolution: "globals@npm:13.20.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/9df85cde2f0dce6ac9b3a5e08bec109d2f3b38ddd055a83867e0672c55704866d53ce6a4265859fa630624baadd46f50ca38602a13607ad86be853a8c179d3e7 +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 languageName: node linkType: hard @@ -26528,6 +26643,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^5.3.1": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 + languageName: node + linkType: hard + "immediate@npm:^3.2.3": version: 3.3.0 resolution: "immediate@npm:3.3.0" @@ -26810,6 +26932,15 @@ __metadata: languageName: node linkType: hard +"is-bun-module@npm:^1.0.2": + version: 1.2.1 + resolution: "is-bun-module@npm:1.2.1" + dependencies: + semver: "npm:^7.6.3" + checksum: 10/1c2cbcf1a76991add1b640d2d7fe09848e8697a76f96e1289dff44133a48c97f5dc601d4a66d3f3a86217a77178d72d33d10d0c9e14194e58e70ec8df3eae41a + languageName: node + linkType: hard + "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": version: 1.2.4 resolution: "is-callable@npm:1.2.4" @@ -26855,6 +26986,15 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.15.1": + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/77316d5891d5743854bcef2cd2f24c5458fb69fbc9705c12ca17d54a2017a67d0693bbf1ba8c77af376c0eef6bf6d1b27a4ab08e4db4e69914c3789bdf2ceec5 + languageName: node + linkType: hard + "is-core-module@npm:^2.8.1": version: 2.9.0 resolution: "is-core-module@npm:2.9.0" @@ -27085,7 +27225,7 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": +"is-path-inside@npm:^3.0.2": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 @@ -28267,6 +28407,17 @@ __metadata: languageName: node linkType: hard +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: "npm:^1.2.0" + bin: + json5: lib/cli.js + checksum: 10/a78d812dbbd5642c4f637dd130954acfd231b074965871c3e28a5bbd571f099d623ecf9161f1960c4ddf68e0cc98dee8bebfdb94a71ad4551f85a1afc94b63f6 + languageName: node + linkType: hard + "json5@npm:^2.1.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -28430,7 +28581,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -30836,6 +30987,17 @@ __metadata: languageName: node linkType: hard +"object.groupby@npm:^1.0.3": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + checksum: 10/44cb86dd2c660434be65f7585c54b62f0425b0c96b5c948d2756be253ef06737da7e68d7106e35506ce4a44d16aa85a413d11c5034eb7ce5579ec28752eb42d0 + languageName: node + linkType: hard + "object.values@npm:^1.1.6, object.values@npm:^1.2.0": version: 1.2.0 resolution: "object.values@npm:1.2.0" @@ -33280,13 +33442,6 @@ __metadata: languageName: node linkType: hard -"requireindex@npm:^1.1.0": - version: 1.2.0 - resolution: "requireindex@npm:1.2.0" - checksum: 10/266d1cb31f6cbc4b6cf2e898f5bbc45581f7919bcf61bba5c45d0adb69b722b9ff5a13727be3350cde4520d7cd37f39df45d58a29854baaa4552cd6b05ae4a1a - languageName: node - linkType: hard - "resolve-alpn@npm:^1.2.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" @@ -33367,7 +33522,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.8": +"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.4, resolve@npm:^1.22.8": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -33422,7 +33577,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -34062,7 +34217,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.8, semver@npm:^7.5.0, semver@npm:^7.5.1": +"semver@npm:^7.3.8, semver@npm:^7.5.0, semver@npm:^7.5.1, semver@npm:^7.6.0, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -35694,6 +35849,13 @@ __metadata: languageName: node linkType: hard +"tapable@npm:^2.2.0": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a + languageName: node + linkType: hard + "tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": version: 2.1.1 resolution: "tar-fs@npm:2.1.1" @@ -36089,6 +36251,15 @@ __metadata: languageName: node linkType: hard +"ts-api-utils@npm:^1.3.0": + version: 1.4.1 + resolution: "ts-api-utils@npm:1.4.1" + peerDependencies: + typescript: ">=4.2.0" + checksum: 10/2f32698ed1c06e57d934704ff2579a905895441ef0a29f732242d3d3f651abd5d09610f702c656e85b73457582a1ded43adeef82e9f6d665ae0fb66497cf39f6 + languageName: node + linkType: hard + "ts-command-line-args@npm:^2.2.0": version: 2.3.1 resolution: "ts-command-line-args@npm:2.3.1" @@ -36223,7 +36394,19 @@ __metadata: languageName: node linkType: hard -"tslib@npm:1.14.1, tslib@npm:^1.11.1, tslib@npm:^1.13.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": +"tsconfig-paths@npm:^3.15.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" + dependencies: + "@types/json5": "npm:^0.0.29" + json5: "npm:^1.0.2" + minimist: "npm:^1.2.6" + strip-bom: "npm:^3.0.0" + checksum: 10/2041beaedc6c271fc3bedd12e0da0cc553e65d030d4ff26044b771fac5752d0460944c0b5e680f670c2868c95c664a256cec960ae528888db6ded83524e33a14 + languageName: node + linkType: hard + +"tslib@npm:1.14.1, tslib@npm:^1.11.1, tslib@npm:^1.13.0, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb @@ -36272,17 +36455,6 @@ __metadata: languageName: node linkType: hard -"tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" - dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 10/ea036bec1dd024e309939ffd49fda7a351c0e87a1b8eb049570dd119d447250e2c56e0e6c00554e8205760e7417793fdebff752a46e573fbe07d4f375502a5b2 - languageName: node - linkType: hard - "tsx@npm:^4.19.1": version: 4.19.1 resolution: "tsx@npm:4.19.1"