balena-errors
Advanced tools
Comparing version 4.7.0 to 4.7.1-deprecation-note-readme-c28a41a63bfd8c0048e2e852f262a66aeeeb76a9
@@ -8,5 +8,10 @@ # Change Log | ||
# v4.7.0 | ||
# v4.7.1 | ||
## (2020-10-22) | ||
* Add deprecation note to Readme [Paulo Castro] | ||
# v4.7.0 | ||
## (2020-09-29) | ||
* Add BalenaSettingsPermissionError [josecoelho] | ||
@@ -13,0 +18,0 @@ |
{ | ||
"name": "balena-errors", | ||
"version": "4.7.0", | ||
"version": "4.7.1-deprecation-note-readme-c28a41a63bfd8c0048e2e852f262a66aeeeb76a9", | ||
"description": "Collection of Balena JavaScript errors", | ||
@@ -5,0 +5,0 @@ "main": "build/errors.js", |
@@ -22,2 +22,16 @@ balena-errors | ||
Deprecation - note to developers / contributors | ||
----------------------------------------------- | ||
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 | ||
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. | ||
Installation | ||
@@ -24,0 +38,0 @@ ------------ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
63233
528
1