-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
src/package.json file is modified when starting etherpad #3396
Comments
@RalfJung, that's true. After googling around, it appears to be standard (albeit surprising) behaviour on npm side. The command that triggers reformatting is The npm developers do not seem to be willing to change that (see npm/npm#3299), so probably in order to mitigate this issue, a different approach will be needed. Personally, I do not see a reason for which a config file needs to be opened RW at all. |
npm/npm#3299 seems to be about "npm shorthands for updating your JSON". Is etherpad using those when being started, or how is that related? |
You are right, @RalfJung, wrong link. It turns out, at some point of its development npm default config for This makes no sense for I have made some tests, and to fix this it is possible to add |
Thanks :) |
…e repo. This change reverts c4918ef, and basically negates what was done for #3396, but aligns better with current practices in the nodejs ecosystem. Pragmatically speaking, this will allow users, if they want, to use npm-force-resolutions (https://github.com/rogeriochaves/npm-force-resolutions) to manually fix security vulnerabilities. We had a problem for that (see #3598), and - given the fragmented nature of the nodejs ecosystem - it is reasonable to expect more issues like that one, so it's better to be prepared. Closes #3659.
Steps to reproduce
I am launching etherpad directly from the clone source tree by starting
bin/run.sh
, withNODE_ENV=production
in the environment.Actual behavior
After doing that,
git status
tells me thatsrc/package.json
has been modified. From the looks of it, something parsed and re-formatted the json in there.Expected behavior
Launching an application should not modify source files that are tracked by the VCS. Hence I would expect
git status
to be clean after launching etherpad.The text was updated successfully, but these errors were encountered: