FFC Back End 1 Flashcards
What do the version numbers for a node package mean ? What is the official name for this system?
The numbers represent major, minor and patch.
“package”: “MAJOR.MINOR.PATCH”
This is called Semantic Versioning and allows you to predict how big a change a new version of a package will be.
- 1.1 to 1.1.3 will only be a small patch change.
- 1.1 to 2.0.0 will be a major change and will likely come with breaking changes.
What does the tilde mean in the following dependency?
“package”: “~1.3.8”
It allows an npm dependency to update to the latest PATCH version.
What does the caret mean in the following dependency?
“package”: “^1.3.8”
When you use a caret (^) as a version prefix, npm is allowed to update to any 1.x.x version.
How do you remove a node package you no longer need?
Just remove the corresponding key-value pair for that package from your dependencies.