Skip to content

feat(core): expose external-context-creator - #11104

Merged
kamilmysliwiec merged 1 commit into
nestjs:masterfrom
eugenk:feature/expose-external-context-creator
Mar 10, 2023
Merged

kamilmysliwiec merged 1 commit into
nestjs:masterfrom
eugenk:feature/expose-external-context-creator

Conversation

@eugenk

@eugenk eugenk commented Feb 13, 2023

Copy link
Copy Markdown

Allow third party packages to register handlers (like controller methods) that pass through the whole pipeline of interceptors, pipes, guards, filters and param decorators while still being compliant with node16 moduleResolution, where imports like

import {
  ExternalContextCreator,
  ParamsFactory,
} from "@nestjs/core/helpers/external-context-creator";

are not allowed.

No tests are added here because functionality is not changed.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

ExternalContextCreator and ParamsFactory are not exposed for third party packages to use.

Issue Number: N/A

What is the new behavior?

ExternalContextCreator and ParamsFactory are exposed for third party packages to use.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

No tests are added because no functionality has changed. Only existing functionality has been exposed to the API.

Allow third party packages to register handlers (like controller
methods) that pass through the whole pipeline of interceptors, pipes,
guards, filters and param decorators while still being compliant with
node16 moduleResolution, where imports like

```typescript
import {
  ExternalContextCreator,
  ParamsFactory,
} from "@nestjs/core/helpers/external-context-creator";
```

are not allowed.

No tests are added here because functionality is not changed.
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build f2b7d659-23a2-4636-8ade-306e9a11733b

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 92.882%

Totals Coverage Status
Change from base Build 2b3eb234-7d9a-4fdd-9416-14735e8205f1: 0.001%
Covered Lines: 6485
Relevant Lines: 6982

💛 - Coveralls

@kamilmysliwiec
kamilmysliwiec merged commit ca2eed1 into nestjs:master Mar 10, 2023
@kamilmysliwiec

Copy link
Copy Markdown
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants