don't gitignore your lock files!

  Рет қаралды 8,237

Syntax

Syntax

Күн бұрын

Пікірлер: 31
@feldinho
@feldinho 23 күн бұрын
The best way to learn the value of a lock file is to use pip for a while. Python projects are infamous for pinning everything. Once you have to upgrade anything, it’s up to you to find out a combination of packages that work.
@ithinkimhipster502
@ithinkimhipster502 2 сағат бұрын
Pip-compile helps with that
@scottfwalter
@scottfwalter 23 күн бұрын
Sadly, there are a lot of open source projects that don't understand semantic versioning. Introducing breaking changes/bugs in patch releases. npm ci is your friend.
@cahva2
@cahva2 23 күн бұрын
This. We pin the version just for this. And on the security side, let's say the maintainer got social hacked, we will be safe as we wiil be cemented to the actual version until we update.
@SoreBrain
@SoreBrain 23 күн бұрын
It's dependencies all the way down? Always has been 🔫
@RBXTrains
@RBXTrains 20 күн бұрын
Those sub dependency requirements are a nightmare. Quite a few times our old underfunded stack has an old build pipeline stop working as a change has occurred with syntax specific to newer ECMAScript versions (usually optional chaining operator).... but we're still on node 14 so breaks. Would be massive workload to upgrade everything as using tonnes of now unsupported modules, and most of us a primarily Java developers lol
@4v4
@4v4 23 күн бұрын
very few packages actually follow proper versioning. it’s wild that something like tailwind has to just trust all its nested dependencies, assuming they’ll stick to semantic versioning
@futuremoe
@futuremoe 23 күн бұрын
Also don't forget to use npm ci in a CI pipeline to install from the lock file. Yarn and pnpm should do this automatically or take an env var.
@RemotHuman
@RemotHuman 23 күн бұрын
deleting an regenerating your lock files updates your package versions. if you don't periodically do this, you could miss out on important security updates but if you do periodically do it, you could be vulnerable to supply chain attacks from a library updating maliciously, or bugs from it updating badly so I guess you are supposed to periodically do it and then (do your best to) check if any of your libraries turned evil when you do it Is that right?
@linchen5913
@linchen5913 23 күн бұрын
What an useful content. Thank you!
@borisbrestnichki
@borisbrestnichki 22 күн бұрын
Pinning your deps across multiple developers and environments can be done by running a "clean install" (for npm is "npm ci") both in dev and ci. It'll not try to get newer versions including of deps of deps. And this needs the lock file, so don't ignore it. Rather challenge changes to the lock file in any "feature" MR and do a dedicated "upgrade" MRs.
@matthewmoon2463
@matthewmoon2463 22 күн бұрын
Running npm audit is good practice for identifying vulnerabilities, but it doesn’t solve the problem of having a consistent, pinned dependency tree.
@justingiovanetti
@justingiovanetti 22 күн бұрын
9 times out of 10 when things don’t work, I just delete the lock file, and npm install again. And things just seem to work.
@noriller
@noriller 23 күн бұрын
i believe, if you pin dependencies, then it will pin dependencies of dependencies versions also. just tested on a old version of create vite with dependencies pinned and "^" there's a lot of differences there. then again, it probably also depends on the lockfile being there.
@OtcSkater
@OtcSkater 16 күн бұрын
I thought so too.. so would it just act as if the caret was just removed all the way down?
@yogenp
@yogenp 23 күн бұрын
One of the engineers I worked with was really offended when I said package-lock shouldn't be gitignored.
@timonjur
@timonjur 23 күн бұрын
What's certainly human-readable is the pnpm-lock.yaml file!
@ShaneCodes
@ShaneCodes 21 күн бұрын
I just want the package json to update with what was installed. Like if I put v ^4.2.0 and it installs 4.5.0 I don't want to have to dig through the package-lock.json
@codeman99-dev
@codeman99-dev 23 күн бұрын
4:25 Users of npm should prefer to use `npm install --package-lock-only` to resolve conflicts.
@dohnjoe342
@dohnjoe342 7 күн бұрын
I have a continuous determination to explain to so-called Javascript experts the difference about npm install and npm ci and the purpose of the lock file and I will do until I am breathing. 😀
@trappedcat3615
@trappedcat3615 23 күн бұрын
The key is the word depend is not depinned
@kissu_io
@kissu_io 22 күн бұрын
Also what's the problem with committing a non readable file to begin with? It's just faster to not rebuild the entire tree all the time. 👍🏻 Even better: skip the build step whatsoever and stop relying on crazy amount of dependencies.
@petecapecod
@petecapecod 23 күн бұрын
Carrots 🥕 ^^ for life! 🤣 Thanks for the tips 👍🏻
@elierh442
@elierh442 23 күн бұрын
The world runs on dependencies...
@shinebayar
@shinebayar 23 күн бұрын
Jokes on you, `npm install` doesn't use lock file anyways :)
@Ss-zg3yj
@Ss-zg3yj 23 күн бұрын
Poor BroccoliBoy69
@ipanasenko
@ipanasenko 23 күн бұрын
Don't nuke lock files, at least yarn.lock! Yarn resolves conflicts in yarn.lock automatically during `yarn install`, don't know what other managers do with them though
@shubhamnagota
@shubhamnagota 23 күн бұрын
video
@ydkme-reborn
@ydkme-reborn 23 күн бұрын
Lol
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 34 М.
Javascript's New Pipeline Operator Is Awesome!
7:26
Jack Herrington
Рет қаралды 50 М.
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
FASTER JavaScript In 2025 With Sets
13:13
Jack Herrington
Рет қаралды 28 М.
"BEST C++ CODE ever written" // Code Review
27:38
The Cherno
Рет қаралды 137 М.
Podman vs. Docker | Container Runtime Comparison
6:03
Brian Cooper
Рет қаралды 3,1 М.
API Vs SDK! What's the difference?
4:52
ByteByteGo
Рет қаралды 72 М.
AI Risks No One is Talking About
14:09
TJ DeVries
Рет қаралды 57 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 241 М.
System76 accidentally built the fastest Windows Arm PC
21:02
Jeff Geerling
Рет қаралды 498 М.
Learn Docker in 1 Hour | Full Docker Course for Beginners
1:27:53
JavaScript Mastery
Рет қаралды 464 М.