How to protect NPM from corrupted libraries?

  Рет қаралды 127

PS After Hours

PS After Hours

2 жыл бұрын

If you do not do this one simple thing, other people can break your JavaScript application? How? By publishing a new version of their library on NPM. If you do not test everything, you might even do not notice that something went wrong and your app has problems. This is why, always pinpoint your NPM dependencies to a given, specific, version. Avoid "compatible " and "equivalent". And definitely, never do "any version". That is the short way to a huge headache.
NPM colors library www.npmjs.com/package/colors
NPM faker library www.npmjs.com/package/faker
#quadmeup #npm #programming
Visit my primary channel / dzikuvx
Facebook / quadmeup
Discord server quadmeup.com/discord
My website quadmeup.com/
Instagram / dzikuvx

Пікірлер: 1
@WinstonSmith1984
@WinstonSmith1984 2 жыл бұрын
If npm works anything like composer which I think it does, then it's best to keep the lock file (it contains the exact versions of the last update) in version control and then when deploying, install from the lock file and not from the npm.json or composer.json file. Then you can still use version tags such as "~2.7" in your .json file. That way you can update during development if you want, test it, and if happy with the results, commit the lock file changes.
GitHub Copilot - Artificial Intelligence for developers
8:58
PS After Hours
Рет қаралды 876
A$$holes versus Open Source software
3:57
PS After Hours
Рет қаралды 1,1 М.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 6 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
Difference between authentication and authorization
3:05
PS After Hours
Рет қаралды 1,6 М.
Lilygo T5 4.7inch w/ GFX
0:21
honey crisis
Рет қаралды 764
These Animations Will Make Your Brain Happy
9:17
CodeCraftedPhysics
Рет қаралды 9 М.
DIY 3d printed electric motor
0:33
PS After Hours
Рет қаралды 9 М.
Can you sell a GPLv3 software?
0:48
PS After Hours
Рет қаралды 275
How to exit VIM? 4 simple ways
1:09
PS After Hours
Рет қаралды 2,5 М.
Why 50 Ohms?
2:19
Quaxys
Рет қаралды 10 М.
RSA PrivateKey to PublicKey conversion in Java
5:10
PS After Hours
Рет қаралды 1,3 М.
Cheapest gaming phone? 🤭 #miniphone #smartphone #iphone #fy
0:19
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,3 МЛН
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 916 М.