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

Optional flag to add/replace registry in publishConfig #156

Open
TimberBro opened this issue Aug 25, 2024 · 1 comment
Open

Optional flag to add/replace registry in publishConfig #156

TimberBro opened this issue Aug 25, 2024 · 1 comment

Comments

@TimberBro
Copy link

I'm using clean publish to upload project dependencies to corporate npm registry, that doesn't support mirroring.
Some packages contains fields to prevent publishing or allow publish to specific registries: https://docs.npmjs.com/cli/v10/using-npm/registry#how-can-i-prevent-my-package-from-being-published-in-the-official-registry
In that case I'm not able to publish it, until I manually change or delete these fields.

My suggestion is to add flag, if it's provided, script deletes private field to be able to publish the package and set the value of "publishConfig":{"registry":""} to value from flag.

What do you think about that?

@ai
Copy link
Collaborator

ai commented Aug 25, 2024

Can you use before-script option with custom script?

Since it is a rare feature I think before-script will feat it better.

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

No branches or pull requests

2 participants