# Usage Guide This guide explains how depup chooses the new version of each dependency and how it writes it back. [How depup Decides Updates](#how-depup-decides-updates) gives the overview; the later chapters are references to look up when a result is not what you expected. The options are listed in the [Command-Line Reference](cli-reference.md), and the rules specific to each ecosystem are in [Ecosystems and Monorepos](ecosystems.md). ## How depup Decides Updates Unless a dependency is pinned, depup looks up its published versions, picks the newest one that passes the checks below, and rewrites the manifest in place. By default: - An exact version such as `"1.2.3"` in `package.json` is treated as an intentional pin and is not updated unless you pass `--include-pinned`. Go modules and mise tools are exceptions ([Pinned Versions and `--include-pinned`](#pinned-versions-and---include-pinned)). - Only versions that have been public for at least one week are candidates ([Age Filter](#age-filter)). - Versions without known vulnerabilities are preferred; updates that fix existing vulnerabilities may still be allowed under severity and count limits by default ([Vulnerability Check](#vulnerability-check-osvdev)). - Prereleases are not proposed while the current version is stable ([Candidate Ordering and Prereleases](#candidate-ordering-and-prereleases)). - Ranges keep their shape and upper bound; only the lower bound moves ([Upper and Lower Bounds of Ranges](#upper-and-lower-bounds-of-ranges)). - Major bumps are allowed unless `--max-change` caps them ([Limiting Bumps](#limiting-bumps---max-change)). This guide uses two terms for a dependency that depup leaves unchanged: - **Skipped**: depup recognizes the dependency but does not update it. Skipped dependencies are counted in the output, and `--verbose` lists each one with its reason, such as `pinned` or `latest` ([When a Dependency Is Not Updated](#when-a-dependency-is-not-updated)). - **Not processed**: depup does not take the declaration as an updatable dependency, so it does not appear in the output at all. This happens when the declaration points to a non-registry source (such as a Cargo `path` dependency; Cargo git dependencies are the exception and are checked with `git ls-remote`), names a platform package (such as `php` in Composer), or writes its version in a floating or unsupported form (such as `"*"` or `latest`). Filters such as the age filter and the vulnerability check remove candidate versions, not the dependency itself. depup updates the dependency to the newest remaining candidate and reports it as skipped only when no candidate newer than the current version remains. ## Filtering Candidates Three configurable filters decide which published versions can be chosen: the age filter and the vulnerability check (both on by default) and `--max-change` (off unless you set it). You can set each one per run with a flag, or as a default in the [Global Configuration File](configuration.md#global-configuration-file). Prereleases and versions above a range's upper bound are also removed from the candidates ([Version Specifiers and Rewriting](#version-specifiers-and-rewriting)). ### Age Filter The age filter only considers versions that were released at least a given time ago, so a new release is not adopted as soon as it is published. **A one-week (`1w`) age filter applies by default** unless you override it: ```bash # Default — implicit --age 1w depup # Only update to versions at least 2 weeks old depup --age 2w # Only update to versions at least 10 days old depup --age 10d # Only update to versions at least 1 month old depup --age 1m # Disable the age filter for this run depup --no-age ``` The age filter applies to the versions depup writes into manifests; for transitive dependencies during `--install`, see [Transitive Dependencies and the Age Filter](#transitive-dependencies-and-the-age-filter). Cargo git dependencies are not subject to the age filter. Swift packages come from the GitHub Tags API, whose tag list carries no dates. With an active age filter, depup looks up publication dates only for the candidates it would select, newest first, and stops at the first one old enough. A tag's date is the `published_at` of its GitHub Release; a tag without a Release uses the creation time of an annotated tag (`tagger.date`), which approximates when the tag was made. A lightweight tag has no date: the commit it points to can be older than the tag. A version whose tags SwiftPM ranks equally (such as `1.2.0` and `V1.2.0`) has no date either, because it is not known which tag SwiftPM uses. Each dependency gets at most 5 lookups, not counting dates already found earlier in the run (an unauthenticated GitHub API client may send only 60 requests per hour; set `GITHUB_TOKEN` or `GH_TOKEN` to raise the limit). If the lookups run out before a version passes, the dependency is skipped with `release date lookup limit reached; and older not checked`, naming the newest version left unchecked, rather than updated to an older one. When no version within `--max-change` passes, depup also checks the versions beyond it, nearest first, so that an old enough one is reported as `max-change=` as for other ecosystems. A failed lookup, such as a rate-limit response, is reported as `fetch failed`, not as an unknown date. Without an age filter, or for an owner exempted in `[age_exempt]`, depup does not look up dates. An unavailable release date is never treated as an old date. With an active age filter, depup excludes undated versions from registries that normally provide dates and reports `release date unavailable for ` when this prevents an update. Without an age filter, the version remains eligible. Swift tags whose dates cannot be found are treated the same way. Backends that provide no dates at all, including some mise tools, remain eligible with age enabled; their update lines say `release date unknown`, so their age cannot be verified. #### Resolution Priority A minimum release age declared in the project (pnpm's or Bun's `minimumReleaseAge`, or mise's `minimum_release_age`) is treated as the **project policy** and takes precedence over the CLI `--age` and the global configuration file. The age for each manifest is resolved in this order (highest first): 1. Project policy from pnpm, Bun, or mise settings (see below for the files read and how multiple values are combined) 2. CLI `--age ` or `--no-age` (the two cannot be combined; `--no-age` only takes effect when no project policy is set) 3. `age` in `~/.config/depup/config.toml` (see [Global Configuration File](configuration.md#global-configuration-file)) 4. Built-in default `1w` When a project policy overrides the CLI value, depup prints a yellow warning so the active source is visible: ```text ⚠ --age ignored: project's minimumReleaseAge (14 days from pnpm-workspace.yaml) takes precedence ``` `--age` and `--no-age` cannot override a project policy. To use a different age, change or remove the setting in the project file. When depup would otherwise report `latest` and the current version's confirmed publication date is newer than the effective age cutoff, it reports `newer than --age`. This also applies to the default, global configuration, and project minimum release age. A verified publisher exemption suppresses this age reason. The manifest is kept as it is; this report does not downgrade the current version. An applicable `max-change` or `release date unavailable` reason is preserved. If all candidates fail the age check and a newer young release also exists, the result remains `no suitable version`; a young current version alone is reported as `newer than --age`. Java's current publication date is fetched lazily for exact versions in verbose output, so this reason is shown only when that date has been confirmed. #### Supported `minimumReleaseAge` Sources **pnpm** (checked in this order; the first value found wins): - `.npmrc` (`minimum-release-age=10d`) - `pnpm-workspace.yaml` (`minimumReleaseAge: 14400` in minutes) - `package.json` (`pnpm.settings.minimumReleaseAge`) `.npmrc` is read with the same ini rules as npm and pnpm: text after an unquoted `;` or `#` is a comment, a later line for the same key wins, and keys under a `[section]` header are not top-level settings. A value that cannot be read or interpreted stops every manifest that inherits it, whatever its language, before an update is chosen (the run ends with exit code 2); it does not fall back to a lower-priority file or a weaker age. **Bun** (`bunfig.toml`): ```toml [install] minimumReleaseAge = 259200 # seconds (e.g. 3 days) ``` **mise** (`[settings]` in `mise.toml` or another mise config file; note that `m` means minutes, see [mise and the Age Filter](ecosystems.md#mise-and-the-age-filter)): ```toml [settings] minimum_release_age = "7d" # s / m (minutes) / h / d / w / M / y ``` If more than one of pnpm, Bun, and mise sets a value, depup uses the stricter (larger) one. Within pnpm, only the first value found in each directory is used; a pnpm lockfile is not required. Each manifest inherits explicit settings from its directory up to the run root and uses the strictest inherited value. Settings in sibling projects do not affect its candidate selection. When started inside a Cargo, pnpm, or uv workspace, depup also reads the workspace root's policy. Tauri synchronization is confined to each app and respects the frontend and Rust scopes separately. For Python and mise, depup also preserves stricter native settings: uv's `exclude-newer` in `uv.toml`, `[tool.uv]`, the user configuration, or `UV_EXCLUDE_NEWER`, including `UV_CONFIG_FILE` and system settings; and mise's global, local, and per-tool `minimum_release_age` or `MISE_MINIMUM_RELEASE_AGE`, including `MISE_CONFIG_FILE` and active `MISE_ENV` overlays. Native project settings inherited above the run root are preserved too. For mise, `--no-age` overrides the user/global minimum release age and `MISE_MINIMUM_RELEASE_AGE`; project, local, per-tool, `MISE_CONFIG_FILE`, and active environment overlay constraints still apply. uv native constraints continue to apply even with `--no-age`. Per-tool mise ages and stricter uv package/index cutoffs are combined into the strictest age for that scope. Such native constraints disable publisher exemptions in that scope. Dates, timestamps, single-unit durations, and fixed ISO 8601 durations are supported; a native setting that cannot be read or interpreted stops that manifest's update instead of being replaced with a weaker value. The cutoff is fixed when the run starts. Candidate selection, Tauri synchronization, and the Cargo audit use that same instant. uv and mise receive absolute cutoffs during install; pnpm receives minutes rounded up so seconds are never discarded. ### Vulnerability Check (OSV.dev) depup queries [OSV.dev](https://osv.dev/) for candidate versions. **The check is enabled by default.** Updates that fix existing vulnerabilities may introduce new Medium/Low vulnerabilities under the conditions below. This is enabled even when an older configuration has no new policy key. Candidates still have to pass the age filter and all other update rules. Within those limits, depup prefers a version without known vulnerabilities, then a version that fixes some vulnerabilities without adding any, and finally a version meeting the conditions below. It chooses the newest version within each tier. To allow an update with remaining vulnerabilities, it must fix at least one vulnerability of known severity. Each new vulnerability requires a separate fix of the same or higher severity: - New Medium issues must not outnumber resolved Medium, High, and Critical issues combined. - New Medium and Low issues combined must not outnumber all resolved issues of known severity. - New High, Critical, and unknown-severity issues are never offset. A candidate containing malware (`MAL-` advisory IDs or aliases) is rejected by this exception. Thus fixing one Critical or Medium can permit one new Medium or Low; fixing one Low can permit one new Low, but cannot fund a new Medium. Fixing one Critical cannot fund two new Low issues. Same-severity replacements are permitted by this policy and are not a guarantee that real-world risk has decreased. Counts are per package. Aliases are merged transitively across both versions, withdrawn advisories are ignored, and retained issues do not count as fixes. Severity uses the highest available known assessment from OSV labels and CVSS v3 vectors; unsupported or absent ratings without a usable label remain unknown. A confirmed baseline is required: Cargo or supported npm/pnpm lockfiles for Rust/Node, and fixed Python/Ruby/PHP declarations. Go and Java declarations alone do not qualify because dependency resolution can select a higher version. Missing, ambiguous, private, or unverified lock baselines never fall back to a manifest range's lower bound. Updates allowed under these conditions warn that vulnerabilities remain, report fixed vulnerabilities, new vulnerabilities, and existing vulnerabilities that remain, and do not receive `✓ OSV`. JSON update objects include `osv_risk_tradeoff` with versions and those groups. To require zero advisories again, use `--no-osv-risk-tradeoff` or set `osv_risk_tradeoff = false` in the global configuration. This does not disable OSV checks. Final lock verification for `--install` and `--install --refresh-lock` distinguishes newly locked vulnerable versions from vulnerable versions already present before the run. If every affected version was already locked and all newly added versions have no known vulnerabilities, depup keeps the updates, warns with the affected versions and advisory IDs, and exits with code 2. This also applies with `--no-osv-risk-tradeoff`: candidate selection still rejects vulnerable candidates. A newly added version affected by an existing advisory does not qualify as retained. Missing or unverified baselines and failed OSV lookups do not grant this exception, and malware remains rejected. Unchanged packages are outside this incremental check. For pnpm and Cargo, `--install --refresh-lock` can re-resolve dependencies within their declared constraints to remove retained vulnerable versions when a permitted fixed version exists. ```bash # OSV check runs by default depup # Same as above (explicit opt-in, overrides `osv = false` in global config) depup --osv # Keep OSV enabled but reject all candidates with known vulnerabilities depup --no-osv-risk-tradeoff # Disable OSV check for this run (overrides global config and default) depup --no-osv ``` - The OSV.dev API is public and does not require any authentication token. - Swift packages are not checked: OSV identifies Swift packages by their full repository URL, while depup identifies them by GitHub `owner/repo`, so the lookups would not match. - mise tools are not checked: each backend has its own version scheme and namespace, so they cannot be mapped onto a single OSV ecosystem. - Cargo git dependencies are not checked either. - A failed OSV lookup does not block the update: the version is adopted without a vulnerability check, so it does not get the `✓ OSV` mark. The failure is listed in the `Warnings:` section (the `errors` array in JSON) and does not change the exit code. If OSV removes every eligible update, the skip reason is `no eligible update without known vulnerabilities`, rather than `latest`. The normal text report lists the rejected versions and checks the manifest's baseline version for advisory IDs. This baseline is the version used to compare the manifest constraint; it is not a claim about the version installed in a lockfile. If the baseline cannot be matched to a published version, or its OSV lookup fails, the report says it is unconfirmed. In this case depup also checks up to five newer versions excluded only by `--age`, newest first. If one has no known vulnerabilities, the report shows that version and the exact UTC time when it satisfies the effective age policy. Range bounds, prerelease rules, rejected versions, and `--max-change` still apply. The waiting version is not installed early. Failed or incomplete lookups are reported without calling an unchecked version safe. JSON includes these skips even without `--verbose`, using reason `known_vulnerabilities` and an `osv` object (`skipped_versions`, `current_version`, `current_vulnerable`, `current_advisories`, optional lookup errors, and optional `safe_after_age` with `version` and `eligible_at`). After ordinary `--install` or `--install --refresh-lock`, Cargo and supported npm/pnpm locks are checked again after age verification. Each changed public-registry package is compared across all its coexisting versions before and after the run, so one fix cannot pay for multiple added versions and an issue remaining in another version is not a fix. A rejected or unconfirmed final result restores the affected install unit and exits with code 2. Unchanged packages are not certified. After a Cargo.lock age rollback, depup also checks rollback destinations that remain in the final lockfile, after any install recovery. A vulnerable destination is reported with its advisory IDs; an unsuccessful check is reported as unconfirmed. These notices do not change rollback selection or the exit code. `--no-osv` disables these additional checks too. **Priority order (highest first):** 1. CLI `--osv` or `--no-osv` (the two cannot be combined) 2. `osv` in `~/.config/depup/config.toml` 3. Built-in default (`true`: the check runs) To turn the check off for every run, set `osv = false` in the [Global Configuration File](configuration.md#global-configuration-file). #### Fallback Example When a candidate fails this policy, depup checks the next newest one. Advisory-free updates are marked with `✓ OSV`: ```text $ depup --install --include-pinned ./package.json (Node.js) — 9 updates, 41 skips @mui/icons-material 9.0.1 → 9.1.0 [minor] (2026/06/08 08:30) ✓ OSV @mui/material 9.0.1 → 9.1.0 [minor] (2026/06/08 08:29) ✓ OSV @tanstack/react-query 5.100.14 → 5.101.0 [minor] (2026/06/02 19:24) ✓ OSV next 16.2.6 → 16.2.9 [patch] (2026/06/09 23:02) ✓ OSV openai 6.39.1 → 6.42.0 [minor] (2026/06/03 22:39) ✓ OSV react 19.2.6 → 19.2.7 [patch] (2026/06/01 18:00) ✓ OSV react-dom 19.2.6 → 19.2.7 [patch] (2026/06/01 18:01) ✓ OSV @types/node 25.9.1 → 25.9.2 [patch] (2026/06/05 22:33) ✓ OSV 🔧 @types/react 19.2.15 → 19.2.17 [patch] (2026/06/05 20:10) ✓ OSV 🔧 Notices: OSV excluded 1 vulnerable candidate(s); these notices did not stop the run. Details: --verbose. Summary: 9 package(s) updated (4 minor, 5 patch) 41 package(s) skipped ``` In this run, no other dompurify candidate qualified after 3.4.8 was removed, so dompurify was not updated and is one of the 41 skips. When the fallback finds a safe version, the update line is followed by an excluded-candidate count; `--verbose` adds `↳ OSV skipped: ()`. Candidate exclusions are informational: depup avoided vulnerable versions as designed, so they do not affect the exit code. Normal text summarizes them under `Notices:` instead of repeating the advisory lists during progress. `--verbose` includes the full versions and advisory IDs. OSV lookup problems remain visible under `Warnings:`, and JSON keeps the original diagnostics in `errors`, so the details remain available in CI. ### Limiting Bumps (`--max-change`) Use `--max-change ` to limit how large a version bump depup may make: ```bash # Only allow patch bumps (1.0.0 → 1.0.5 is allowed, 1.0.0 → 1.1.0 is not) depup --max-change patch # Allow patch and minor bumps (1.0.0 → 1.5.3 is allowed, 1.0.0 → 2.0.0 is not) depup --max-change minor # Default — allow all bumps including major depup --max-change major ``` When every newer candidate exceeds the cap, the dependency is skipped with reason `max-change=`; if some newer candidates are within the cap, depup updates to the newest of them. A specification that needs no rewrite for the newest version within the cap, such as `4.x`, RubyGems' `~> 7.1`, or mise's `node = "22"`, is still reported as `max-change=` when a newer version exceeds the cap. Cargo git dependencies that track a tag work differently: only the newest tag is considered, and if it exceeds the cap, the dependency is skipped with `max-change=`. **Priority order (highest first):** 1. CLI `--max-change ` 2. `max_change` in `~/.config/depup/config.toml` 3. Built-in default (no cap) ## Version Specifiers and Rewriting This chapter covers the rules shared by every ecosystem: which specifiers count as pinned, how ranges are advanced, which formats are preserved, which constraints are left alone, how candidates are ordered, and how manifests are written. Rules that apply to a single ecosystem are collected in [Ecosystem Details](ecosystems.md#ecosystem-details). ### Pinned Versions and `--include-pinned` Pinned versions are treated as intentional and skipped as `pinned` by default: | Language | Example | Updated by default | |----------|---------|--------------------| | Node.js | `"1.2.3"` | ❌ | | Node.js | `"^1.2.3"`, `"~1.2.3"`, `"=1.2"` | ✅ | | Python | `"==1.2.3"`, Poetry `"1.2.3"` | ❌ | | Python | `">=1.2.3"`, `"^1.2.3"` | ✅ | | Rust | `"=1.2.3"` | ❌ | | Rust | `"1.2.3"`, `"^1.2.3"` | ✅ | | Go | `v1.2.3` with a `// pinned` comment | ❌ | | Go | `v1.2.3` | ✅ | | Ruby | `'1.2.3'`, `'= 1.2.3'` | ❌ | | Ruby | `'~> 1.2.3'`, `'>= 1.2.3'` | ✅ | | PHP | `"1.2.3"` | ❌ | | PHP | `"^1.2.3"`, `"~1.2.3"` | ✅ | | Java | Fixed version in Gradle (`'g:a:1.2.3'`) | ❌ | | Java | Strict version in Gradle (`1.2.3!!`) | ❌ | | Java | Maven hard requirement (`[1.0]`) | ❌ | | Java | Dynamic or range version in Gradle (`5.3.+`, `[1.7, 1.8[!!`) | ✅ | | Swift | `exact: "1.2.3"` | ❌ | | Swift | `from: "1.2.3"`, `.upToNextMinor` | ✅ | | mise | `node = "26.7.0"` | ✅ | Use `--include-pinned` to update pinned versions. Without it, depup does not look up pinned versions at all, so the output does not show whether a newer version exists. > **Caution**: Go and mise are exceptions. depup updates their exact versions even without `--include-pinned`. To keep a Go dependency as it is, add a `// pinned` comment to its line ([Go](ecosystems.md#go)). To keep a mise tool as it is, pass `--exclude `; the name is matched in every language, so `--exclude node` also excludes an npm package named `node`. ### Upper and Lower Bounds of Ranges depup respects upper-bound range constraints (both exclusive and inclusive): ```text ">=3.5.0,<4.0.0" → ">=3.9.1,<4.0.0" ">=1.0,<=2.0" → ">=2.0,<=2.0" "4.0.0..<5.0.0" → "4.99.0..<5.0.0" "4.0.0...4.9.9" → "4.9.9...4.9.9" "1.2.0 - 2.0.0" → "1.9.3 - 2.0.0" (npm hyphen) "1.0 - 2.0" → "2.0.9 - 2.0" (npm/Composer partial upper expands to `<2.1`) "[1.0,2.0)" → "[1.9.3,2.0)" (Maven-style) "[1.0,2.0]" → "[2.0,2.0]" (Maven-style) "[1.0,2.0.Final)" → "[1.9.3,2.0.Final)" (Maven qualifier) "[1.0,2.0-beta1-SNAPSHOT)" → "[1.9.3,2.0-beta1-SNAPSHOT)" (multi-part Maven qualifier) "[1.0,2.0[" → "[1.9.3,2.0[" (Maven alt upper bracket) "<4.0.0" → skipped (upper-bound only) ">1.0.0" → skipped (exclusive lower bound) "]1.0,2.0[" → skipped (exclusive Maven lower bound) ``` When a dependency has a range with an upper bound (e.g., `>=3.5.0,<4.0.0`, `>=1.0,<=2.0`, `4.0.0...4.9.9`), depup will: - **Not propose** versions that exceed the upper bound - **Accept** versions equal to an inclusive upper bound (`<=`, `...`) - **Preserve** the original constraint shape in the manifest file - **Update only the lower-bound side** to the newest compatible version within the range For npm/Composer hyphen ranges, a partial right-hand side like `1.0 - 2.0` is interpreted as a wildcard-expanded exclusive upper bound, so `2.0.x` versions remain candidates while `2.1.0` and later do not. In a range made of several comparators (`>=1.2.5 ^1.2.0`, `>=1.2.5, ~1.2, <2.0`), the implicit upper bound of `^`, `~`, `~>`, an x-range (`1.2.x`), or a partial version also counts as an upper bound. `^1.2.0` means `<2.0.0`; `~1.2` means `<1.3.0` in npm and Cargo but `<2.0` in Composer, as does `~> 1.2` in RubyGems; a bare `1.3` in Cargo is `^1.3`, so `<2.0.0`. The bound of the leading lower bound that the rewrite replaces with the new version (`^1.2.5` in `^1.2.5 <3.0.0`) is not used. Upper bounds retain their full version, including Python's `rc`, `post`, and `dev` suffixes and Composer's `RC` and patch aliases (`p`, `pl`, `patch`). For example, `>=1.0rc1,<1.0rc3` can advance to `>=1.0rc2,<1.0rc3`, but never to `1.0rc4`. Composer's `>=1.0.0 <=1.0.0p2` can advance to `>=1.0.0p2 <=1.0.0p2`. Multiple upper bounds use the same ecosystem-specific ordering as candidate selection; when equal, an exclusive limit wins. Ruby alphabetic segments remain literal versions: `<=1.0.x` never becomes the npm-style wildcard limit `<1.1`. Derived bounds use decimal string arithmetic. Large numeric release segments cannot disable Python prefix or compatible-release limits: `==18446744073709551616.1.*` still excludes `18446744073709551617.0.1`. Epochs are preserved too. The [Python version specification](https://packaging.python.org/en/latest/specifications/version-specifiers/) and [Composer version constraints](https://getcomposer.org/doc/articles/versions.md) describe these version forms. ### Preserving the Original Format depup preserves the original version range format. For specifiers whose width depends on how many segments are written, such as tilde (`~`), the segment count is kept too. The examples in the last group are exact versions, so they change only with `--include-pinned`: ```text # Operators and tilde width (npm / Cargo / Composer / RubyGems) "^1.2.3" → "^2.0.0" (caret preserved) "~1.2.3" → "~1.3.0" (tilde preserved) "~1.2" → "~1.9" (segment count preserved — adding a segment would narrow the range) "~1" → "~2" (single-segment tilde keeps its major-level width) "~1.2 <2.0.0" → "~1.9 <2.0.0" (tilde inside a comparator set keeps its segment count too) "~1, <5.0" → "~4, <5.0" (Cargo multi-requirement, tilde width preserved) "~> 7.0" → "~> 8.1" (RubyGems pessimistic operator, segment count preserved) ">=1.0.0" → ">=2.0.0" (range preserved) # Python (pyproject.toml) "requests (>=2.28,<3); python_version < '3.12'" → "requests (>=2.31,<3); python_version < '3.12'" (PEP 508 parentheses and marker preserved) "coverage [toml] >=7,<8" → "coverage [toml] >=7.6,<8" (PEP 508 extras spacing preserved) "'paramiko>=3.5.0,<4.0.0,'" → "'paramiko>=3.9.1,<4.0.0,'" (PEP 508 trailing comma preserved) "'paramiko>=3.5.0,<4.0.0'" → "'paramiko>=3.9.1,<4.0.0'" (TOML literal string quote preserved) # Wildcards, x-ranges, and partial versions "1.x" → "2.x" (wildcard shape preserved) "1.2.x - 2.3.x" → "1.9.x - 2.3.x" (npm hyphen range with x-range endpoints) "1.x.x" → "2.x.x" (all wildcard positions preserved) "1.2.*" → "1.3.*" (wildcard shape preserved) "v1.*" → "v2.*" (leading `v` preserved) "V1.*" → "V2.*" (Composer uppercase `V` preserved) "^1.x" → "^2.x" (npm caret + x-range, operator preserved) "~1.2.x" → "~2.3.x" (npm tilde + x-range, operator preserved) "=1.x" → "=2.x" (npm equality + x-range, operator preserved) "=1.2" → "=2.3" (npm partial comparator, operator preserved) # Gradle / Maven "5.3.+" → "5.4.+" (Gradle prefix preserved) "5.3.+!!" → "6.1.+!!" (Gradle strict dynamic prefix preserved) "[1.7, 1.8[!!" → "[1.7.36, 1.8[!!" (Gradle strict range without a preferred version) prefer("1.7.25") → prefer("1.7.36") (Gradle rich version inside a strict range) "org.slf4j:slf4j-api:[1.7, 1.8[!!1.7.25" → "org.slf4j:slf4j-api:[1.7, 1.8[!!1.7.36" (Gradle strict range shorthand with prefer) # Gradle / Maven exact versions (updated only with --include-pinned) "1.2.3!!" → "2.0.0!!" (Gradle strict preserved) "[1.0]" → "[2.0]" (Maven hard requirement preserved) "[1.2.3.Final]" → "[1.3.0]" (Maven hard requirement with qualifier) group = "com.google.guava", name = "guava", version = "32.1.2-jre" → version = "33.4.0-jre" (Gradle Kotlin map notation) junit = "junit:junit:4.13.2" → "junit:junit:4.13.3" (Gradle version catalog library) guava = "32.1.2-jre" → "33.4.0-jre" (Gradle version catalog version reference) "group:name:1.0.0:classifier@zip" → "group:name:1.1.0:classifier@zip" (Gradle classifier/extension preserved) ``` ### Constraints Left Unchanged Constraints that cannot be rewritten safely are skipped instead of being rewritten partially. If a newer version exists, the reason is `parse error: constraint cannot be updated safely`; otherwise the dependency is reported as `latest`. Examples: - OR constraints in npm/Composer (`^1 || ^2`), including Composer's backward-compatible single-pipe spelling (`^1 | ^2`) - Exclusion constraints containing `!=` (`!=1.2.3`, `>=1.0, !=1.5.0, <2.0`), or Composer's `<>` spelling of not-equal (`>=1.0 <>1.5.0 <2.0`, `>=1.0,<>1.5.0,<2.0`) - Upper-bound-only constraints (`<4.0.0`, `<=2.0`) - Strict lower bounds (`>1.0.0`) - Maven-style ranges without a lower bound (`(,2.0]`) or with an exclusive lower bound (`]1.0,2.0[`) npm has no `!=` comparator, so an npm constraint containing one is not processed at all. The following are not processed at all (rather than skipped), so they do not appear in the output: - Floating selectors, which always point to the newest version: `"*"`, npm dist-tags like `"latest"`, and Gradle dynamic selectors (`"latest.release"`, `"latest.integration"`, `"latest.milestone"`, and any user-defined `latest.`). Rewriting them would turn them into exact versions. - Multi-segment fully-floating wildcards without a numeric anchor (Composer's `*.*`, `v*`, `V*`, `x.x`) and empty Maven ranges (`[,]`, `(,)`). Accepting them would cause phantom updates or "always outdated" misjudgments. - Wildcard tokens (`x`/`X`/`*`) followed by numeric segments (`1.x.3`, `^x.0.0`). They are invalid x-ranges in node-semver / semver and would produce malformed output, so they are rejected at parse time. ### Candidate Ordering and Prereleases Version candidates are compared with ecosystem-specific rules: | Ecosystem | Ordering | |-----------|----------| | Node.js / Rust / Go / Swift | SemVer. A purely numeric suffix such as `1.0.0-1` also counts as a prerelease and sorts before `1.0.0`. Build metadata is ignored, so `1.1.3` and `1.1.3+spec-1.1.0` do not trigger a metadata-only update | | Python | PEP 440 normalization and ordering | | Ruby | RubyGems segment ordering; versions containing letters or hyphens are prereleases | | PHP | composer/semver rules; patch aliases (`-p1`, `-pl1`, `-patch1`) sort after the corresponding release | | Java / mise | Gradle's documented version ordering | Numeric components are compared without a fixed integer-size limit, so very large numbers do not overflow. Prereleases (alpha, beta, rc, canary, dev, and similar) are removed from the candidates while the current version is stable. If the current version is already a prerelease, prerelease candidates are kept so it can move on to the next prerelease or to the stable release. There is no option to offer prereleases to a stable dependency. Versions whose suffix marks them as deprecated are treated the same way, so `serde_yaml 0.9.33` is not moved to `0.9.34-deprecated`. ### Writing Rules Files are saved through atomic replacement using a separate temporary file for each write, including simultaneous writes to different manifests on Windows. If a temporary file cannot be created, depup leaves any existing file at that path untouched; cleanup only removes temporary files that the write created. depup only rewrites the dependency declarations it parsed. Other sections of a manifest are left untouched even when they contain package names and versions — for example `overrides` in `package.json`, `replace` / `provide` / `conflict` in `composer.json`, and metadata tables in `Cargo.toml` or `pyproject.toml` ([Ecosystem Details](ecosystems.md#ecosystem-details) lists the exact sections). When a value is rewritten, the surrounding syntax is kept; in TOML manifests, both basic strings (`"..."`) and literal strings (`'...'`) keep their quote style. If the same dependency key is declared more than once in a manifest, or several dependencies share one Gradle version variable or version-catalog `version.ref`, depup cannot tell which declaration to change. It refuses the write and reports an error (exit code 2) rather than silently changing a declaration that should stay as it is, such as a pinned one. The error is reported once per dependency, even when several of its declarations had an update. In `Cargo.toml`, declarations that point to the same source with an identically written version count as one dependency and are rewritten together, so they are not refused (see [Rust](ecosystems.md#rust)). Updates that leave the manifest as written, such as a Cargo git dependency that follows a branch, are never refused. ## Refreshing Lockfiles (`--install --refresh-lock`) Use `depup --install --refresh-lock` to re-resolve pnpm and Cargo lockfiles within the manifest requirements, including transitive dependencies even when no direct dependency changes. Each shared workspace lock is refreshed once. Ordinary `--install` retains its existing behavior. pnpm first runs `update --no-save --lockfile-only --ignore-scripts`, using options supported by pnpm 10 and 12. The declared ranges stay unchanged and scripts do not run during resolution. Workspace resolution includes all members and the root. After verification succeeds, `pnpm install --frozen-lockfile` installs the verified resolution with the project's normal script permissions. The same effective age setting is passed to both commands. A pnpm version that rejects these options fails explicitly; depup does not retry with weaker options. Other Node package managers are unsupported for refresh. With no existing lock, pnpm must be identified by `pnpm-workspace.yaml` or the `packageManager` field. Cargo runs `cargo update`, then applies its existing age rollback and final verification. Both ecosystems check newly introduced public registry versions against OSV after age verification. An OSV error, failed age verification, a changed external git/private-registry/remote-tarball identity, or inconsistent direct Tauri npm/Cargo versions causes the affected shared install unit to be restored. When creating the first `Cargo.lock`, depup accepts Git dependencies whose declared `rev` is a full 40-character commit hash and matches the commit Cargo locks. Branches, tags, abbreviated hashes, and named refs still cause the new lock to be removed. Versions from crates.io still undergo the configured age and OSV checks. For Cargo age verification, restoration depends on violating or unverified versions still in the final lock that this run introduced, or problems that prevented the audit from completing. Young versions already in the pre-run lock, including a rollback to a young pre-run version, produce warnings and exit code 2 while retaining other updates. The refresh is still reported as `completed`; `changed` is `false` if the rollbacks leave the lock unchanged from before the run. Unrelated projects continue. Local workspace/path packages are not public-registry audit targets. This incremental OSV check does not certify unchanged versions already in the lock. `--no-age` and `--no-osv` retain their existing configuration precedence. When a changed package retains a vulnerable pre-run version alongside newly added advisory-free versions, the refresh remains `completed`, the updates are kept, and the command exits with code 2. Rejection messages list only affected versions, separating previously locked versions from newly added ones; advisory-free versions are not labeled vulnerable. Refresh cannot be combined with `--only`, `--exclude`, or `--max-change`, including a global `max-change` default; depup rejects the combination before changing files. Language filters still apply. A dry run never starts the package manager. The `Lock refresh` result and JSON `lock_refreshes` array report each scope separately; transitive changes do not increase direct update counts. PM failures return exit code 1; verification failures return 2, with 1 taking precedence when both occur. Recovery retains install artifacts and preserves external file edits, as described below. ## Running the Package Manager (`--install`) With `--install`, depup runs each project's package manager after writing the manifests, so lock files and installed packages follow the new versions. - An install runs only for manifests that received at least one update, and never with `--dry-run`. An update that could not be written to the manifest does not count. - Node installs run at the shared pnpm workspace root or the manifest directory. With `--only` or `--exclude`, Rust updates are grouped at their shared Cargo.lock directory (or workspace root for a new lock). With `--only`, PHP installs run beside each updated composer.json. Other installs use the target directory (PATH) without [`.depup`](configuration.md#depup-configuration-file), or the deepest listed directory containing the updated manifest when `.depup` is present. - Installs run one at a time, in directory path order, and each language runs at most once per directory. The package manager's output is captured instead of streamed; its stderr is printed only when the install fails. Existing text manifests and lock files keep their uniform LF or CRLF line endings, including on Windows. A UTF-8 byte order mark at the start of a manifest (written, for example, by `Set-Content -Encoding UTF8` in Windows PowerShell 5.1) is ignored while reading and kept when the file is written back. depup restores each file's original convention after a package-manager command or a tracked Cargo age adjustment, without changing the resulting versions or adding or removing a final newline. New files use the manager's convention. Files with mixed line endings or no line breaks, binary files, and mise sidecar metadata are left as written by the manager. For mise, a successful `mise install` is followed by a targeted lock refresh only when existing platform metadata was lost. The refresh preserves the original platform coverage and lock format; a failure or incomplete result follows the same recovery path as an install failure. See [mise lockfile platforms](ecosystems.md#lockfile-platforms). If an install fails, depup restores that project's manifests and known package-manager files, then exits with code 1 (`Error: Some package manager installs failed`). This also applies to command startup, policy, scope preparation, snapshot, and Gradle Wrapper failures. Jobs sharing a Cargo lock, a pnpm workspace, a Tauri project, or a Gradle Wrapper succeed or recover together; remaining jobs in a failed unit are skipped. Independent projects continue and keep their successful changes. If a shared mise or uv scope cannot be verified safely from its active configuration, preparation fails before running the manager and the affected writes are recovered. This also applies when started at the workspace root. Examples include complex workspace patterns such as `**`, custom mise config paths, nested mise monorepo roots, and monorepo settings in alternate containers such as `.mise/config.toml`. For nested mise projects, run `depup --install --include-pinned --mise sub` from the parent mise project, with the member path in place of `sub`. depup targets the member and includes the parent's mise lockfiles and dependency metadata in its recovery scope. If a parent uv or mise project has managed files outside the permitted recovery scope, depup stops before running the package manager and restores the member's writes. For uv, run depup from the shared workspace root. A mise dependency metadata path such as `.mise/locks` that follows a symlink outside that scope also stops preparation, leaving the external metadata untouched. Confirmed file relationships are retained even when a job has a policy, scope preparation, or snapshot error, so that error blocks all jobs in the shared unit. Manifest recovery uses the bytes saved immediately before depup wrote the file. Package-manager files are saved before install; for a file both depup and the manager write, such as `go.mod` or Wrapper properties, the manifest's earlier copy takes precedence. Known locks created by a failed install are removed. Binary Wrapper files, script permissions, and existing symlink structure are preserved. Installed artifacts and caches (`node_modules`, `.venv`, `vendor`, `target`, and similar directories) are retained. Recovery applies to reported failures, not interruption or abrupt process termination. A file changed outside a package-manager command, or a replaced file/parent symlink, is kept. depup reports the remaining change and saves the original bytes to an exclusive recovery copy, printing its location and manual recovery instructions. Copy or permission failures are reported too. After an install failure, the unit's other files are still restored, because the files from before the run are the ones that belong together; the report warns that the kept files may not match the restored ones until they are recovered. A failed lock verification keeps the whole unit instead (see [When the Final Lockfile Fails the Age Audit](#when-the-final-lockfile-fails-the-age-audit)). Do not edit manifests or managed files during install: edits made while a package-manager command is running cannot always be distinguished from that command's own writes. Rust and Node age audits run before recovery and skip a unit whose install already failed, so an audit cannot change a lock that is being restored. Other projects and unchanged existing locks are still audited. A lockfile that keeps a version this run added and that fails the age audit restores its unit as described in [When the Final Lockfile Fails the Age Audit](#when-the-final-lockfile-fails-the-age-audit) (code 2); a violation by a version that was already locked before the run is reported with code 2 but keeps the resolved files. Exceptional Rust audit or restoration failures attempt the snapshot recovery described below. If an install or its failure recovery also fails, code 1 takes precedence. An unchanged `--install` run does not rerun package managers when there are no manifest updates. Text and diff reports describe the writes before install; stderr then lists restored files, newly created files removed, and changes requiring manual recovery, and states whether the project files are back to their state before the run. `--json --install` emits and flushes one final result after recovery and audits, even on install failure. Canceled updates, including conflicts and lock-only Git updates, appear in `failed`, with their reason, rather than `updates`. When some files could not be restored, the reason ends with `recovery incomplete: some files were kept for manual recovery`. When a failed lock verification left the whole unit in place, it ends with `recovery incomplete: a file changed outside depup, so no file of this install was restored and all were kept for manual recovery`. ### When the Final Lockfile Fails the Age Audit With an active age policy, depup audits each Cargo and Node lockfile after the installs and only then decides whether to keep the run's changes. It restores an install unit (the manifests and lockfiles one install shares) to its state before the run when the final lockfile: - keeps a version this run added, meaning one that was not locked before the run, that is newer than the age filter allows or whose publication date could not be confirmed; - could not be checked: the `Cargo.lock` or npm/pnpm lockfile could not be read or listed, the Cargo audit did not finish, the `Cargo.lock` before the run could not be read, or `Cargo.lock` was missing after the install; or - changed outside depup's audit after the Cargo rollbacks, so the audited bytes cannot be adopted. This applies the age filter to everything the run brings in, including transitive dependencies resolved by the package manager, rather than leaving new versions in the lockfile for the next build. The Cargo audit first tries to roll young versions back (see [Auditing `Cargo.lock`](#auditing-cargolock-rust)); only the versions still failing afterwards count. Versions that were already locked before the run never restore the unit by themselves. They are reported, with exit code 2, and the update is kept. Packages outside the release-date audit (private registries, Git, and local sources) do not restore the unit either, and lockfiles of unsupported package managers (Yarn, Bun, npm format 1) keep their existing report-only behavior. For Node, depup reads the versions locked before the run from the lockfile before installing (`pnpm list --lockfile-only` or the npm lock). If that read fails, it cannot tell existing versions from new ones, so any failing version restores the unit; the reason says so. Restoration works like install-failure recovery: depup writes back the bytes saved before the run, removes lockfiles the install created, and keeps installed artifacts (`node_modules`, `target`, and similar). It never overwrites a file that changed outside depup's own operations, and if any file of the unit changed that way, it restores none of the unit's files. The package manager succeeded, so the files left in place still belong together, whereas restoring only the manifest would leave it out of step with the kept lockfile (`cargo --locked` would then fail). Each changed file keeps this run's changes, a recovery copy of its original is saved, and the report says that recovery was skipped and that the files were not checked against each other. Units connected through a shared lock, a pnpm workspace, or a Tauri project are restored together; an independent install in the same directory, such as a Go module or Gemfile next to `Cargo.toml`, keeps its changes. The canceled updates appear in `failed` with the reason (`lock verification failed; update canceled: ...`), and the run exits with code 2. Run the package manager again afterwards to bring installed artifacts back in line with the restored lockfile. ```text Updates canceled — final lock verification failed Cause: Cargo.lock keeps versions this run added that do not pass --age: leaf 1.2.0 (newer than --age) Scope: /path/to/project restored Cargo.lock restored Cargo.toml Recovery: project files restored to their state before this run. Next: re-run the package manager to align installed artifacts with the restored lockfile. Installed artifacts (such as node_modules or target) were retained. ``` A pnpm update-target mismatch (an override or resolution that left a direct dependency at another version) is not an age failure; it keeps the files for inspection and exits with code 2. Cargo `--install --refresh-lock` also retains the refresh when age violations involve only pre-run versions. See [Refreshing Lockfiles](#refreshing-lockfiles---install---refresh-lock) for its additional verification and recovery conditions, including OSV. ### Commands per Package Manager The package manager is detected from files in the directory where the install runs. Node members of a detected pnpm workspace share its root install and lock audit; other package managers do not search parent directories. Within each language, the first match wins: | Language | Detected by | Command | |----------|-------------|---------| | Node.js | `pnpm-lock.yaml` | `pnpm install --no-frozen-lockfile` | | | `yarn.lock` | `yarn install` (with `YARN_ENABLE_IMMUTABLE_INSTALLS=false`) | | | `bun.lock` / `bun.lockb` | `bun install` | | | `npm-shrinkwrap.json` / `package-lock.json` | `npm install` | | | No lockfile: `package.json` `packageManager` (`npm@…`, `pnpm@…`, `yarn@…`, or `bun@…`) | The declared manager's command above | | | No lockfile or recognized `packageManager`: `pnpm-workspace.yaml` | `pnpm install --no-frozen-lockfile` | | | Otherwise, `package.json` with `.yarnrc.yml` | `yarn install` (with `YARN_ENABLE_IMMUTABLE_INSTALLS=false`) | | | Otherwise, `package.json` with `bunfig.toml` | `bun install` | | | Otherwise, `package.json` alone | `npm install` | | Python | `uv.lock` | `uv sync` | | | `poetry.lock` | `poetry lock`, then `poetry install` (below) | | | `requirements.lock` / `requirements-dev.lock` | `rye sync` | | | `Pipfile.lock` | `pipenv install` | | | `pyproject.toml` / `requirements.txt` | `pip install -e .` | | Rust | `Cargo.toml`, including `src-tauri/Cargo.toml` | A selective `cargo update` from the Cargo workspace root | | Go | `go.mod` | `go mod tidy` | | Ruby | `Gemfile` | `bundle install` | | PHP | `composer.json` | `composer update` | | Java | `gradlew` | `./gradlew dependencies` | | | `build.gradle` / `build.gradle.kts` | `gradle dependencies` | | Swift | `Package.swift` | `swift package resolve` | | mise | any of the [mise config files](ecosystems.md#files) | `mise install` | Node lockfiles take precedence over `packageManager` and configuration files, even when they disagree. Without a lockfile, the hints above apply to ordinary installs, `--only`, and `--refresh-lock` alike. Unsupported or malformed `packageManager` fields fall through to the configuration files. Tools listed in `mise.toml` do not select the Node package manager. `--verbose` reports the file or field used for the selection before install starts, for example `pnpm (detected from pnpm-workspace.yaml)`. If none of the listed files is present, no install runs for that language, and nothing is printed. When the age filter is active, pnpm, uv, and mise also receive the age setting ([below](#transitive-dependencies-and-the-age-filter)), and `uv sync` always runs with `UV_MALWARE_CHECK=1` ([uv Malware Check](#uv-malware-check-preview)). In CI (`CI=true`), pnpm and Yarn 2+ default to installs that do not change the lockfile. depup has just rewritten the manifest, so such an install would always fail. depup therefore passes `--no-frozen-lockfile` to pnpm and `YARN_ENABLE_IMMUTABLE_INSTALLS=false` to Yarn, so the lockfile follows the rewritten requirements (Yarn 1 ignores this setting). When `--install` processes a PHP project, depup runs `composer update` rather than `composer install`. `composer install` reuses the existing lock file and cannot reflect constraints that depup has just changed in `composer.json`; `composer update` resolves those constraints and refreshes `composer.lock`. For Poetry projects, depup refreshes the lock before `poetry install`, because `poetry install` in Poetry 1.8 and later fails when the dependencies in `pyproject.toml` no longer match `poetry.lock`. depup runs `poetry --version` with the same executable and environment as the install, then runs `poetry lock` on Poetry 2 and later or `poetry lock --no-update` on 1.x. Both keep locked versions where possible. If the version cannot be determined or the lock refresh fails, depup does not run `poetry install`; it treats the install as failed and restores the files. With ordinary `--install`, depup updates each affected Cargo lockfile from its workspace root. Cargo receives `--package ` for each applied update with a matching lock entry, including the locked version and source. Renamed dependencies use their real crate name, and Git branch updates use the same selectors. Cargo reconciles changed Git tags and dependencies without an old lock entry as part of resolving the new requirements. When no package selectors are needed, depup runs `cargo update --workspace`. Unrelated locked packages retain their versions, while dependencies needed by the selected updates can still change. Cargo resolves the initial lockfile when none exists. An unreadable lock or an ambiguous target is an install failure. Use `--install --refresh-lock` for a full re-resolution. With `--only` and `--install`, Composer runs `composer update --with-all-dependencies --minimal-changes -- ...`. Dependencies of the selected packages, including other root requirements, change only when needed; their current locked versions are kept when they remain compatible. This selective install requires Composer 2.7 or newer. Older versions report an unsupported-option install failure; depup does not fall back to a full update. If composer.lock does not exist, Composer resolves the initial lock with a full update. Composer keeps its full-update behavior without `--only`, and its older versions remain supported. Other package managers use the commands in the table. For Go, `go mod tidy` synchronizes `go.mod` and `go.sum` with the source code, including tests and platform-specific imports. It records module content checksums as well as `go.mod` checksums so that subsequent builds have the required sums. Unlike argumentless `go mod download`, it also adds missing indirect requirements and removes unused requirements and sums. This may change `// indirect` comments and, when dependencies require a newer Go release, the `go` or `toolchain` directives. Projects that commit `vendor/` must run `go mod vendor` afterwards to refresh it. A tidy failure is reported as an install failure. ### Transitive Dependencies and the Age Filter The age filter decides which versions depup writes into manifests. Whether it also reaches transitive dependencies during `--install` depends on the package manager. An install that resolves multiple manifests uses the strictest policy of those manifests, including members with no updates ([Resolution Priority](#resolution-priority)): | Package manager | What depup passes | Transitive dependencies | |-----------------|-------------------|-------------------------| | pnpm | Both `npm_config_minimum_release_age=` and `pnpm_config_minimum_release_age=` | Native filtering on supported pnpm versions, plus a post-install lock audit. The two prefixes cover pnpm 10 and pnpm 11 or later | | uv | `--exclude-newer ` | Filtered when uv resolves them | | Cargo | Nothing; depup audits `Cargo.lock` after `cargo update` | crates.io crates that violate the age filter are rolled back ([below](#auditing-cargolock-rust)) | | mise | `--minimum-release-age ` and `MISE_MINIMUM_RELEASE_AGE` | Fuzzy top-level versions are filtered when timestamps are available. Only the `npm:` and `pypi:` backends pass the cutoff to unpinned transitive dependencies; exact pins and locked top-level versions bypass native filtering | | npm | Nothing | Resolved versions are verified after install for package-lock v2/v3 | | Yarn, Bun | Nothing | Lock audit is currently unsupported; an active age policy produces exit 2 | | pip, Poetry, Rye, Pipenv, Go, Bundler, Composer, Gradle, SwiftPM | Nothing | Not filtered; only direct dependencies follow the age filter | For uv with an active age policy, depup first runs `uv lock --exclude-newer `, then `uv lock` without the temporary cutoff, and finally `uv sync --locked`. The second step restores uv's native configuration, including persistent cutoffs and cooldown durations, so the result can be used by ordinary `uv lock --check` and `uv ... --locked` commands. depup compares both locks and permits changes only to the global cutoff and its duration representation; resolved packages, sources, artifacts, and other settings must remain identical. If either lock step fails or the resolution changes, depup reports an install failure, skips environment synchronization, and restores the managed project files. This also applies when a selected version has new wheels or other files uploaded after the cutoff; the error identifies the changed packages. Retry once those files satisfy the age policy, or review the project age policy. With no active age policy, uv still runs a single `uv sync`. With `--verbose`, depup prints a note naming the package managers used in the run for which the age filter covers direct dependencies only. With `--no-age` and no project or native policy, nothing age-related is passed and neither the Rust nor Node lock audit runs. Native package/index exemptions configured in uv still follow uv's own semantics. #### Auditing Node Lockfiles With an active age policy, `--install` checks the actual resolved versions of direct and transitive dependencies, including dev dependencies. It also checks unchanged locks on subsequent runs and after another install fails, including an install of another language in the same directory (such as a Gemfile next to `Cargo.toml`). Only the locks of a failed unit, which depup restores, are skipped. If no lock exists and no install is needed, no lock audit runs. - pnpm: reads the lock graph using `pnpm list --depth Infinity --lockfile-only --json`. Shared workspaces include all projects and the root, with the strictest member policy. Missing required dependencies or CLI warnings make the graph unverified. - npm: reads the `packages` table of `npm-shrinkwrap.json` (preferred) or `package-lock.json`, format 2 or 3, and verifies required dependencies across packages and workspaces. - Yarn, Bun, and npm format 1: currently reported as unsupported, with exit code 2 when age is active. Only packages whose registry source can be confirmed as public npm are queried. For pnpm, generated graph URLs alone are not source evidence; the effective registry configuration is checked too. Aliases use the real package name. Local, workspace, and Git dependencies are outside this release-date audit. Private or unknown registry sources are reported as unverified without querying public npm for their names. Missing publication dates, read or lookup failures, changed lock contents during the audit, and the 180-second time limit also produce exit code 2. Publication dates are checked independently of the update-candidate filters, so deprecated or non-latest locked versions can be verified. If `pnpm config get --json` succeeds without writing to stderr, depup treats empty or whitespace-only output, JSON `null`, and bare `undefined` (as printed by pnpm 10.11.0) as unset. An unset scoped registry falls back to the verified default registry. An unset default registry remains unverified; depup does not query public npm for those package names. pnpm 10 can return an unquoted registry URL even with `--json`. If JSON parsing fails, depup accepts the trimmed output only when it is a single absolute URL without internal whitespace or control characters. The same public-registry checks apply as for a JSON string. Invalid output, command failures, and stderr leave the registry unverified, without querying public npm for those package names. Node auditing does not rewrite the lockfile. Violations always show the actual locked version, publication date, and cutoff; unverified entries always show their reason. Native age filtering helps prevent new resolutions, but does not replace this final verification. When a version the run added fails, the install unit returns to its state before the run (see [When the Final Lockfile Fails the Age Audit](#when-the-final-lockfile-fails-the-age-audit)). Before writing updates for `--install`, depup also audits an existing `pnpm-lock.yaml` when age is active. It uses the same shared workspace policy as install and the final audit, including stricter settings in members without updates. An update on either side of a connected Node/Cargo install can trigger this check, even if the Node project has no update of its own. A violation, unverified entry, lock read or graph error, or unreadable/invalid age setting stops that scope: its manifests remain unchanged, its install is skipped, and its planned updates are counted as failed (exit code 2). Independent scopes continue. Tauri projects connected through the same Node or Cargo workspace are stopped together so synchronization cannot be applied to just one side. When a Cargo lookup fails, depup rechecks the manifest from successful Cargo execution contexts using read-only `locate-project`. Consistent successful answers confirm its root; conflicting answers or no successful answer leave it unverified. Rust and associated Node scopes whose independence remains unverified are stopped with the lookup reasons. Confirmed separate roots continue unless a shared Node install connects them; an unresolved Rust helper alone does not connect confirmed roots. Stopped Node and Cargo scopes are excluded from post-install auditing and Cargo lock rollback. Remaining independent Rust installs run a selective Cargo update at their confirmed roots. A failed root lookup is reported as a preparation failure. Clean scopes and unchanged independent locks retain their final audits. Dry runs and runs without `--install` do not perform this preflight. For confirmed age violations, depup prints manual rebuild commands: `pnpm clean --lockfile`, followed by `pnpm install` with both `npm_config_minimum_release_age` and `pnpm_config_minimum_release_age`. The minute value is calculated from the fixed cutoff at display time and rounded up. If you wait before running these commands, rerun depup to regenerate the instructions. [pnpm 11 or later](https://pnpm.io/blog/releases/11.0) is required for `clean --lockfile`, which deletes `node_modules` and the lockfile. Rebuilding resolves the entire lockfile, so unrelated dependency versions can change. depup does not run these commands or relax age exclusions. Read, metadata, or verification errors without a confirmed violation do not produce a clean/rebuild suggestion. With `--refresh-lock`, that pnpm scope is not refreshed either; the refresh results report it as `failed` with the preflight reason. #### Auditing `Cargo.lock` (Rust) For Rust, depup checks all crates.io versions in the final `Cargo.lock`, including unchanged direct and transitive dependencies. It first rolls back newly resolved violations where the original manifest constraints and the pre-install minimum permit it, then performs a separate read-only verification of every final locked version: ```text ⠙ Auditing hyper [██████████████████████▓░░░░░░░] 18/24 (6s) . — 1 crate(s) rolled back to satisfy --age: hyper 1.11.1 → 1.11.0 ``` depup limits crates.io API requests, retries included, to one per second and reuses metadata fetched during the run. Rollback and final verification each have a separate 180-second budget per `Cargo.lock`. Final verification reads immutable publication dates from the [official sparse index](https://doc.rust-lang.org/cargo/reference/registry-index.html), with at most eight concurrent requests; missing dates or young versions needing publisher verification use the rate-limited API. This metadata includes yanked locked versions. They remain excluded from normal update and rollback candidates; the last-resort restoration below applies only to a version already locked before the install. Unchecked entries are reported and produce exit code 2, including on a no-change retry. An unreadable existing lock, or a missing lock after an install was needed, cannot pass. A lockless project with no updates does not run an install or lock audit. An unreadable pre-install lock also disables automatic rollback because its minimum cannot be established safely. Crates from registries other than crates.io are not audited and keep their locked versions, because their release dates cannot be looked up on crates.io. A crate is rolled back to the following version: - For a direct dependency that depup updated in this run, the version shown in its update line is preferred. That version has already passed the age filter, the OSV check, and `--max-change`. - For any other crate, the newest stable (non-prerelease) version from the same semver series that satisfies the age filter and is older than the locked one. In both cases, a rollback never goes below an available pre-install version from the same semver series. Pre-install versions absent from usable crates.io metadata, including yanked versions and versions with unreadable release dates, are excluded from this minimum. depup first chooses an older compatible non-yanked version that satisfies the age policy. If there is no normal rollback target, depup separately checks whether an older stable version from the same semver series was locked before the install and is confirmed as yanked by crates.io. Only such a version with a verified release date at or before the age cutoff can be restored; publisher exemptions do not admit younger or undated yanked versions through this exception. This preserves unrelated eligible updates instead of canceling the whole install because its previous version was yanked. The restoration always produces a warning identifying the crate and the yanked pre-install version. Versions absent from the pre-install lock are never introduced through this exception. A failed lookup, an unknown release date, or a Cargo requirement that prevents the restoration leaves the violation unresolved. Final age verification and OSV checks still apply; any remaining failure follows the usual recovery behavior. If only versions below an available minimum satisfy the age filter, the crate goes back to that pre-install version, so depup undoes only the change the install made. When that pre-install version is itself newer than the age filter allows, it remains an unresolved violation (exit code 2) and is reported on a separate yellow line instead of as rolled back: ```text . — 1 crate(s) returned to the version locked before the install, which is also newer than --age: foo 1.50.1 → 1.50.0 ``` A version that was already locked before the install and left unchanged is never exempted merely because it was already locked; it also produces exit code 2. Because depup does not roll back below it, it is listed in its own yellow section, apart from the crates this run could not roll back: ```text . — 1 crate(s) already locked before the install do not satisfy --age (depup never rolls back below a pre-install version): toml_datetime 1.1.2+spec-1.1.0 ``` Crates such as `cc` and `syn` are rolled back one at a time with `cargo update -p @ --precise `. depup processes dependents before their dependencies, including relationships through crates outside the rollback list. Before resolving conflicts together, it retries failed individual rollbacks when the lock or requested version has changed; it does not repeat a failed attempt against the same lock and target. Individual rollbacks can still fail for groups of crates that pin each other with `=`, such as `wasm-bindgen`, `js-sys`, `web-sys`, `wasm-bindgen-futures`, and `wasm-bindgen-test`. `--precise` keeps the crates that depend on the target at their locked versions, and their `=` requirements do not allow an older target. When two or more crates in the group have no dependent within it, every one-at-a-time rollback conflicts. Instead, depup rolls back the conflicting crates together: 1. It copies what Cargo needs to resolve the workspace into a temporary directory: the root and member `Cargo.toml` files, empty placeholders for their target source files, and `Cargo.lock`. 2. It adds temporary pins to the copy and runs `cargo update` for those crates at once. Crates that depend on each other are resolved as one group, largest group first, so one crate that cannot be rolled back does not hold up the others. Within a group, depup first pins every crate to its rollback version; if Cargo cannot satisfy that, it pins only the crates that nothing else in the group depends on, and then allows any version up to the rollback version. 3. It removes the pins, tidies the lock file, and replaces the project's `Cargo.lock` with it. 4. It runs `cargo update --workspace --locked` in the project to confirm that your `Cargo.toml` accepts the new lock file as is. If it does not, the previous `Cargo.lock` is restored. Your `Cargo.toml` files are never modified. If `Cargo.toml` or `Cargo.lock` changes while this is in progress, depup keeps your change and gives up on these crates. If the previous `Cargo.lock` cannot be restored after a failed check, depup says so even without `--verbose` and tells you where it saved the previous content. Cargo runs in the project directory, so the project's `.cargo/config.toml` (for example, source replacement) and `rust-toolchain.toml` (or `rust-toolchain`) also apply when the copy is resolved. Before restoring partial rollbacks, depup makes one final attempt to solve the remaining age violations together, keeping the destinations of successful rollbacks pinned as well. It uses at most 40 seconds of the existing 60-second recovery budget and reserves 20 seconds for selective restoration if the attempt fails. The original manifest requirements, pre-install minimum versions, final age verification, and OSV checks still apply. If an external change was observed during the audit, this final solve is skipped. A compatible resolution can therefore retain eligible direct updates even when the normal rollback budget ran out. If an unresolved install-time version remains related to a partial rollback, depup returns that partial change to the combination locked immediately after the install, including related dependencies automatically changed, added, or removed by Cargo. It uses the remaining recovery budget and the same temporary-workspace verification. Related crates are identified by dependency paths in the install-time and current locks, so independent successful rollbacks and external changes stay in place. Changes observed outside an audited Cargo operation are excluded from restoration. Lock entries are compared by the packages their dependency lists name, not by the text: when Cargo moves a crate, it also rewrites references in the crates that depend on it (for example, `"toml 0.9.8"` becomes `"toml 0.9.5"` when two `toml` series are locked). A single-crate `cargo update -p --precise ` unlocks that crate and every crate it depends on in the previous lock, so Cargo may point another crate's reference to one of them at a different version of the same name and source, as far as that crate's requirement allows. With a requirement that spans semver series, such as `windows-sys >=0.52, <0.62`, the new version can be in another series. Such a rewrite belongs to the audited operation. A resolution solved in the temporary workspace is written back only after depup checks that the original lock has not changed, so every difference it makes is depup's own, including references that Cargo rewrote in crates unrelated to the rollback; none of them counts as an external change. Restoration cannot introduce a version absent from the install-time lock. Ambiguous versions or sources stop restoration with a warning. A restored partial change is reported with its reason and remains unresolved (exit code 2); a failed restoration also produces a warning. When temporary pins are removed during restoration, Cargo may prune a supporting dependency that is no longer needed. depup accepts this only for a dependency reachable from a restored member in the install-time lock, with no version from its original semver series remaining. An explicitly restored member must still return to its install-time version. Selective restoration also unlocks versions introduced in another series by a rollback. This prevents a broad version requirement from retaining that series and dropping a required restoration target when temporary pins are removed. Unrelated locked versions and verification with the original manifest using `--locked` are still enforced. Selective restoration also accepts Cargo's reference rewrites across semver series when temporary pins unlock the crates.io source. Each removed edge must pair with one added edge to the same package name and source, preserving multiplicity. Unrelated package versions and other package fields must stay unchanged; changing sources, adding or dropping edges, or introducing versions outside the restoration plan is rejected. The resolved lock must still pass `cargo update --workspace --locked` before it is accepted. This prevents a valid Cargo resolution from discarding independent successful rollbacks solely because its dependency references changed. If selective restoration fails or an audit pass aborts unexpectedly, depup attempts to restore the entire `Cargo.lock` snapshot from the start of the audit (after install, when one ran). This also undoes independent successful age rollbacks. Recovery uses a checked atomic replacement without running Cargo again, then verifies the restored lock and returns exit code 2. If workspace membership, a manifest, file permissions, a symlink, a change observed between Cargo commands, or a registry or git package changed outside the scope of an audited Cargo command prevents safe replacement, depup preserves the current files and reports the location of a recovery copy of the original lock. The message names those packages, as selective restoration also keeps them. A failure to save that copy is also reported. If the initial snapshot or workspace inventory cannot be prepared, depup reports the error before starting age rollbacks. The inventory expands the `[workspace] members` patterns with the same rules as Cargo and reads only the directories a pattern needs, so directories unrelated to the members, such as a large `target/` or `node_modules/`, an unreadable directory, or a symlink pointing outside the project, cannot make it fail. Ordinary unresolved age violations still retain independent successful rollbacks when selective restoration completes. After the audit, the whole install unit returns to its state before the run if a version this run added still fails (see [When the Final Lockfile Fails the Age Audit](#when-the-final-lockfile-fails-the-age-audit)). Avoid editing `Cargo.lock` while a single-crate rollback command is running. That command writes the live lock directly, so simultaneous edits in the same dependency scope cannot be distinguished reliably from Cargo's own changes. Changes observed between commands remain excluded from restoration. Crates rolled back together are reported with the others: ```text . — 10 crate(s) rolled back to satisfy --age: js-sys 0.3.106 → 0.3.105 wasm-bindgen 0.2.129 → 0.2.128 ... ``` A crate that drops out of `Cargo.lock` during the joint resolution is listed as `tokio 1.53.1 → removed` and counted as rolled back. Any rollback, one at a time or joint, can also bring other new versions into `Cargo.lock`; depup audits those as well and rolls them back in turn, up to a fixed number of rounds. A shared workspace lock uses the strictest member policy and only publisher exemptions common to every member. If a locked version is absent from cached registry metadata, depup refreshes that metadata once. Missing metadata, unreadable or invalid locks, failed rollbacks, and an unfinished audit cause exit code `2` (an install failure still takes priority as `1`); when they involve versions this run added, the install unit is also restored to its state before the run. Restoring the pre-install version is still unresolved if it does not satisfy the age policy. A rollback counts only when `Cargo.lock` actually changed; depup rereads the lock file after each `cargo update` instead of trusting its exit status, and builds the final report from the lock file as it stands when the audit ends. Rollbacks are always reported. Crates that could not be rolled back, crates whose release date is unavailable, and crates left unchecked when the time cap is reached always show names, requested rollback targets when attempted, and reasons, even without `--verbose`: ```text . — 2 crate(s) could not be rolled back to satisfy --age: foo (2.1.3; requested: 2.1.2): cargo update failed: bar (1.0.2): no older version satisfies --age . — 1 crate(s) could not be checked against --age: example (1.0.0): release date unavailable . — age audit stopped after 180s; 3 crate(s) left unchecked ``` With `--verbose`, depup prints `Enforcing --age on registry crates in Cargo.lock...` when the audit starts. Failure reasons are also shown in normal output: ```text . — 2 crate(s) could not be rolled back to satisfy --age: foo (2.1.3): Cargo.toml requires `^2.1.3`, which excludes every version that satisfies --age bar (1.0.2): cargo update failed: ``` | Reason | Meaning | |--------|---------| | `Cargo.toml requires ...` | The version requirement excludes every version old enough to satisfy the age filter. | | `no older version satisfies --age` | No version older than the locked one is old enough. | | `cargo update failed: ...` | Cargo rejected the rollback; its error message follows. | | `not attempted: ...` | depup did not try the rollback, because it reached its limit on rounds or its time budget. | | `release date unavailable` | The release date could not be retrieved, so the crate could not be checked. | Versions already locked before the install are not listed with these reasons; they have their own section, described above. An unresolved audit exits with code `2`. After `--install`, depup also compares each Rust update it reported with the version that ended up in `Cargo.lock`. When they differ, it prints a yellow note, even without `--verbose` and even when the age filter is off: ```text ./Cargo.toml — 1 update(s) locked at a different version than shown: wasm-bindgen 0.2.127 → 0.2.128 (locked: 0.2.129) ``` This happens, for example, when `--max-change` or the OSV check made depup choose an older version, but `cargo update` locked a newer one that still satisfies the `^` requirement. ### uv Malware Check (Preview) When `--install` triggers `uv sync` for a Python project, depup always sets `UV_MALWARE_CHECK=1` in the environment. This enables [uv's preview malware check](https://astral.sh/blog/uv-audit) — a feature announced alongside `uv audit` but distinct from the `uv audit` command. On every sync operation (`uv add`, `uv sync`, etc.), uv cross-references the currently locked resolution against OSV's MAL advisories and terminates the sync before any malicious package is installed. - Always on — no opt-in flag required. - Older uv releases that predate the feature simply do not act on the variable, so enabling it unconditionally does not break existing builds. - Astral marks the feature as preview, so its exact behavior may change. - The check runs inside uv: when it finds malware, uv aborts the sync with an error, and depup reports a failed install and exits with code 1. ## When a Dependency Is Not Updated By default, the text output counts skipped dependencies and shows details for updates blocked by OSV. Run with `--verbose` to list every skipped dependency under its reason: | Reason | Meaning | See | |--------|---------|-----| | `latest` | No version newer than the current one passes the filters. A newer release may exist but be too recent, a prerelease, or above the range's upper bound. | [Filtering Candidates](#filtering-candidates), [Upper and Lower Bounds of Ranges](#upper-and-lower-bounds-of-ranges) | | `no eligible update without known vulnerabilities` | OSV excluded every eligible update. The report includes rejected versions, the manifest baseline's vulnerability status, and a confirmed safe version waiting for age when found. | [Vulnerability Check](#vulnerability-check-osvdev) | | `newer than --age` | The confirmed current release is newer than the effective age cutoff and has no publisher exemption. No update is selected. | [Age Filter](#age-filter) | | `pinned` | The version is pinned, so depup did not query the registry. | [Pinned Versions and `--include-pinned`](#pinned-versions-and---include-pinned) | | `max-change=` | Newer versions exist, but all of them exceed the `--max-change` cap. | [Limiting Bumps](#limiting-bumps---max-change) | | `excluded` / `not in --only` | The package was excluded with `--exclude`, or `--only` lists other packages. | [Options](cli-reference.md#options) | | `no suitable version` | No published version passes the filters (for example, the current release and a newer release are both newer than the age cutoff). | [Filtering Candidates](#filtering-candidates) | | `held at for Tauri sync` | A newer major.minor was selected, but the other side of the Tauri pair (the npm packages or the `tauri` crate) cannot reach it, so the dependency stays at its current version to keep both sides aligned. | [Tauri Version Synchronization](ecosystems.md#tauri-version-synchronization) | | `parse error: ...` | depup read the constraint but cannot rewrite it safely (for example, `parse error: constraint cannot be updated safely`). Despite the label, the manifest itself parsed correctly, and the exit code is not affected. | [Constraints Left Unchanged](#constraints-left-unchanged) | | `fetch failed: ...` | The version lookup failed, for example because of a registry error or a failed `git ls-remote`. Whether the exit code changes depends on the cause. | [Exit Codes](cli-reference.md#exit-codes) | These are the labels in the text output. In `--json` output with `--verbose`, the same reasons appear as `already_latest`, `current_version_too_recent`, `pinned`, `change_level_limited: `, `excluded`, `not_in_only_list`, `no_suitable_version`, `tauri_sync: `, `parse_error: ...`, and `fetch_failed: ...`. An otherwise allowed newer release with an unknown publication date is reported as `release_date_unknown: `. This also applies when dated candidates are all older and outside the `--max-change` limit. A Swift dependency whose date lookups ran out is reported as `release_date_unchecked: ` (text: `release date lookup limit reached; and older not checked`). Dates in the verbose skip list belong to the current version itself, never to an older candidate. An unknown current date, an ambiguous version alias, or a floating wildcard/prefix has no displayed date. When the manifest omits build metadata that the registry version carries (crates.io publishes `toml` as `1.2.0+spec-1.1.0` while Cargo.toml says `1.2.0`), the single registry version with the same precedence counts as the current version. For example: ```text 1 newer than --age: library 2.0.0 (2024/05/30 12:00) 1 latest: undated-library 1.0.0 ``` An update row that ends with `✗ failed: ` (`[failed: ]` without color) is an update depup found but could not write to the manifest, for example because the write was refused as ambiguous (see [Writing Rules](#writing-rules)). It is counted as failed instead of updated, and the exit code is `2`. The reason appears at the end of the row, with multiline output collapsed onto one line. Updates canceled after an install failure also show their reason here; install failures exit with code `1`. If a dependency does not appear in the output at all, depup did not process the declaration; check in [Ecosystem Details](ecosystems.md#ecosystem-details) that its file, section, and declaration form are supported. Manifests of languages left out by a language flag such as `--node` are not parsed (project age settings in pnpm, Bun, and mise files are still read). If the manifest was updated but the install failed, see [Running the Package Manager](#running-the-package-manager---install).