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

feat: Adding publicPath option for npm publishConfig #1010

Merged
merged 2 commits into from Jun 5, 2023

Conversation

xllily
Copy link
Contributor

@xllily xllily commented May 31, 2023

Adds the publicPath option to the npm.publishConfig configuration item to facilitate custom configuration and meet the needs of users in certain scenarios.

At present, after npm publish succeeds, the npm package address displayed in the terminal printout log is https://{{host}}/package/{{packageName}}, through this publicPath option allows /package replace it with a custom path.

For example, when using a third-party tool Verdaccio to build an npm private proxy , The package address of Verdaccio web user interface is fixed and cannot be configured https://{{host}}/-/web/detail/{{packageName}}, In this case, npm.publishConfig.publicPath can can be configured as -/web/detail.
Then the terminal will print the address https://{{host}}/-/web/detail/{{packageName}} after npm publish done , the user can directly click on the npm package address printed in the terminal output log to access the web user interface of Verdaccio, enhanced user experience.

@webpro
Copy link
Collaborator

webpro commented Jun 1, 2023

Thanks @xllily! Any chance you could add a unit test for this (or extend an existing test), so your changes will have some coverage?

@xllily
Copy link
Contributor Author

xllily commented Jun 5, 2023

Thanks @xllily! Any chance you could add a unit test for this (or extend an existing test), so your changes will have some coverage?

@webpro :

Thank you for your valuable feedback. I have taken your suggestion into consideration and have added a unit test for the changes I made. The unit test has been successfully incorporated into the existing test suite to ensure proper test coverage.

I genuinely appreciate your guidance in maintaining the quality of the code. If there are any other modifications or additions you would like me to make, please don't hesitate to let me know. I am more than willing to assist and address any concerns you may have.

@webpro webpro merged commit fef8566 into release-it:main Jun 5, 2023
11 checks passed
@webpro
Copy link
Collaborator

webpro commented Jun 5, 2023

Excellent, thanks again!

@webpro
Copy link
Collaborator

webpro commented Jun 5, 2023

🚀 This pull request is included in v15.11.0. See Release 15.11.0 for release notes.

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.

None yet

2 participants