# package.json & Semantic Versioning — Node.js Fundamentals: Modules, Async and Servers

Source: https://www.skillbyai.com/en/nodejs/node-package-json

> Describe a project in package.json and read semantic versioning ranges such as caret and tilde.

## The manifest file

`package.json` records your project's name, entry point, dependencies, and scripts.

```json
{
  "name": "my-app",
  "version": "1.0.0",
  "type": "module",
  "main": "index.js",
  "dependencies": {
    "express": "^4.19.2"
  }
}
```

## MAJOR.MINOR.PATCH

Semantic versioning is `MAJOR.MINOR.PATCH`: **major** for breaking changes, **minor** for new backward-compatible features, **patch** for bug fixes.

## ^ and ~ ranges

`^4.19.2` allows minor/patch updates (up to `<5.0.0`); `~4.19.2` allows only patch updates (up to `<4.20.0`).
