@nestjs/common 9.3.1 → 9.3.2

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/constants.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare const ENHANCER_KEY_TO_SUBTYPE_MAP: {
31
31
  readonly __pipes__: "pipe";
32
32
  readonly __exceptionFilters__: "filter";
33
33
  };
34
- export type EnhancerSubtype = typeof ENHANCER_KEY_TO_SUBTYPE_MAP[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
34
+ export type EnhancerSubtype = (typeof ENHANCER_KEY_TO_SUBTYPE_MAP)[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
35
35
  export declare const RENDER_METADATA = "__renderTemplate__";
36
36
  export declare const HTTP_CODE_METADATA = "__httpCode__";
37
37
  export declare const MODULE_PATH = "__module_path__";
@@ -85,8 +85,8 @@ class HttpException extends Error {
85
85
  this.message = this.response.message;
86
86
  }
87
87
  else if (this.constructor) {
88
- this.message = (_b = (_a = this.constructor.name
89
- .match(/[A-Z][a-z]+|[0-9]+/g)) === null || _a === void 0 ? void 0 : _a.join(' ')) !== null && _b !== void 0 ? _b : 'Error';
88
+ this.message =
89
+ (_b = (_a = this.constructor.name.match(/[A-Z][a-z]+|[0-9]+/g)) === null || _a === void 0 ? void 0 : _a.join(' ')) !== null && _b !== void 0 ? _b : 'Error';
90
90
  }
91
91
  }
92
92
  initName() {
package/index.js CHANGED
@@ -4,7 +4,7 @@ exports.VERSION_NEUTRAL = exports.Scope = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /*
6
6
  * Nest @common
7
- * Copyright(c) 2017 - 2022 Kamil Mysliwiec
7
+ * Copyright(c) 2017 - 2023 Kamil Mysliwiec
8
8
  * https://nestjs.com
9
9
  * MIT Licensed
10
10
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "9.3.1",
3
+ "version": "9.3.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -18,7 +18,7 @@
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "iterare": "1.2.1",
21
- "tslib": "2.4.1",
21
+ "tslib": "2.5.0",
22
22
  "uid": "2.0.1"
23
23
  },
24
24
  "peerDependencies": {
@@ -21,8 +21,9 @@ let ValidationPipe = class ValidationPipe {
21
21
  constructor(options) {
22
22
  options = options || {};
23
23
  const { transform, disableErrorMessages, errorHttpStatusCode, expectedType, transformOptions, validateCustomDecorators } = options, validatorOptions = tslib_1.__rest(options, ["transform", "disableErrorMessages", "errorHttpStatusCode", "expectedType", "transformOptions", "validateCustomDecorators"]);
24
+ // @see https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508
25
+ this.validatorOptions = Object.assign({ forbidUnknownValues: false }, validatorOptions);
24
26
  this.isTransformEnabled = !!transform;
25
- this.validatorOptions = validatorOptions;
26
27
  this.transformOptions = transformOptions;
27
28
  this.isDetailedOutputDisabled = disableErrorMessages;
28
29
  this.validateCustomDecorators = validateCustomDecorators || false;