renovate: ledger deps - #8587
Conversation
🦋 Changeset detectedLatest commit: e01249a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
There was a problem hiding this comment.
Pull request overview
Updates hardhat-ledger’s Ledger dependency set to support @ledgerhq/hw-app-eth v7, along with the associated lockfile and release metadata changes.
Changes:
- Bump
@ledgerhq/hw-app-ethto^7.0.0and@ledgerhq/hw-transportto^6.35.7inhardhat-ledger. - Refresh
pnpm-lock.yamlto reflect the new Ledger dependency graph. - Add a changeset publishing
@nomicfoundation/hardhat-ledgeras a minor release.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pnpm-lock.yaml |
Updates the resolved dependency graph for the workspace after the Ledger package upgrades. |
packages/hardhat-ledger/package.json |
Bumps the Ledger dependencies used by the hardhat-ledger package. |
.changeset/update-hardhat-ledger-hw-app-eth.md |
Declares a minor release for @nomicfoundation/hardhat-ledger due to the dependency major upgrade. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "dependencies": { | ||
| "@ledgerhq/errors": "^6.25.0", | ||
| "@ledgerhq/evm-tools": "^1.7.7", | ||
| "@ledgerhq/hw-app-eth": "^6.45.19", | ||
| "@ledgerhq/hw-transport": "^6.31.11", | ||
| "@ledgerhq/hw-app-eth": "^7.0.0", | ||
| "@ledgerhq/hw-transport": "^6.35.7", | ||
| "@ledgerhq/hw-transport-node-hid": "^6.29.12", | ||
| "@ledgerhq/types-live": "^6.85.0", |
d6b8279 to
83356a2
Compare
| // Shared properties | ||
| to: hardhatAddress, | ||
| value: 10000000n, | ||
| gas: 310000n, |
There was a problem hiding this comment.
This was an old bug. You should be able to use the script cleanly now.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
.changeset/update-hardhat-ledger-hw-app-eth.md:5
- This changeset mentions only
@ledgerhq/hw-app-eth, but the PR also bumps@ledgerhq/hw-transport. It’s worth including that in the release note so consumers understand the full dependency upgrade.
Update the `@ledgerhq/hw-app-eth` dependency to its latest major version.
packages/hardhat-ledger/package.json:65
@ledgerhq/hw-transport@^6.35.7pulls in@ledgerhq/errors@7(see pnpm-lock.yaml snapshots), but this package still pins@ledgerhq/errors@^6.25.0. Sincesrc/internal/handler.tsrelies oninstanceofchecks against these error classes, having multiple major versions can make those checks fail and break retry/diagnostic logic. Consider aligning@ledgerhq/errors(and ideally the other Ledger deps) to the same major used by the transport/app packages, or switching the code to a version-agnostic check (e.g. byname/properties) if deduping isn’t possible.
"@ledgerhq/errors": "^6.25.0",
"@ledgerhq/evm-tools": "^1.7.7",
"@ledgerhq/hw-app-eth": "^7.0.0",
"@ledgerhq/hw-transport": "^6.35.7",
"@ledgerhq/hw-transport-node-hid": "^6.29.12",
| // Shared properties | ||
| to: hardhatAddress, | ||
| value: 10000000n, | ||
| gas: 310000n, | ||
| gasLimit: 310000n, | ||
|
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
packages/hardhat-ledger/package.json:64
@ledgerhq/hw-transport@6.35.7brings in@ledgerhq/errors@7, but this package still pins@ledgerhq/errors@^6.25.0. Since the handler relies oninstanceofchecks against Ledger error classes (e.g.DisconnectedDevice,TransportStatusError), having two different@ledgerhq/errorscopies will cause those checks to fail when the thrown error comes from v7, breaking the retry/diagnostic logic. Align the direct dependency to v7 (and regenerate the lockfile) so all Ledger packages share the same error class instances.
"@ledgerhq/errors": "^6.25.0",
"@ledgerhq/evm-tools": "^1.7.7",
"@ledgerhq/hw-app-eth": "^7.0.0",
"@ledgerhq/hw-transport": "^6.35.7",
packages/example-project/scripts/ledger.ts:38
- The PR description says this is “a manifest and lockfile change” with “no source changes”, but this PR also changes
packages/example-project/scripts/ledger.ts(renaminggastogasLimit). Consider updating the PR description to reflect the additional source change so reviewers know to include it in verification/testing.
// Shared properties
to: hardhatAddress,
value: 10000000n,
gasLimit: 310000n,
This is a pure dependency bump. No code changes were required. `hw-transport` is bumped to match hw-app-eth's used version.
The script was using `gas` rather than `gasLimit`, this mistake was hidden until a recent change.
83356a2 to
e01249a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (3)
packages/hardhat-ledger/package.json:64
@ledgerhq/hw-transport@6.35.7pulls in@ledgerhq/errors@7.0.0(see pnpm-lock), but this package still pins@ledgerhq/errorsto^6.25.0. SinceLedgerHandlerdoes multipleerror instanceof TransportError/TransportStatusError/...checks, having two@ledgerhq/errorscopies will make those checks unreliable and can break retry / error classification at runtime. Align@ledgerhq/errors(and the directly used Ledger libs) with the versions used by the upgraded transport/app packages to ensure a single error class identity.
"@ledgerhq/errors": "^6.25.0",
"@ledgerhq/evm-tools": "^1.7.7",
"@ledgerhq/hw-app-eth": "^7.0.0",
"@ledgerhq/hw-transport": "^6.35.7",
packages/example-project/scripts/ledger.ts:37
- PR description says there are no source changes beyond manifest/lockfile updates, but this PR also changes the example script transaction params (
gas->gasLimit). Please update the PR description (or the change) so the stated scope matches the diff.
// Shared properties
to: hardhatAddress,
value: 10000000n,
gasLimit: 310000n,
packages/hardhat-ledger/package.json:66
- This package still pins
@ledgerhq/types-liveto^6.85.0, but the upgraded Ledger dependency chain now brings in@ledgerhq/types-live@6.120.0as well (see pnpm-lock), increasing duplication and the chance of mismatched exported types across the Ledger stack. Consider aligning to the newer version used transitively.
"@ledgerhq/hw-transport-node-hid": "^6.29.12",
"@ledgerhq/types-live": "^6.85.0",
This updates
@ledgerhq/hw-app-ethto version 7 inhardhat-ledger. There are no source changes —every method the handler drives is unchanged in 7 — so this is a manifest and lockfile change.
It also shifts
@ledgerhq/hw-transportto^6.35.7, to avoid a duplicate install version 7 would otherwise leave behind.Manual testing
This needs a check with an actual ledger:
packages/example-project/scripts/ledger.tsdrives all four signing paths against a forked Optimismnode. With a Ledger connected and the Ethereum app open:
ledgerAccountson theedrOpnetwork inpackages/example-project/hardhat.config.tsethSendTransaction()and leaves the other three commented out, souncomment one at a time and re-run.