-
Notifications
You must be signed in to change notification settings - Fork 295
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
[DDW-1211] Update @trezor/connect to v9.0.8 #3127
[DDW-1211] Update @trezor/connect to v9.0.8 #3127
Conversation
…ate-trezor-connect-to-v9.0.8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Tomo, well done. Please take a look at one comment around the usage of @trezor/transport
:)
import { | ||
CardanoAddressType, | ||
CardanoCVoteRegistrationFormat, | ||
} from '@trezor/transport/lib/types/messages'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question - could we import from the root of the library instead?
import { | |
CardanoAddressType, | |
CardanoCVoteRegistrationFormat, | |
} from '@trezor/transport/lib/types/messages'; | |
import { Messages } from '@trezor/transport'; |
Then we could refer to the types as follows:
Messages.CardanoAddressType
Messages.CardanoCVoteRegistrationFormat
If we import from library internals that is not considered the public API, our code can break much easier even with minor/patch updates.
Second question, @trezor/transport
is not listed in our package.json
. It seems like a dependency of dependency. Should we add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I totally agree with you. Done in 0d150c9
- I think we don't need to list it since it is
@trezor/connect
subdependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DominikGuzei what do you think about question / point 2 ? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was that dependencies of dependencies are not part of public API and could also change without notice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then the types will be changed in the main / parent dependency since it is used there as well, and we will see that, right? I mean, I don't want to add one more lib if that is not necessary, and if we already have access to it. Also, I agree that is safer to list it and to use it directly. Now we should see what are pros and cons since we are using only types from it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I just executed yarn add @trezor/transport@^1.1.4
on the branch, which added an appropriate entry to package.json
but made no changes to yarn.lock
. So I think it doesn't have any impact/side effect besides making it clear in package.json
that it is our direct dependency. If I use yarn add @trezor/transport@1.1.4
instead (without ^
- which is our preferred way of adding dependencies to Daedalus), it adds one minor entry to yarn.lock
which should not affect anything either.
It's a really minor thing though and I'll let Dominik speak now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oke then, if there is nothing added in node_modules and if it is just linked to an existing submodule, let's list it since that is a safer way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but yeah, let's hear from @DominikGuzei before the final decision :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we are using it directly in our code (importing) then it's better to list it explicitly 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcin-mazurek @DominikGuzei done in f9fbdb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on Windows and macOS. We need an additional QA review (in Linux, if possible)
@input-output-hk/daedalus-qa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tested on Linux. Great job @tomislavhoracek 👍
…ate-trezor-connect-to-v9.0.8
This PR introduces @trezor/connect library update to version 9.0.8. In the scope of this PR, we also applied Trezor voting breaking changes.
Todos
Testing Checklist
Review Checklist
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrun Chromatic
label to PR to trigger the run)release-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review