@backstage/backend-app-api 0.7.3 → 0.7.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage/backend-app-api
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - ce87d0e: Fixed a potential crash when passing an object with a `null` prototype as log meta.
8
+
3
9
  ## 0.7.3
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-app-api",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -863,11 +863,14 @@ const _WinstonLogger = class _WinstonLogger {
863
863
  const replace = (obj) => {
864
864
  var _a;
865
865
  for (const key in obj) {
866
- if (obj.hasOwnProperty(key)) {
866
+ if (Object.hasOwn(obj, key)) {
867
867
  if (typeof obj[key] === "object") {
868
868
  obj[key] = replace(obj[key]);
869
869
  } else if (typeof obj[key] === "string") {
870
- obj[key] = (_a = obj[key]) == null ? void 0 : _a.replace(redactionPattern, "[REDACTED]");
870
+ try {
871
+ obj[key] = (_a = obj[key]) == null ? void 0 : _a.replace(redactionPattern, "[REDACTED]");
872
+ } catch {
873
+ }
871
874
  }
872
875
  }
873
876
  }