npm still mangles line endings

help-wanted
priority:low
cli
triaged

(Anthony Mandra) #1

What I Wanted to Do

npm run

What Happened Instead

npm mangled line endings in package.json

Reproduction Steps

npm run on a windows machine

Details

Platform Info

windows

$ npm --versions
5.7, 5.10, 6.2 (all showing the issue)
$ node -p process.platform
<!-- paste output here -->

(Kat Marchán) #2

Please fill in more details than this. npm run does not itself write package.json, so I don’t know what you were actually doing. If you don’t add proper reproduction steps, I’ll be moving this to #support.


(Anthony Mandra) #4

It does write to package.json. I was upgrading npm to get the fix for the LF. However, turns out this was related to npm adding a single terminal line ending (not every line). Once that was committed it is finally not thrashing.


(Kat Marchán) #5

If you’re getting a modified package.json after npm run <>, this must be due to a run-script, which is not part of npm itself. Like I said, I’ll need a more specific reproduction, but it sounds like this is a support issue now, so I’m moving it accordingly.


(system) #6

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.