@nestjs/core 12.0.0-alpha.0 → 12.0.0-alpha.1

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.
@@ -1,5 +1,5 @@
1
1
  import { Logger } from '@nestjs/common';
2
- const MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to take advantage of the default driver, please, ensure to install the "${defaultPlatform}" package ($ npm install ${defaultPlatform}).`;
2
+ const MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to use the default driver, please, install the "${defaultPlatform}" package ($ npm install ${defaultPlatform}).`;
3
3
  const logger = new Logger('PackageLoader');
4
4
  export async function loadAdapter(defaultPlatform, transport, loaderFn) {
5
5
  try {
@@ -11,7 +11,7 @@ import { mapToExcludeRoute } from './middleware/utils.js';
11
11
  import { NestApplicationContext } from './nest-application-context.js';
12
12
  import { RoutesResolver } from './router/routes-resolver.js';
13
13
  import { Logger } from '@nestjs/common';
14
- import { loadPackage, loadPackageCached, addLeadingSlash, isFunction, isObject, isString, } from '@nestjs/common/internal';
14
+ import { loadPackage, loadPackageCached, tryLoadPackage, addLeadingSlash, isFunction, isObject, isString, } from '@nestjs/common/internal';
15
15
  /**
16
16
  * @publicApi
17
17
  */
@@ -317,8 +317,8 @@ export class NestApplication extends NestApplicationContext {
317
317
  */
318
318
  async preloadLazyPackages() {
319
319
  // Best-effort: silently swallow if packages are not installed
320
- await loadPackage('@nestjs/platform-express', 'TestingModule', () => import('@nestjs/platform-express')).catch(() => { });
321
- await loadPackage('@nestjs/microservices', 'TestingModule', () => import('@nestjs/microservices')).catch(() => { });
320
+ await tryLoadPackage('@nestjs/platform-express', () => import('@nestjs/platform-express'));
321
+ await tryLoadPackage('@nestjs/microservices', () => import('@nestjs/microservices'));
322
322
  }
323
323
  host() {
324
324
  const address = this.httpServer.address();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "12.0.0-alpha.0",
3
+ "version": "12.0.0-alpha.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@core)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "uid": "2.0.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@nestjs/common": "^12.0.0-alpha.0"
71
+ "@nestjs/common": "^12.0.0-alpha.1"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@nestjs/common": "^11.0.0",