Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add optional decorator for property based injection #824

Merged

Conversation

jmcdo29
Copy link
Member

@jmcdo29 jmcdo29 commented Feb 14, 2022

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?

After moving the AuthModuleOptions to a property so that the AuthGuard() could be better extended, Nest started throwing errors about not being able to find the AuthModuleOptions. This is because ti is no longer optional.

Issue Number: #823

What is the new behavior?

Back to the behavior in 8.0.0 with the property being optional, but it's also still a property

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I've added in some tests to show it's working without having to use register, I want to add more for a nested set up and show it's fully working, but I don't want to delay this fix from rolling out.

Closes #823

@jmcdo29
Copy link
Member Author

jmcdo29 commented Feb 14, 2022

This was a bug introduced, not a (intentional) breaking change. This fixes that bug, and makes the feature work as intended. Though I do believe it should have been a minor bump, not a patch as it does allow for new features to work

Copy link
Member

@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

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

image

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.

Nest can't resolve dependencies of the JwtAuthenticationGuard after upgrade 8.1.0 to 8.1.1
4 participants