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

Why is npm version used to set the version? #526

Closed
oliversalzburg opened this issue Nov 1, 2022 · 1 comment
Closed

Why is npm version used to set the version? #526

oliversalzburg opened this issue Nov 1, 2022 · 1 comment

Comments

@oliversalzburg
Copy link

This is mostly a question, as I'm suffering from the same issue described in #500 and I was looking into options to solve it.

So, why is npm version used to set the version in the manifest? Given the CLI arguments, it seems fair to assume that no side effects beyond changing the version field in the manifest.json is desired. Similarly, semantic-release only supports single-project-repositories, so there also shouldn't be any monorepo side effects to take into account.

Thus, why is this CLI approach used instead of just manipulating the file? It seems like npm needlessly causes problems here, because it's being used for a task where a simpler approach would be available (manipulating the manifest ourselves).

@oliversalzburg
Copy link
Author

After looking into it a bit myself, I figure it's because npm version takes care of preserving style, line terminators and whatnot when replacing the version.

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

1 participant