Content-Length: 260197 | pFad | https://github.com/npm/cli/commit/140b9c988d08beb6c3cd95b67cd4135ed32a19e6

27 docs(package-json): note that line endings are inferred (#7382) · npm/cli@140b9c9 · GitHub
Skip to content

Commit 140b9c9

Browse files
authored
docs(package-json): note that line endings are inferred (#7382)
## What Per npm/json-parse-even-better-errors#3 (comment), npm will implicitly update line endings, spacing, etc of `package-lock.json` so that it matches `package.json` ## Why I'd like to add this documentation because it does not seem to be documented anywhere, and as it is an implicit and non-configurable behavior, it took me a long time to figure out the cause. ## References npm/json-parse-even-better-errors#3 (comment)
1 parent 9216d59 commit 140b9c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/lib/content/configuring-npm/package-lock-json.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ various purposes:
3131
picture of the package tree, reducing the need to read `package.json`
3232
files, and allowing for significant performance improvements.
3333

34+
When `npm` creates or updates `package-lock.json`, it will infer line endings and indentation from `package.json` so that the formatting of both files matches.
35+
3436
### `package-lock.json` vs `npm-shrinkwrap.json`
3537

3638
Both of these files have the same format, and perform similar functions in

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/npm/cli/commit/140b9c988d08beb6c3cd95b67cd4135ed32a19e6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy