New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

balena-errors

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-errors - npm Package Compare versions

Comparing version 4.7.1-deprecation-note-readme-c28a41a63bfd8c0048e2e852f262a66aeeeb76a9 to 4.7.1

2

package.json
{
"name": "balena-errors",
"version": "4.7.1-deprecation-note-readme-c28a41a63bfd8c0048e2e852f262a66aeeeb76a9",
"version": "4.7.1",
"description": "Collection of Balena JavaScript errors",

@@ -5,0 +5,0 @@ "main": "build/errors.js",

@@ -26,11 +26,11 @@ balena-errors

While this module has not been [formally deprecated](https://docs.npmjs.com/cli/deprecate),
we now believe that it is not good practice to add error classes to a separate package like
`balena-errors`. Instead, error classes should be added to the same package that throws the
we now believe that it is not good practice to add error classes to a separate module like
`balena-errors`. Instead, error classes should be added to the same module that throws the
errors. The reason is that downstream applications (like the balena CLI) may end up with
multiple versions of `balena-errors` in the `node_modules` folder, in order to satisfy
dependencies' own dependencies (e.g. a dependency package requires `balena-errors` v4, and
another dependency package requires `balena-errors` v3). When this happens, testing error
classes with `instanceof` fails. For example, an error class like `BalenaExpiredToken`
loaded from `balena-erros` v4 would be considered incompatible (not the same class) as
`BalenaExpiredToken` loaded from `balena-erros` v3. And this leads to bugs.
dependencies' own dependencies (e.g. a dependency module requires `balena-errors` v4, and
another dependency module requires `balena-errors` v3). When this happens, testing error
instances with `instanceof` fails: For example, an error class like `BalenaExpiredToken`
loaded from `balena-errors` v4 would be considered incompatible (not the same class) as
`BalenaExpiredToken` loaded from `balena-errors` v3. And this leads to bugs...

@@ -37,0 +37,0 @@ Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc