chore(deps): update substrate dev package & types #1500
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updated substrate/dev package to the latest version, v0.8.0, which introduces some ❗breaking changes❗:
typescript-eslint
dependency now requiresNode.js
engine in versions ^18.18.0 || >=20.0.0suppressImplicitAnyIndexErrors
after Typescript 5.5 is disabled🧑💻 Code Updates 🧑💻
By removing the option
suppressImplicitAnyIndexErrors
from thetsconfig
files, the types in multiple parts of the code had to be updated. The changes introduced are based on the following logic/tests:consoleOverride.ts
AccountsAssetsService.ts
PalletAssetsAssetBalance
hereAccountsPoolAssetsService
(similar toPalletPoolAssetsAssetBalance
type)AccountsStakingPayoutsService.ts
Updated
prefs
type to(ValidatorPrefs,Linkage<AccountId>)
since this is the return type when tested it in Kusama with endpointNodeTransactionPoolService.ts
Tested in Polkadot with endpoint
PalletsDispatchablesService.ts
Tested with endpoint
in which
dispatchableItemMetadata
returns['claim', f]
PalletsErrorsService.ts
Tested with endpoint
in which
errorItemMetadata
returns['ChangePending', {is: ƒ, meta: Type(5)}]
and thiserrorItemMetadata[1].meta
returnsErrorMetadataLatest
type/interfacePalletsEventsService.ts
Tested with endpoint
in which
eventItemMetadata
returns['CuratorUnassigned', {is: ƒ, meta: Type(5)}]
PalletsForeignAssetsService.ts
Tested with endpoint
in which
foreignAssetData
returns[{parents: '1', interior: {…}}]
*** The rest of the changes are mostly from the linter.
Now when running
yarn lint --fix
we get this warning :but the linter runs correctly ✅
This is because I have not updated
@typescript-eslint
packages to the latest versions (but updated Typescript) since this introduces more breaking changes. They will be updated in the nextsubstrate/dev
release.❗Changelog❗
In the next release of Sidecar :
suppressImplicitAnyIndexErrors
does not need to be mentioned since the code was updated accordingly and this should not affect the API users.Tests
yarn test
yarn test:latest-e2e-tests
yarn test:historical-e2e-tests