-
Notifications
You must be signed in to change notification settings - Fork 31
npm: Support two-factor authentication: ask for a one-time password #104
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
Conversation
|
How would we feel about removing node_modules from tracking and committing a package-lock.json? I understand that precludes |
|
@timmywil That's a possibility. I can't speak for what exactly were Scott's idea here to skip it other than the lack of a lockfile and reducing dependency on external code during the release - but we have such a dependency anyway as the release process needs to download dependencies of the project it releases. One caveat is What do others think? |
|
BTW, @timmywil, regardless of the decision, I feel this may be a matter to settle separately to this PR to not block its merge. What do you think? |
|
I agree, but it'd be a nice-to-have before the next jQuery release. |
lib/npm.js
Outdated
| safety = Release.isTest ? "--dry-run" : "", | ||
| npmTags = Release.npmTags(); | ||
|
|
||
| const otp = await Release._getNpmOtp(); |
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.
The mixture of const and var is a bit odd to me. Perhaps we should stick with var and then convert everything in another PR?
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.
I'm not sure if I have resources right now to convert everything. Would converting vars in the _publishNpm method be enough here?
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.
I think we can use eslint and just run the auto fix to do the conversion.
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.
I can do that btw. For this PR, I'd say switch consts to vars.
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.
Cool.
About the rule:
The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
I wonder how much it can actually auto-convert. An autofixer that fixes all the occurrences would most likely be impossible.
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.
PR updated, all consts removed.
Keywords: 2FA, OTP, npm
Keywords: 2FA, OTP, npm
I tried to not add any new packages and use the native
readlineAPI but the most basic example in the API docs cause the provided output to be printed twice. I was testing various workarounds but I couldn't make it work.This increases the checked-in
node_modulessize from 584 KB to 932 KB. Way better thaninquirerthat increases it to 23 MB. 😮