@kaynooo/cli-pkg 0.16.0 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cli.js +450 -127
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ pkg outdated
|
|
|
15
15
|
|
|
16
16
|
- Whether the name exists, the version the request resolves to (an exact version, a dist-tag or a range), the latest version, and the highest stable version at least two weeks old (`safe`), each with its publish date.
|
|
17
17
|
- Weekly downloads (public registry only), licence and repository.
|
|
18
|
-
- Warnings for a version under the minimum age (with the `safe` version to use instead; a fresh version clear of an advisory at `blockSeverity` or above that `safe` has is let through, with a warning naming the GHSAs it fixes), `preinstall`, `install` and `postinstall` scripts, a deprecated version, and a name that is a near miss of a popular package (one or two edits, other separators or case, or
|
|
18
|
+
- Warnings for a version under the minimum age (with the `safe` version to use instead; a fresh version clear of an advisory at `blockSeverity` or above that `safe` has is let through, with a warning naming the GHSAs it fixes), `preinstall`, `install` and `postinstall` scripts, a deprecated version, a version whose publisher differs from the previous release's (not when a person hands over to npm trusted publishing from CI, but when it goes back) or whose provenance attestation is gone, and a name that is a near miss of a popular package (one or two edits, other separators or case, or a popular unscoped name put under a scope; two scopes sharing a last part, `@cacheable/utils` and `@vitest/utils`, are not one).
|
|
19
19
|
|
|
20
20
|
`pkg` exits 1 when a package is blocked (missing, the request matches no version or is not a valid range, the resolved version is too fresh (unless it fixes an advisory of the safe version at the threshold) or has no publish date on npmjs.org, its licence is outside the allowlist, or an advisory reaches the threshold), 2 when it could not check (the registry unreachable, slower than 10 s or answering badly, a broken `.pkgrc.json`, `bunfig.toml` or `.npmrc`) or on a usage error; other warnings exit 0. `--json` prints one report, or an array for several names, `--min-age <days>` changes the 14 days.
|
|
21
21
|
|
|
@@ -44,7 +44,7 @@ pkg audit ~/Workspace/app --level high --prod --ignore GHSA-238p-pmpm-9mq7 --jso
|
|
|
44
44
|
- `--level <low|moderate|high|critical>` (`moderate`) keeps only the advisories at that severity or above, `--prod` audits only the packages a production or optional dependency of a workspace reaches, and `--ignore <GHSA or id>` (repeatable) skips an advisory; `blockSeverity` is for `pkg check` and does not apply here. The three flags are the ones of `audit`.
|
|
45
45
|
- `--json` prints a flat array, one `{name, version, license, blocked, warnings, advisories}` per package with a finding, each advisory being `{id, ghsa, url, title, severity, vulnerable, fixed}`. `audit --json` nests the same advisory rows (without `vulnerable`) in `{repo, path, findings, error}` per repository.
|
|
46
46
|
- `--min-age <days>` changes the 14 days.
|
|
47
|
-
- Use `pkg audit` to vet one repository in depth (age, install scripts, licences and advisories, with the registry as the source); use `audit` to sweep many repositories for advisories only, through `bun audit`.
|
|
47
|
+
- Use `pkg audit` to vet one repository in depth (age, install scripts, licences and advisories, with the registry as the source); use `ws audit` to sweep many repositories for advisories only, through `bun audit`.
|
|
48
48
|
- A pin under the minimum age fixing an advisory of the `safe` version at `blockSeverity` or above (not one `--ignore` skips) is let through as `pkg check` lets it, a warning naming the GHSAs.
|
|
49
49
|
- It exits 1 when a package is missing, too fresh or outside the allowlist, or an advisory remains after the level and the ignores; install scripts and near misses alone exit 0. When the advisories of a registry could not be read it warns which, never prints a clean result for them, and exits 2 unless something already blocks.
|
|
50
50
|
- An `npm:` alias (`"lodash": "npm:other@1.0.0"`) is audited as the package it names.
|