@nestjs/mongoose
Advanced tools
Comparing version 7.2.1 to 7.2.2
@@ -63,3 +63,3 @@ "use strict"; | ||
static inspectRef(optionsOrType) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
if (!optionsOrType || typeof optionsOrType !== 'object') { | ||
@@ -69,3 +69,12 @@ return; | ||
if (typeof (optionsOrType === null || optionsOrType === void 0 ? void 0 : optionsOrType.ref) === 'function') { | ||
optionsOrType.ref = (_b = (_a = optionsOrType.ref()) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : optionsOrType.ref; | ||
try { | ||
optionsOrType.ref = (_b = (_a = optionsOrType.ref()) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : optionsOrType.ref; | ||
} | ||
catch (err) { | ||
if (err instanceof TypeError) { | ||
const refClassName = (_c = optionsOrType.ref) === null || _c === void 0 ? void 0 : _c.name; | ||
throw new Error(`Unsupported syntax: Class constructor "${refClassName}" cannot be invoked without 'new'. Make sure to wrap your class reference in an arrow function (for example, "ref: () => ${refClassName}").`); | ||
} | ||
throw err; | ||
} | ||
} | ||
@@ -72,0 +81,0 @@ else if (Array.isArray(optionsOrType.type)) { |
{ | ||
"name": "@nestjs/mongoose", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@mongoose)", | ||
@@ -29,6 +29,6 @@ "author": "Kamil Mysliwiec", | ||
"@nestjs/testing": "7.6.5", | ||
"@types/jest": "26.0.19", | ||
"@types/jest": "26.0.20", | ||
"@types/node": "11.15.0", | ||
"@typescript-eslint/eslint-plugin": "4.12.0", | ||
"@typescript-eslint/parser": "4.12.0", | ||
"@typescript-eslint/eslint-plugin": "4.13.0", | ||
"@typescript-eslint/parser": "4.13.0", | ||
"eslint": "7.17.0", | ||
@@ -40,3 +40,3 @@ "eslint-config-prettier": "7.1.0", | ||
"lint-staged": "10.5.3", | ||
"mongoose": "5.11.10", | ||
"mongoose": "5.11.11", | ||
"prettier": "2.2.1", | ||
@@ -43,0 +43,0 @@ "reflect-metadata": "0.1.13", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75304
1329