Skip to content

Commit d615962

Browse files
committed
git or not-to-git lock files
1 parent 367d980 commit d615962

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

session 3/chapters/1. Software Package Manager.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,21 @@ When you have `'type': 'module'` in the package.json file, your source code shou
121121
- Adding `'type': 'module'` to the package.json enables `ES6` modules.
122122

123123
![ES6](../images/type-es6.jpg)
124+
125+
# Always check in lock files
126+
127+
tl;dr
128+
129+
Put it in GIT
130+
Commit it every-time it changes
131+
Never delete it
132+
133+
### Why not just keep exact versions in package.json?
134+
135+
Your package.json only points to the versions of your direct dependencies. If they have dependencies too (and they do), these versions won't be locked.
136+
137+
### ref
138+
139+
https://nodejs.dev/learn/the-package-lock-json-file
140+
141+
https://dev.to/adamklein/package-lock-json-in-git-or-not-50l5

0 commit comments

Comments
 (0)