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
refactor(authentication): simplify decorators import path #1991
Conversation
Hmm, I do not understand why prettier is failing on Travis. The error is really not clear. |
@Yaty It seems that Travis build picks up a newer version of Please upgrade to |
I am opening a PR to update prettier. |
Here is the PR - #1993. Let's land this ASAP. |
@@ -5,7 +5,7 @@ | |||
|
|||
import {Strategy} from 'passport'; | |||
import {AuthenticateFn, UserProfile} from './types'; | |||
import {AuthenticationMetadata} from './decorators/authenticate.decorator'; | |||
import {AuthenticationMetadata} from './decorators'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note importing from the target file is not bad. Sometimes it's even necessary to avoid circular dependencies. If a module does not have side-effect code at top level, either way is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, I'll keep your comment in my mind :)
Here this is just syntactic sugar to ease import of a "future" new decorator.
Use decorators index when importing
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated