Closed Bug 1456403 Opened 6 years ago Closed 6 years ago

'mach lint' modifies npm_shrinkwrap.json, which is easy to accidentally check-in

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1417175

People

(Reporter: jcj, Unassigned)

Details

It's not obvious that `mach lint` is going to cause a modification of npm-shrinkwrap.json. Since that file gets modified by an automated process, perhaps it should be added to the default ignore file?

(Context: I appear to not be the only person to accidentally commit changes to that file from running mach lint right before pushing to inbound. :) )
I've hit this too. I've also reviewed patches where it was accidentally included unbeknownst to the author.
The reason npm-shrinkwrap.json is in the tree is to try to ensure that developers configurations are the same as everyone else's. 

Adding it to an ignore file wouldn't work as the ignore files only affect untracked files.

Generally the differences at the moment are due to different people having different versions of npm. The latest versions of npm are much more stable (especially cross-platform), and with the proposed increase of min version to 5.5.1 [1], we should be in a lot better state.

[1] https://groups.google.com/d/msg/mozilla.dev.platform/OlPUPJ9x38s/CF3vzI2gCAAJ
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.