-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
npm-profile, npm-registry-fetch, emit input.start #7457
Conversation
f66808b
to
5b230c7
Compare
8aac32d
to
2f08cd7
Compare
2f08cd7
to
19175d8
Compare
19175d8
to
531c674
Compare
@@ -95,13 +95,15 @@ class Help extends BaseCommand { | |||
args = ['emacsclient', ['-e', `(woman-find-file '${man}')`]] | |||
} | |||
|
|||
return spawn(...args, { stdio: 'inherit' }).catch(err => { |
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.
npm was not using the return data from promise-spawn here so this is ok
@@ -63,7 +63,7 @@ t.test('open bugs urls & emails', async t => { | |||
const { npm } = await loadMockNpm(t, { | |||
mocks: { | |||
pacote, | |||
'{LIB}/utils/open-url.js': openUrl, | |||
'{LIB}/utils/open-url.js': { openUrl }, |
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.
in the future we should use spawk for these
t.same(joinedOutput(), '', 'printed no output') | ||
}) | ||
const { openUrlPrompt } = tmock(t, '{LIB}/utils/open-url.js', { | ||
'@npmcli/promise-spawn': { |
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.
in the future we should use spawk here.
This also refactors auth and prompt related files to use promises and new npm-profile behavior
9c5075c
to
8f73741
Compare
Note: this relies on npm/npm-profile#131This now includesnpm-profile@10.0.0
This PR accomplishes the following:
input.start
so progress won't be shown while the terminal is running those commandsotplease
toauth.js
. They share many of the same requires and all the commands that requiredauth.js
also requiredotplease
open-url
andopen-url-prompt
filesweb-auth
in favor of a newwebAuthOpener
method exported fromnpm-profile
readline/promises
for url prompts which can directly accept the new AbortSignal API fromnpm-profile