loi_re/content/docs/help/how-to-update.md

33 lines
1.1 KiB
Markdown
Raw Normal View History

2021-03-18 15:50:09 +01:00
---
title: "How to Update"
description: "Regularly update the installed npm packages to keep your Doks website stable, usable, and secure."
lead: "Regularly update the installed npm packages to keep your Doks website stable, usable, and secure."
date: 2020-11-12T13:26:54+01:00
lastmod: 2020-11-12T13:26:54+01:00
draft: false
images: []
2021-04-02 20:27:40 +02:00
menu:
2021-03-18 15:50:09 +01:00
docs:
parent: "help"
weight: 610
toc: true
---
{{< alert icon="💡" text="Learn more about <a href=\"https://docs.npmjs.com/about-semantic-versioning\">semantic versioning</a> and <a href=\"https://docs.npmjs.com/cli/v6/using-npm/semver#advanced-range-syntax\">advanced range syntax</a>." >}}
2021-04-02 20:27:40 +02:00
## Check for outdated packages
2021-03-18 15:50:09 +01:00
2021-04-02 20:27:40 +02:00
The [`npm outdated`](https://docs.npmjs.com/cli/v7/commands/npm-outdated) command will check the registry to see if any (or, specific) installed packages are currently outdated:
2021-03-18 15:50:09 +01:00
```bash
2021-04-02 20:27:40 +02:00
npm outdated [[<@scope>/]<pkg> ...]
```
## Update packages
The [`npm update`](https://docs.npmjs.com/cli/v7/commands/npm-update) command will update all the packages listed to the latest version (specified by the tag config), respecting semver:
```bash
npm update [<pkg>...]
2021-03-18 15:50:09 +01:00
```