-
Notifications
You must be signed in to change notification settings - Fork 44
feat: support customize npmPublishHint
#57
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
Hmm. Is it always |
Yes, I'm just using |
npmClient
Oh, I see what you mean. You mean let the user customize the whole publish command? |
Yeah. I'm not sure if there is a way to let the hint be easily parameterisable without running into potential issues (like the custom client not supporting I think generally if the hint is not correct, then you probably already know what it means and how to translate it. However, I do take your point that it would be nice if the hint were correct. It might be better to either:
|
What do you think? |
We can use https://www.npmjs.com/package/detect-package-manager to detect current directory package manager. And we can provide two options:
How about this? then most user can only change the |
I’m a fan of keeping the api surface small if possible (this helps reduce long term maintenance effort)- what about just detecting the package manager and printing an appropriate message?If you feel strongly that it should be configurable, I reckon the whole “here’s how you publish” message should be one parameter, in order to cover the most bases and extend the API options surface the least.Thanks for putting tests in the PR, btw. Much appreciated!Sent from my mobileOn 20 Feb 2023, at 4:34 pm, Artin ***@***.***> wrote:
We can use https://www.npmjs.com/package/detect-package-manager to detect current directory package manager.
And we can provide two options:
npmClientName
npmClientPublishCommand
How about this? then most user can only change the npmClientName.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
for [If you feel strongly that it should be configurable], my answer is yes. so we will provide an option:
If the user does not set this configuration, we will automatically detect package manager and construt it to |
npmClient
npmPublishHint
npmPublishHint
npmPublishHint
@TimothyJones hello, I have implemented the relevant functions, pls have a look, thank you~ |
Apologies! I thought I had reviewed and merged this. I'll get it out now. Thanks again! |
I'm using some npm client that not npm.
so I want it directly show
yarn publish
BEGIN_COMMIT_OVERRIDE
feat: Support customizing the npm publish hint message with a new option:
npmPublishHint
END_COMMIT_OVERRIDE