metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

fix(deps): update from `eth-rpc-errors` to `@metamask/rpc-errors`

Open legobeat opened this issue 1 year ago • 5 comments

Description

The package eth-rpc-errors has been renamed to @metamask/rpc-errors starting with version 5. Many controllers and libraries used in extension already use the releases. This updates the direct dependency from [email protected] to @metamask/[email protected].

Related issues

  • #22861
  • #22863

Blocking

  • #22875

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • [x] I’ve followed MetaMask Coding Standards.
  • [x] I've clearly explained what problem this PR is solving and how it is solved.
  • [x] I've linked related issues
  • [ ] I've included manual testing steps
  • [x] I've included screenshots/recordings if applicable
  • [x] I’ve included tests if applicable
  • [x] I’ve documented my code using JSDoc format if applicable
  • [x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • [x] I’ve properly set the pull request status:
    • [x] In case it's not yet "ready for review", I've set it to "draft".
    • [x] In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

legobeat avatar Feb 08 '24 10:02 legobeat

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] avatar Feb 08 '24 10:02 github-actions[bot]

🎉

FrederikBolding avatar Feb 08 '24 10:02 FrederikBolding

Code LGTM, but looks to be some problems in CI.

Addressed in c81c5033101e32f68b011d9ab91db76db39eff5d by updating tests to expect underlying error message in cause.

legobeat avatar Feb 08 '24 11:02 legobeat

This error in test-e2e-chrome-mv3 seems persistent:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="80.008" tests="1" failures="1">
  <testsuite name="Root Suite" timestamp="2024-05-06T10:30:39" tests="0" time="0.000" failures="0">
  </testsuite>
  <testsuite name="Test Snap Get File" timestamp="2024-05-06T10:30:39" tests="1" file="/home/circleci/project/test/e2e/snaps/test-snap-get-file.spec.js" time="80.007" failures="1">
    <testcase name="Test Snap Get File test snap_getFile functionality" time="80.003" classname="test snap_getFile functionality">
      <failure message="Timeout of 80000ms exceeded. For async tests and hooks, ensure &quot;done()&quot; is called; if returning a Promise, ensure it resolves. (/home/circleci/project/test/e2e/snaps/test-snap-get-file.spec.js)" type="Error"><![CDATA[Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/project/test/e2e/snaps/test-snap-get-file.spec.js)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)]]></failure>
    </testcase>
  </testsuite>
</testsuites>

~EDIT: Or just flakey test. Passed after retry~

legobeat avatar May 06 '24 10:05 legobeat

Codecov Report

Attention: Patch coverage is 36.92308% with 41 lines in your changes are missing coverage. Please review.

Project coverage is 67.39%. Comparing base (527f12c) to head (f73dbcc).

:exclamation: Current head f73dbcc differs from pull request most recent head 6ae2235. Consider uploading reports for the commit 6ae2235 to get more accurate results

Files Patch % Lines
ui/store/actions.ts 36.84% 12 Missing :warning:
ui/store/institutional/institution-background.ts 0.00% 6 Missing :warning:
...c-method-middleware/handlers/add-ethereum-chain.js 0.00% 4 Missing :warning:
ui/ducks/send/helpers.js 0.00% 4 Missing :warning:
...onents/multichain/import-account/import-account.js 0.00% 3 Missing :warning:
ui/ducks/send/send.js 0.00% 3 Missing :warning:
ui/pages/error/error.component.js 0.00% 2 Missing :warning:
app/scripts/lib/createMetaRPCHandler.js 0.00% 1 Missing :warning:
...rpc-method-middleware/handlers/request-accounts.js 0.00% 1 Missing :warning:
...ib/rpc-method-middleware/handlers/send-metadata.js 0.00% 1 Missing :warning:
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22871      +/-   ##
===========================================
+ Coverage    67.37%   67.39%   +0.03%     
===========================================
  Files         1289     1289              
  Lines        50213    50273      +60     
  Branches     13005    13051      +46     
===========================================
+ Hits         33827    33881      +54     
- Misses       16386    16392       +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 06 '24 23:05 codecov[bot]

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

github-actions[bot] avatar Sep 02 '24 10:09 github-actions[bot]

This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.

github-actions[bot] avatar Sep 16 '24 10:09 github-actions[bot]