Skip to content

refactor(CordovaError): drop netflix/nerror dependency#247

Open
dpogue wants to merge 1 commit intoapache:masterfrom
dpogue:cordovaerror
Open

refactor(CordovaError): drop netflix/nerror dependency#247
dpogue wants to merge 1 commit intoapache:masterfrom
dpogue:cordovaerror

Conversation

@dpogue
Copy link
Member

@dpogue dpogue commented Jan 23, 2026

Platforms affected

All

Motivation and Context

The @netflix/nerror package doesn't seem to be actively maintained, and it has lodash as a dependency which is a big source of dependabot security warnings.

Description

Implement our own CordovaError mimicking the (few) relevant parts of VError.

There are technically a few breaking changes here, to be discussed whether this needs to wait for a major or not:

  • I changed the err.cause() method to an err.cause getter
    • This was used in 1 spot in the tests
  • I changed the err.info() method to an err.info getter (unused)
  • I did not implement the err.assignInfo(...) method (unused)
  • Several class-level methods are not implemented because they were not used:
    • assignInfo
    • findCauseByName
    • hasCauseWithName
    • errorFromList
    • errorForEach
    • isVError

Testing

Existing tests pass and added test cases to ensure proper code coverage.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change

@dpogue dpogue requested a review from erisu January 23, 2026 01:50
@dpogue dpogue self-assigned this Jan 23, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.49%. Comparing base (86a9779) to head (0314e5b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #247      +/-   ##
==========================================
+ Coverage   95.40%   95.49%   +0.09%     
==========================================
  Files          20       20              
  Lines        3917     3953      +36     
==========================================
+ Hits         3737     3775      +38     
+ Misses        180      178       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

Code changes LGTM.
Tests passed with minimum supported Node version.

As there are breaking changes, I would suggest including this with next major release.

While these breaking changes won’t affect Cordova (since that functionality wasn't used), others who use this package directly might be affected (depending on how they use it).

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.

3 participants