pwn2winctf / NIZKCTF-js

Good luck!
https://pwn2.win/NIZKCTF-js/
MIT License
3 stars 2 forks source link

Pin packages #3

Open macabeus opened 4 years ago

macabeus commented 4 years ago

Is strongly recommended to pin the packages on package.json file, in order to avoid auto-upgrade, because it could break the application.

For example, instead of "showdown": "^1.9.1", is safer to write just "showdown": "1.9.1" (without ˆ).

LorhanSohaky commented 4 years ago

I believe that npm-semver andpackage-lock.json guarantee this.

Caret Ranges:

Package-lock:

It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.

macabeus commented 4 years ago

But it only works if the package maintainer's really set correctly the semantic version. And not, there are moments that they make mistakes, or on situations that "this is a very small edge case, let's add it as a minor", but it could break someone.

For example: on a release, express decided to add an exception when someone use the encoding utf8 instead of utf-8. It's a break change, but the guys decided to add it as a minor.