From cca1c921b47c61c23ede7ce86fa8cfb71aa7d759 Mon Sep 17 00:00:00 2001 From: Mouaz Aldakkak <87415713+movoid12@users.noreply.github.com> Date: Sun, 3 Mar 2024 10:45:44 +0100 Subject: [PATCH] pnpm-{audit, outdated}: add page (#12437) * feat: add pnpm audit commands and fix tldr-lint errors * feat: add pnpm outdated commands and fix tldr-lint errors * feat(pnpm-audit): add severity level of vulnerabilities option * fix: improve general description based on tldr style-guide * fix(pnpm-audit): improve general writing * fix: resolve code review suggestion * fix: apply code review suggestion of @kbdharun --- pages/common/pnpm-audit.md | 37 +++++++++++++++++++++++++++++++++++ pages/common/pnpm-outdated.md | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 pages/common/pnpm-audit.md create mode 100644 pages/common/pnpm-outdated.md diff --git a/pages/common/pnpm-audit.md b/pages/common/pnpm-audit.md new file mode 100644 index 000000000..82ca64b0e --- /dev/null +++ b/pages/common/pnpm-audit.md @@ -0,0 +1,37 @@ +# pnpm audit + +> Scan project dependencies. +> Check for known security issues with the installed packages. +> More information: . + +- Identify vulnerabilities in the project: + +`pnpm audit` + +- Automatically fix vulnerabilities: + +`pnpm audit fix` + +- Generate a security report in JSON format: + +`pnpm audit --json > {{path/to/audit-report.json}}` + +- Audit only [D]ev dependencies: + +`pnpm audit --dev` + +- Audit only [P]roduction dependencies: + +`pnpm audit --prod` + +- Exclude optional dependencies from the audit: + +`pnpm audit --no-optional` + +- Ignore registry errors during the audit process: + +`pnpm audit --ignore-registry-errors` + +- Filter advisories by severity (low, moderate, high, critical): + +`pnpm audit --audit-level {{severity}}` diff --git a/pages/common/pnpm-outdated.md b/pages/common/pnpm-outdated.md new file mode 100644 index 000000000..df687960a --- /dev/null +++ b/pages/common/pnpm-outdated.md @@ -0,0 +1,37 @@ +# pnpm outdated + +> Check for outdated packages. +> The check can be limited to a subset of the installed packages by providing arguments (patterns are supported). +> More information: . + +- Check for outdated packages: + +`pnpm outdated` + +- Check for outdated dependencies found in every workspace package: + +`pnpm outdated -r` + +- Filter outdated packages using a package selector: + +`pnpm outdated --filter {{package_selector}}` + +- List outdated packages [g]lobally: + +`pnpm outdated --global` + +- Print details of outdated packages: + +`pnpm outdated --long` + +- Print outdated dependencies in a specific format: + +`pnpm outdated --format {{format}}` + +- Print only versions that satisfy specifications in `package.json`: + +`pnpm outdated --compatible` + +- Check only outdated [D]ev dependencies: + +`pnpm outdated --dev`