@tryghost/errors 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/errors.js +5 -3
  2. package/package.json +2 -2
package/lib/errors.js CHANGED
@@ -294,8 +294,10 @@ const ghostErrors = {
294
294
  };
295
295
 
296
296
  module.exports = ghostErrors;
297
+
298
+ const ghostErrorsWithBase = Object.assign({}, ghostErrors, {GhostError});
297
299
  module.exports.utils = {
298
- serialize: utils.serialize.bind(ghostErrors),
299
- deserialize: utils.deserialize.bind(ghostErrors),
300
- isGhostError: utils.isGhostError.bind(ghostErrors)
300
+ serialize: utils.serialize.bind(ghostErrorsWithBase),
301
+ deserialize: utils.deserialize.bind(ghostErrorsWithBase),
302
+ isGhostError: utils.isGhostError.bind(ghostErrorsWithBase)
301
303
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/errors",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "repository": "https://github.com/TryGhost/Utils/tree/main/packages/errors",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -27,5 +27,5 @@
27
27
  "dependencies": {
28
28
  "lodash": "^4.17.21"
29
29
  },
30
- "gitHead": "9cce0db03f9229f7829ad2d0119b4916ca44fc78"
30
+ "gitHead": "cef9c2f09117b0966380653a9c2be7aa409a9f86"
31
31
  }