Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Nara] polkadot-js/api update #5087

Merged
merged 11 commits into from
Mar 10, 2024

Conversation

mnaamani
Copy link
Contributor

@mnaamani mnaamani commented Mar 1, 2024

Bump polkadot-js/api to version v10.1.4, compatible with nara substrate version v0.9.41 (based on https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-40/2468)

Fixed some code that broke, and patched hydra-typegen to resolve typegen issues in query-node mappings Joystream/hydra#537

closes #4903 #4928

@mnaamani mnaamani force-pushed the nara-polkadot-js-api-update branch from ea0a955 to e8201ca Compare March 1, 2024 08:44
Copy link
Member

@kdembler kdembler left a comment

Choose a reason for hiding this comment

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

I'm getting those resolutions warnings when running yarn:

warning Resolution field "@polkadot/api@10.1.4" is incompatible with requested version "@polkadot/api@^10.7.1"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^4.4"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^3.9.5"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@2.2.2"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^4.4"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^3.9.7"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^3.8.3"
warning Resolution field "typescript@5.0.2" is incompatible with requested version "typescript@^3.0.3"

Not sure where those are coming from, seems all packages are already using typescript@5

joystreamjs/package.json Show resolved Hide resolved
cli/package.json Show resolved Hide resolved
@@ -27,6 +27,7 @@ yarn
ln -s ../../../../../node_modules/typeorm/cli.js ./generated/graphql-server/node_modules/.bin/typeorm

yarn workspace query-node codegen
cp graphql-server-tsconfig.json generated/graphql-server/tsconfig.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should update the hydra package to add the change in the tsconfig.json there

Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

Looks good.

  1. You need to typecast the specVersion in members_MemberInvited mapping too.
  2. After running yarn build the root yarn.lock file was updated with the following entry. Seems like after updating the dependency in @joystream/js, yarn build was not run
"@joystream/metadata-protobuf@^2.14.0":
  version "2.14.0"
  resolved "https://registry.yarnpkg.com/@joystream/metadata-protobuf/-/metadata-protobuf-2.14.0.tgz#83fa0297fb9b6e5e4224500a2c68d7714f273248"
  integrity sha512-1/FgUW6mGt3t+p0k7/KdKnRQPU0HghY4MJTSkip1SCTMICZWoDuSADJuM8nlh2Qdu9kqvodqtndKjz057b0t3g==
  dependencies:
    "@types/iso-3166-2" "^1.0.0"
    "@types/long" "^4.0.1"
    google-protobuf "^3.14.0"
    i18n-iso-countries "^6.8.0"
    iso-3166-2 "^1.0.0"
    iso-639-1 "^2.1.9"
    long "^4.0.0"
    protobufjs "^6.11.2"
"

Also I would say that just keep the same package version for @joystream/metadata-protobuf in all of the dependants, e.g. currently @joystream/js, @joystream/distributor-cli and storage-node all have different version for metadata-protobuf

Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

LGTM.

@mnaamani mnaamani merged commit 9549942 into Joystream:nara Mar 10, 2024
54 checks passed
@mnaamani mnaamani deleted the nara-polkadot-js-api-update branch March 12, 2024 10:36
@mnaamani
Copy link
Contributor Author

warning Resolution field "@polkadot/api@10.1.4" is incompatible with requested version "@polkadot/api@^10.7.1"

@substrate/txwrapper v6.0.1 packages are requesting v10.7.1 ... it wasn't a problem when using yarn, but now It has actually caused a problem after I published the joystream-cli package.. when running the published version / installed globally you see a bunch of warnings..

@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
@polkadot/util has multiple versions, ensure that there is only one installed.

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

Successfully merging this pull request may close these issues.

None yet

3 participants