@nestjs/testing
Advanced tools
Comparing version 4.2.2 to 4.3.0
{ | ||
"name": "@nestjs/testing", | ||
"version": "4.2.2", | ||
"version": "4.3.0", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)", | ||
@@ -10,7 +10,9 @@ "author": "Kamil Mysliwiec", | ||
}, | ||
"dependencies": { | ||
"optional": "0.1.4" | ||
}, | ||
"peerDependencies": { | ||
"@nestjs/common": "^4.*", | ||
"@nestjs/core": "^4.*", | ||
"@nestjs/microservices": "^4.*" | ||
"@nestjs/core": "^4.*" | ||
} | ||
} |
@@ -5,3 +5,3 @@ import { NestContainer } from '@nestjs/core/injector/container'; | ||
import { INestApplication, INestMicroservice } from '@nestjs/common'; | ||
import { MicroserviceConfiguration } from '@nestjs/microservices'; | ||
import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; | ||
export declare class TestingModule { | ||
@@ -8,0 +8,0 @@ private readonly container; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const optional = require("optional"); | ||
const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); | ||
@@ -7,3 +8,4 @@ const module_token_factory_1 = require("@nestjs/core/injector/module-token-factory"); | ||
const core_1 = require("@nestjs/core"); | ||
const microservices_1 = require("@nestjs/microservices"); | ||
const microservices_package_not_found_exception_1 = require("@nestjs/core/errors/exceptions/microservices-package-not-found.exception"); | ||
const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || {}; | ||
class TestingModule { | ||
@@ -20,3 +22,6 @@ constructor(container, scope, contextModule) { | ||
createNestMicroservice(config) { | ||
return new microservices_1.NestMicroservice(this.container, config); | ||
if (!NestMicroservice) { | ||
throw new microservices_package_not_found_exception_1.MicroservicesPackageNotFoundException(); | ||
} | ||
return new NestMicroservice(this.container, config); | ||
} | ||
@@ -23,0 +28,0 @@ select(module) { |
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
22749
226
5
21
+ Addedoptional@0.1.4
- Removed@nestjs/microservices@4.6.6(transitive)
- Removeddouble-ended-queue@2.1.0-0(transitive)
- Removedjson-socket@0.2.1(transitive)
- Removedredis@2.8.0(transitive)
- Removedredis-commands@1.7.0(transitive)
- Removedredis-parser@2.6.0(transitive)