@nestjs/core 11.2.2 → 11.2.3
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/injector/injector.js +12 -1
- package/package.json +3 -3
package/injector/injector.js
CHANGED
|
@@ -267,12 +267,23 @@ class Injector {
|
|
|
267
267
|
* that eventual lazily created instance will be merged with the prototype
|
|
268
268
|
* instantiated beforehand.
|
|
269
269
|
*/
|
|
270
|
-
instanceHost.donePromise
|
|
270
|
+
if (instanceHost.donePromise) {
|
|
271
271
|
void instanceHost.donePromise
|
|
272
272
|
.then(() => this.loadProvider(instanceWrapper, moduleRef, resolutionContext))
|
|
273
273
|
.catch(err => {
|
|
274
274
|
instanceWrapper.settlementSignal?.error(err);
|
|
275
275
|
});
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
/**
|
|
279
|
+
* No load has ever been scheduled for this context (e.g., request-scoped
|
|
280
|
+
* providers are no longer instantiated during static bootstrap, so a fresh
|
|
281
|
+
* durable/request sub-tree host has no inherited `donePromise`).
|
|
282
|
+
* Load it now; if a circular dependency is truly in-flight, the nested
|
|
283
|
+
* lookup will find this host pending and defer through its `donePromise`.
|
|
284
|
+
*/
|
|
285
|
+
await this.loadProvider(instanceWrapper, instanceWrapper.host ?? moduleRef, resolutionContext);
|
|
286
|
+
}
|
|
276
287
|
}
|
|
277
288
|
if (instanceWrapper.async) {
|
|
278
289
|
const host = instanceWrapper.getInstanceByContextId(this.getContextId(resolutionContext.contextId, instanceWrapper), inquirerId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.3",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"uid": "2.0.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@nestjs/common": "11.2.
|
|
31
|
+
"@nestjs/common": "11.2.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@nestjs/common": "^11.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"optional": true
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "2b36ee5fea13dedcedfd9815a9c193b2d21130c1"
|
|
53
53
|
}
|