1782 Commits

Author SHA1 Message Date
Kamil Myśliwiec
5d31df7eb6 chore(release): publish v11.1.14 release 2026-02-17 17:24:39 +01:00
Kamil Myśliwiec
8d1c16c1ca chore: update readme 2026-02-03 14:07:38 +01:00
Kamil Myśliwiec
e3a958ac3e chore(release): publish v11.1.13 release 2026-02-03 13:47:36 +01:00
Lee Donghyun
db9494a2ad perf(core): use set instead of array for module registry lookup 2026-01-27 12:08:57 +09:00
Lee Donghyun
909b504d2d test(core): add unit tests for discovery service
Add comprehensive unit tests for DiscoveryService which previously
had no test coverage despite being a public API.

Test coverage includes:
- createDecorator() static method with unique key generation
- getProviders() with metadataKey and include options filtering
- getControllers() with module-based filtering
- getMetadataByDecorator() with method and class metadata
- getModules() protected method with include filtering
- Edge cases: empty modules, undefined instances, null checks

Total: 30+ test cases covering all public methods and edge cases.
2026-01-26 00:38:14 +09:00
Kamil Myśliwiec
96932ad073 chore(release): publish v11.1.12 release 2026-01-15 09:29:44 +01:00
Kamil Myśliwiec
4fdeb0b504 style: address lint issues 2026-01-15 09:25:17 +01:00
Kamil Myśliwiec
e5616c2b92 feat: apply instance decorator to all enhancers 2026-01-14 19:58:10 +01:00
Kamil Myśliwiec
585f55f0e4 chore: revert lerna version 2025-12-29 14:30:25 +01:00
Kamil Myśliwiec
fef323b2c9 chore(release): publish v11.1.11 release 2025-12-29 14:26:08 +01:00
coti-z
15198c650d fix(core): add missing catch handler for forward-ref provider resolution
When forwardRef provider fails to load in a non-static context
(REQUEST/TRANSIENT scope, the error was silently swallowed because the
promise was fire-and-forget without catch handler

This fix add catch handler that propagate the error through
ettlementSignal, ensuring proper error handling and preventing unhandled
promise rejection
2025-12-28 18:47:47 +09:00
Kamil Myśliwiec
de5e0262d2 chore(@nestjs) publish v11.1.10 release 2025-12-22 09:31:35 +01:00
mag123c
2c5221dac0 refactor(core): improve is-static method readability 2025-12-21 11:08:34 +09:00
mag123c
351f977b3d fix(core): instantiate nested transient providers in static context 2025-12-19 17:14:00 +09:00
Kamil Myśliwiec
61d728bfd6 style: address linter errors 2025-12-15 10:37:27 +01:00
Kamil Mysliwiec
a0d79d8528 Merge pull request #15721 from pythonjsgo/feat/sse-promise-support
feat(core): add Promise<Observable> support for SSE handlers
2025-12-15 10:12:00 +01:00
Kamil Mysliwiec
adff255d89 Merge pull request #16005 from malkovitc/fix/resolve-each-multiple-providers
fix(core): resolve all providers when using resolve() with each option
2025-12-15 10:11:24 +01:00
taegwon son
3cbf2818de test(core): Add tests for SilentLogger utility
- Verify SilentLogger extends Logger
- Test all logging methods (log, error, warn, debug, verbose, fatal)
- Test setLogLevels method
- All methods return undefined without side effects

Coverage: 30% → 100%
2025-12-14 11:31:36 +09:00
taegwon son
5ea3988a80 test(core): Add tests for DiscoverableMetaHostCollection
Improve test coverage for discoverable-meta-host-collection.ts
from 38.46% to 100% by adding comprehensive unit tests for:
- addClassMetaHostLink
- insertByMetaKey
- getProvidersByMetaKey / getControllersByMetaKey
- inspectProvider / inspectController
- useValue and useFactory provider scenarios
2025-12-13 16:57:31 +09:00
taegwon son
e8df30cceb test(core): Add comprehensive tests for TreeNode class 2025-12-11 18:10:57 +09:00
Kamil Myśliwiec
0c93692bc9 chore: update prettier 2025-12-05 13:35:27 +01:00
Kamil Myśliwiec
0430f3f190 chore: resolve conflicts 2025-12-05 13:31:11 +01:00
Kamil Myśliwiec
5045fea937 chore: update eslint monorepo 2025-12-05 13:29:23 +01:00
evgeniy.chernomortsev
acb1ae56d4 fix(core): resolve all providers when using resolve() with each option
When resolving multiple default-scoped providers registered under the same
token using `moduleRef.resolve(token, undefined, { each: true })`, the method
was returning the same instance repeated N times instead of all distinct
provider instances.

The issue was in `resolvePerContext` where for static dependency trees it
called `this.get()` which always returned the last registered provider,
ignoring the specific `instanceLink` being processed. Now it returns
`wrapperRef.instance` directly from each instance link.

Closes #15979
2025-12-03 01:40:33 +04:00
mag123c
b64aef5d69 fix(core): add option for async logger compatibility 2025-11-28 22:52:38 +09:00
Kamil Myśliwiec
64c85527f5 chore(@nestjs) publish v11.1.9 release 2025-11-14 11:18:00 +01:00
Joseph Nutt
cc50925c04 fix(core): make get() throw for implicitly request-scoped trees
Treat non-static dependency trees as scoped in get(); instruct consumers to use resolve().\n\nAdds focused tests under NestApplicationContext spec to cover implicit request scope via enhancers.\n\nCloses #15836.
2025-11-01 13:07:31 +00:00
Kamil Myśliwiec
68cd545949 chore(@nestjs) publish v11.1.8 release 2025-10-27 10:00:53 +01:00
Kamil Mysliwiec
334012e5b9 Merge pull request #15815 from mag123c/fix/transient-nested-dependency-isolation
fix(core): ensure nested transient provider isolation
2025-10-27 09:31:06 +01:00
mag123c
4ffe045628 fix(core): ensure nested transient provider isolation 2025-10-21 21:51:14 +09:00
Kamil Myśliwiec
ee1b347555 chore(@nestjs) publish v11.1.7 release 2025-10-21 10:54:51 +02:00
Kamil Myśliwiec
33d6cb59a6 chore: update readme 2025-10-21 10:54:00 +02:00
Kamil Mysliwiec
884e8a2296 Update packages/core/router/router-response-controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 10:45:20 +02:00
Alexander Suvorov
258428a0a6 feat(core): add Promise<Observable> support for SSE handlers
Adds support for returning Promise<Observable<MessageEvent>> from SSE
handlers, enabling async validation before sending HTTP headers.

This allows developers to:
- Perform async validation before establishing SSE connection
- Return custom HTTP status codes (404, 401, etc.)
- Set headers based on async data
- Implement proper resource validation patterns

Implementation details:
- RouterResponseController.sse() now accepts Promise<Observable>
- Custom status codes extracted from response.statusCode
- SseStream.pipe() accepts optional statusCode parameter
- Full backward compatibility maintained

Fixes #12260
2025-10-02 13:31:56 +03:00
Kamil Mysliwiec
82b4f07d18 Merge pull request #15622 from nestjs/renovate/path-to-regexp-8.x
fix(deps): update dependency path-to-regexp to v8.3.0
2025-09-16 10:07:42 +02:00
Kamil Mysliwiec
55860382c5 Merge pull request #15503 from mag123c/feat/add-forceconsole-option-to-logger
feat(common): add force-console option to console logger
2025-09-16 10:07:15 +02:00
Kamil Mysliwiec
fada0a7f58 Merge pull request #15588 from at7211/feat/enhance-dependency-error-messages
fix(core): improve dependency resolution error messages
2025-09-16 10:06:05 +02:00
renovate[bot]
fc72d1ee26 fix(deps): update dependency path-to-regexp to v8.3.0 2025-09-10 14:50:24 +00:00
at7211
2d20ef9887 fix(core): improve dependency resolution error messages 2025-09-04 15:02:08 +08:00
mag123c
7f05dd12b0 fix(core): prevent lifecycle hook on non-instantiated transient service 2025-08-26 23:16:48 +09:00
mag123c
bd82272104 fix(core): check isresolved flag for transient lifecycle hooks 2025-08-26 22:27:52 +09:00
mag123c
1d44f34d23 fix(core): skip lifecycle hooks for non-instantiated transient services 2025-08-26 21:03:44 +09:00
Kamil Myśliwiec
35c3ded6db chore(@nestjs) publish v11.1.6 release 2025-08-07 08:59:11 +02:00
Kamil Mysliwiec
60b2ed43cd Merge pull request #15504 from hajekjiri/bug/fix-undefined-injection
fix(core): fix race condition in class dependency resolution from imported modules
2025-08-07 08:54:48 +02:00
mag123c
ff81fb1f57 feat(common): add force-console option to nestfactory.create() 2025-08-07 14:12:50 +09:00
Jiri Hajek
ab93e4b0c2 fix(core): fix race condition in class dependency resolution
Fix race condition in class dependency resolution, which could otherwise
lead to undefined or null injection. This is a followup to #15405 that
fixes another case of this bug that was not taken care of in the
previous PR. In this case specifically, the staticity of the dependency
tree could be checked before all dependencies are loaded and the param /
property Barrier is passed, resulting in a potentially wrong evaluation
of the `isTreeStatic` property of the `InstanceWrapper`.

Closes #4873
2025-08-05 15:54:59 +02:00
Kamil Myśliwiec
f14a976051 style(core): change inquirer id to const 2025-07-30 11:12:22 +02:00
Kamil Myśliwiec
93f54edaf0 fix(core): attach root inquirer for nested transient providers 2025-07-30 11:05:36 +02:00
hahaahhaa
cd009a78da refactor(core): fix the typo 'controler' to 'controller' 2025-07-26 16:15:31 +09:00
Kamil Myśliwiec
9bb0560e79 chore(@nestjs) publish v11.1.5 release 2025-07-18 11:14:44 +02:00