@nestjs/common 9.3.4 → 9.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "9.3.4",
3
+ "version": "9.3.6",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -83,7 +83,10 @@ let ValidationPipe = class ValidationPipe {
83
83
  // if the value was originally undefined or null, revert it back
84
84
  return originalValue;
85
85
  }
86
- return Object.keys(this.validatorOptions).length > 0
86
+ // we check if the number of keys of the "validatorOptions" is higher than 1 (instead of 0)
87
+ // because the "forbidUnknownValues" now fallbacks to "false" (in case it wasn't explicitly specified)
88
+ const shouldTransformToPlain = Object.keys(this.validatorOptions).length > 1;
89
+ return shouldTransformToPlain
87
90
  ? classTransformer.classToPlain(entity, this.transformOptions)
88
91
  : value;
89
92
  }
@@ -182,7 +182,8 @@ let ConsoleLogger = ConsoleLogger_1 = class ConsoleLogger {
182
182
  }
183
183
  const lastElement = messages[messages.length - 1];
184
184
  const isStack = (0, shared_utils_1.isString)(lastElement);
185
- if (!isStack) {
185
+ // https://github.com/nestjs/nest/issues/11074#issuecomment-1421680060
186
+ if (!isStack && !(0, shared_utils_1.isUndefined)(lastElement)) {
186
187
  return { messages, context };
187
188
  }
188
189
  return {