@depup/nestjs__core 12.1.0-depup.0 → 12.1.1-depup.0
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 +2 -2
- package/changes.json +1 -1
- package/injector/injector.js +1 -1
- package/injector/instance-wrapper.d.ts +1 -0
- package/injector/instance-wrapper.js +9 -0
- package/injector/settlement-signal.d.ts +15 -4
- package/injector/settlement-signal.js +22 -7
- package/nest-application.js +5 -0
- package/package.json +5 -5
- package/router/legacy-route-converter.js +1 -1
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/nestjs__core
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@nestjs/core](https://www.npmjs.com/package/@nestjs/core) @ 12.1.
|
|
17
|
-
| Processed | 2026-09-
|
|
16
|
+
| Original | [@nestjs/core](https://www.npmjs.com/package/@nestjs/core) @ 12.1.1 |
|
|
17
|
+
| Processed | 2026-09-28 |
|
|
18
18
|
| Smoke test | failed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/injector/injector.js
CHANGED
|
@@ -288,7 +288,7 @@ export class Injector {
|
|
|
288
288
|
const inquirerId = this.getContextInquirerId(resolutionContext);
|
|
289
289
|
const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(resolutionContext.contextId, instanceWrapper), inquirerId);
|
|
290
290
|
if (!instanceHost.isResolved && !instanceWrapper.forwardRef) {
|
|
291
|
-
resolutionContext.inquirer?.settlementSignal?.insertRef(instanceWrapper
|
|
291
|
+
resolutionContext.inquirer?.settlementSignal?.insertRef(instanceWrapper);
|
|
292
292
|
await this.loadProvider(instanceWrapper, instanceWrapper.host ?? moduleRef, resolutionContext);
|
|
293
293
|
}
|
|
294
294
|
else if (!instanceHost.isResolved &&
|
|
@@ -93,6 +93,7 @@ export declare class InstanceWrapper<T = any> {
|
|
|
93
93
|
getRootInquirer(): InstanceWrapper | undefined;
|
|
94
94
|
getStaticTransientInstances(): (InstancePerContext<T> | undefined)[];
|
|
95
95
|
mergeWith(provider: Provider): void;
|
|
96
|
+
private resetStaticInstance;
|
|
96
97
|
private isNewable;
|
|
97
98
|
private registerDependencyTreeParent;
|
|
98
99
|
private resetDependencyTreeState;
|
|
@@ -332,12 +332,21 @@ export class InstanceWrapper {
|
|
|
332
332
|
else if (isClassProvider(provider)) {
|
|
333
333
|
this.inject = null;
|
|
334
334
|
this.metatype = provider.useClass;
|
|
335
|
+
this.resetStaticInstance();
|
|
335
336
|
}
|
|
336
337
|
else if (isFactoryProvider(provider)) {
|
|
337
338
|
this.metatype = provider.useFactory;
|
|
338
339
|
this.inject = provider.inject || [];
|
|
340
|
+
this.resetStaticInstance();
|
|
339
341
|
}
|
|
340
342
|
}
|
|
343
|
+
resetStaticInstance() {
|
|
344
|
+
this.setInstanceByContextId(STATIC_CONTEXT, {
|
|
345
|
+
instance: null,
|
|
346
|
+
isResolved: false,
|
|
347
|
+
isPending: false,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
341
350
|
isNewable() {
|
|
342
351
|
return isNil(this.inject) && this.metatype && this.metatype.prototype;
|
|
343
352
|
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A dependency of the host of a signal, as recorded by `insertRef`.
|
|
3
|
+
*/
|
|
4
|
+
interface SettlementSignalRef {
|
|
5
|
+
id: string;
|
|
6
|
+
settlementSignal?: SettlementSignal;
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* SettlementSignal is used to signal the resolution of a provider/instance.
|
|
3
10
|
* Calling `complete` or `error` will resolve the promise returned by `asPromise`.
|
|
@@ -24,14 +31,18 @@ export declare class SettlementSignal {
|
|
|
24
31
|
*/
|
|
25
32
|
asPromise(): Promise<unknown>;
|
|
26
33
|
/**
|
|
27
|
-
* Inserts a wrapper
|
|
28
|
-
* @param
|
|
34
|
+
* Inserts a wrapper that the host of this signal depends on.
|
|
35
|
+
* @param ref Wrapper to insert.
|
|
29
36
|
*/
|
|
30
|
-
insertRef(
|
|
37
|
+
insertRef(ref: SettlementSignalRef): void;
|
|
31
38
|
/**
|
|
32
|
-
* Check if relationship is circular.
|
|
39
|
+
* Check if relationship is circular, i.e. whether the host of this signal
|
|
40
|
+
* is still waiting, directly or through other pending dependencies, on the
|
|
41
|
+
* given wrapper.
|
|
33
42
|
* @param wrapperId Wrapper id to check.
|
|
34
43
|
* @returns True if relationship is circular, false otherwise.
|
|
35
44
|
*/
|
|
36
45
|
isCycle(wrapperId: string): boolean;
|
|
46
|
+
private waitsOn;
|
|
37
47
|
}
|
|
48
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Can be used to detect circular dependencies.
|
|
5
5
|
*/
|
|
6
6
|
export class SettlementSignal {
|
|
7
|
-
_refs = new
|
|
7
|
+
_refs = new Map();
|
|
8
8
|
settledPromise;
|
|
9
9
|
settleFn;
|
|
10
10
|
completed = false;
|
|
@@ -36,18 +36,33 @@ export class SettlementSignal {
|
|
|
36
36
|
return this.settledPromise;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Inserts a wrapper
|
|
40
|
-
* @param
|
|
39
|
+
* Inserts a wrapper that the host of this signal depends on.
|
|
40
|
+
* @param ref Wrapper to insert.
|
|
41
41
|
*/
|
|
42
|
-
insertRef(
|
|
43
|
-
this._refs.
|
|
42
|
+
insertRef(ref) {
|
|
43
|
+
this._refs.set(ref.id, ref);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Check if relationship is circular.
|
|
46
|
+
* Check if relationship is circular, i.e. whether the host of this signal
|
|
47
|
+
* is still waiting, directly or through other pending dependencies, on the
|
|
48
|
+
* given wrapper.
|
|
47
49
|
* @param wrapperId Wrapper id to check.
|
|
48
50
|
* @returns True if relationship is circular, false otherwise.
|
|
49
51
|
*/
|
|
50
52
|
isCycle(wrapperId) {
|
|
51
|
-
return
|
|
53
|
+
return this.waitsOn(wrapperId, new Set());
|
|
54
|
+
}
|
|
55
|
+
waitsOn(wrapperId, visited) {
|
|
56
|
+
if (this.completed || visited.has(this)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
visited.add(this);
|
|
60
|
+
for (const [refId, ref] of this._refs) {
|
|
61
|
+
if (refId === wrapperId ||
|
|
62
|
+
ref.settlementSignal?.waitsOn(wrapperId, visited)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
52
67
|
}
|
|
53
68
|
}
|
package/nest-application.js
CHANGED
|
@@ -128,6 +128,11 @@ export class NestApplication extends NestApplicationContext {
|
|
|
128
128
|
await this.callBootstrapHook();
|
|
129
129
|
this.isInitialized = true;
|
|
130
130
|
this.logger.log(MESSAGES.APPLICATION_READY);
|
|
131
|
+
// Without this, an application that is never started with "listen()"
|
|
132
|
+
// (e.g. serverless handlers, e2e tests) would buffer logs forever.
|
|
133
|
+
if (this.appOptions?.autoFlushLogs ?? true) {
|
|
134
|
+
this.flushLogs();
|
|
135
|
+
}
|
|
131
136
|
return this;
|
|
132
137
|
}
|
|
133
138
|
registerParserMiddleware() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/nestjs__core",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.1-depup.0",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core) (with updated dependencies)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"uid": "2.0.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@nestjs/common": "12.1.
|
|
36
|
+
"@nestjs/common": "12.1.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@nestjs/common": "^12.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"optional": true
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "9feedffde8ef8c86f0cd521153740575dc579d88",
|
|
58
58
|
"keywords": [
|
|
59
59
|
"@nestjs/core",
|
|
60
60
|
"depup",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"changes": {},
|
|
68
68
|
"depsUpdated": 0,
|
|
69
69
|
"originalPackage": "@nestjs/core",
|
|
70
|
-
"originalVersion": "12.1.
|
|
71
|
-
"processedAt": "2026-09-
|
|
70
|
+
"originalVersion": "12.1.1",
|
|
71
|
+
"processedAt": "2026-09-28T16:11:05.925Z",
|
|
72
72
|
"smokeTest": "failed"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
|
-
const UNSUPPORTED_PATH_MESSAGE = (text, route) => `Unsupported route path: "${route}". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/*path. For more details, refer to the migration guide.`;
|
|
2
|
+
const UNSUPPORTED_PATH_MESSAGE = (text, route) => `Unsupported route path: "${route}". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/{*path}. The braces keep the wildcard optional, so it covers the same paths as /users/* did, while /users/*path is narrower and requires at least one extra segment. For more details, refer to the migration guide.`;
|
|
3
3
|
export class LegacyRouteConverter {
|
|
4
4
|
static logger = new Logger(LegacyRouteConverter.name);
|
|
5
5
|
/**
|