@nestjs/core 9.2.0 → 9.2.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.
package/Readme.md CHANGED
@@ -78,7 +78,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
78
78
  <td>
79
79
  <a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/jetbrains-logo.svg" width="110" valign="middle" /></a></td><td>
80
80
  <a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td><td>
81
- <a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
81
+ <a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td>
82
+ <td>
83
+ <a href="https://ridicorp.com/career/" target="_blank"><img src="https://nestjs.com/img/ridi-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
82
84
 
83
85
  #### Silver Sponsors
84
86
 
@@ -40,17 +40,29 @@ const getModuleName = (module) => (module && getInstanceName(module.metatype)) |
40
40
  const stringifyScope = (scope) => (scope || []).map(getInstanceName).join(' -> ');
41
41
  const UNKNOWN_DEPENDENCIES_MESSAGE = (type, unknownDependencyContext, module) => {
42
42
  const { index, name = 'dependency', dependencies, key, } = unknownDependencyContext;
43
- const moduleName = getModuleName(module) || 'Module';
43
+ const moduleName = getModuleName(module);
44
44
  const dependencyName = getDependencyName(name);
45
- let message = `Nest can't resolve dependencies of the ${type.toString()}`;
46
- const potentialSolutions = `\n
45
+ const potentialSolutions =
46
+ // If module's name is well defined
47
+ moduleName !== 'current'
48
+ ? `\n
47
49
  Potential solutions:
50
+ - Is ${moduleName} a valid NestJS module?
48
51
  - If ${dependencyName} is a provider, is it part of the current ${moduleName}?
49
52
  - If ${dependencyName} is exported from a separate @Module, is that module imported within ${moduleName}?
50
53
  @Module({
51
54
  imports: [ /* the Module containing ${dependencyName} */ ]
52
55
  })
56
+ `
57
+ : `\n
58
+ Potential solutions:
59
+ - If ${dependencyName} is a provider, is it part of the current Module?
60
+ - If ${dependencyName} is exported from a separate @Module, is that module imported within Module?
61
+ @Module({
62
+ imports: [ /* the Module containing ${dependencyName} */ ]
63
+ })
53
64
  `;
65
+ let message = `Nest can't resolve dependencies of the ${type.toString()}`;
54
66
  if ((0, shared_utils_1.isNil)(index)) {
55
67
  message += `. Please make sure that the "${key.toString()}" property is available in the current context.${potentialSolutions}`;
56
68
  return message;
@@ -59,7 +71,7 @@ Potential solutions:
59
71
  dependenciesName[index] = '?';
60
72
  message += ` (`;
61
73
  message += dependenciesName.join(', ');
62
- message += `). Please make sure that the argument ${dependencyName} at index [${index}] is available in the ${getModuleName(module)} context.`;
74
+ message += `). Please make sure that the argument ${dependencyName} at index [${index}] is available in the ${moduleName} context.`;
63
75
  message += potentialSolutions;
64
76
  return message;
65
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "9.2.0",
3
+ "version": "9.2.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@core)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "uuid": "9.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@nestjs/common": "9.2.0"
39
+ "@nestjs/common": "9.2.1"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@nestjs/common": "^9.0.0",
@@ -0,0 +1,21 @@
1
+ {
2
+ "extends": "../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": ".",
5
+ "rootDir": ".",
6
+ "paths": {
7
+ "@nestjs/common": ["../common"],
8
+ "@nestjs/common/*": ["../common/*"],
9
+ "@nestjs/microservices": ["../microservices"],
10
+ "@nestjs/microservices/*": ["../microservices/*"],
11
+ "@nestjs/websockets": ["../websockets"],
12
+ "@nestjs/websockets/*": ["../websockets/*"]
13
+ }
14
+ },
15
+ "exclude": ["node_modules", "dist", "test/**/*", "*.spec.ts"],
16
+ "references": [
17
+ {
18
+ "path": "../common/tsconfig.build.json"
19
+ }
20
+ ]
21
+ }