Skip to content

fix(discovery): support NestJS 11 #945

Merged
underfisk merged 3 commits intogolevelup:masterfrom
xballoy:fix/944-nestjs-11-support
Jan 22, 2025
Merged

fix(discovery): support NestJS 11 #945
underfisk merged 3 commits intogolevelup:masterfrom
xballoy:fix/944-nestjs-11-support

Conversation

@xballoy
Copy link
Copy Markdown
Contributor

@xballoy xballoy commented Jan 22, 2025

Fix #937 to support NestJS 11.

Starting version 11, InstanceWrapper.inject can be null (see v11 vs v10).

In order to prevent a breaking change in discovery by respecting the DiscoveredClass type we map null to undefined.

Fixes #944

renovate Bot and others added 2 commits January 21, 2025 21:35
From NestJS 11, InstanceWrapper.metatype can be null. Mapping it from `null` to `undefined` for
`DiscoveredClass.injectType` to avoid a breaking change.

#944
@xballoy
Copy link
Copy Markdown
Contributor Author

xballoy commented Jan 22, 2025

I successfully locally run

pnpm build --concurrency=12 
pnpm test:ci
pnpm test:vitest:ci

I did not run the pnpm test:ci:integration because I don't want to setup a local RabbitMQ but this package is not impacted anyway.

Comment thread packages/discovery/src/discovery.service.ts
@underfisk
Copy link
Copy Markdown
Collaborator

I successfully locally run

pnpm build --concurrency=12 
pnpm test:ci
pnpm test:vitest:ci

I did not run the pnpm test:ci:integration because I don't want to setup a local RabbitMQ but this package is not impacted anyway.

@xballoy Not an issue, CI will run those checks for you.

Support both undefined and null while supporting NestJS 10 and 11.
@xballoy xballoy requested a review from underfisk January 22, 2025 19:15
Copy link
Copy Markdown
Collaborator

@underfisk underfisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thank you

@underfisk underfisk enabled auto-merge (squash) January 22, 2025 20:00
@underfisk underfisk merged commit 7617ac1 into golevelup:master Jan 22, 2025
@xballoy xballoy deleted the fix/944-nestjs-11-support branch January 22, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NestJS 11 support

2 participants