@dennisrepa/elevate 1.6.0 → 1.7.0

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 CHANGED
@@ -215,7 +215,7 @@ Detailed parameter references are available in [`docs/en.md`](./docs/en.md) and
215
215
  * **pnpm specifics.** `catalog:` entries are updated where they are declared, in `pnpm-workspace.yaml`. A plain range on a workspace module (`^1.0.0`) is listed as *not linked* and never rewritten to `workspace:`, because pnpm resolves it from the registry. Elevate does not read pnpm settings such as `minimumReleaseAge` or the approval of build scripts, so pnpm may refuse an offered version; the update is then rolled back with pnpm's message. pnpm 8 and older, Windows and `shared-workspace-lockfile=false` are not covered.
216
216
  * **Broken configuration stops Elevate.** An `elevate.config.json` that is not valid JSON, not an object, or whose `internalScopes` is not a list of strings is reported and Elevate exits with code `1`, because ignoring it would switch off the protection of internal packages. Without any configuration file Elevate works with defaults.
217
217
  * **Dependency sections.** `dependencies`, `devDependencies` and `optionalDependencies` are covered. `peerDependencies` and `overrides` are never changed.
218
- * **Cargo.** Requirements are raised keeping their precision, so a loose `"1"` only shows breaking updates; wildcard and compound requirements (`*`, `>=1.2, <2`), git and external path dependencies are left alone. Lock-file-only updates (`[Lock]`) are offered for direct dependencies when `Cargo.lock` is behind a requirement that already allows a newer release; transitive crates are not. Registries that need authentication and `[patch]` sections are not covered; a vendored or local-registry source replacement is refused rather than bypassed.
218
+ * **Cargo.** Requirements are raised keeping their precision, so a loose `"1"` only shows breaking updates; wildcard and compound requirements (`*`, `>=1.2, <2`), git and external path dependencies are left alone. Lock-file-only updates (`[Lock]`) are offered for direct dependencies when `Cargo.lock` is behind a requirement that already allows a newer release; transitive crates are not, and a crate with a pending manifest update shows only that candidate. Registries that need authentication and `[patch]` sections are not covered; a vendored or local-registry source replacement is refused rather than bypassed.
219
219
  * **Maven.** Maven plugin versions and declarations inside `<profiles>` are not offered. Dependencies whose version is declared outside the repository (an external parent or BOM) are listed as *not offered* with the reason.
220
220
 
221
221
  ---
package/dist/cli.js CHANGED
@@ -1351,7 +1351,7 @@ var CargoConfigReader = class {
1351
1351
 
1352
1352
  // src/version.ts
1353
1353
  import { createRequire } from "module";
1354
- var VERSION = true ? "1.6.0" : fromPackage();
1354
+ var VERSION = true ? "1.7.0" : fromPackage();
1355
1355
 
1356
1356
  // src/adapters/cargo/cargo-index.ts
1357
1357
  var RegistryAuthRequiredError = class extends Error {
@@ -1730,7 +1730,7 @@ var CargoDependencyAdapter = class {
1730
1730
  if (floor && held && semver8.gt(held.version, floor)) {
1731
1731
  return { skipped: { identifier: dep.name, origin: origin.kind, reason: "incompatible-rust-version", detail: ` (${held.version} needs Rust ${held.requires})` } };
1732
1732
  }
1733
- return null;
1733
+ return yankedLock(dep, literal, origin, versions, locks);
1734
1734
  }
1735
1735
  const newRange = rewriteRequirement(literal, latest);
1736
1736
  if (newRange === literal) return lockOutcome(dep, literal, origin, versions, pkg, metadata, locks, common, context);
@@ -1763,7 +1763,7 @@ function lockOutcome(dep, requirement, origin, versions, pkg, metadata, locks, c
1763
1763
  const allowed = versions.filter((v) => satisfiesRequirement(requirement, v.version));
1764
1764
  const newer = eligibleVersions(allowed, options).filter((v) => semver8.gt(v, locked));
1765
1765
  const latest = newer[0];
1766
- if (!latest) return null;
1766
+ if (!latest) return yankedLock(dep, requirement, origin, versions, locks);
1767
1767
  const lockFile = join11(metadata.workspace_root, "Cargo.lock");
1768
1768
  return {
1769
1769
  candidate: {
@@ -1784,6 +1784,11 @@ function lockOutcome(dep, requirement, origin, versions, pkg, metadata, locks, c
1784
1784
  }
1785
1785
  };
1786
1786
  }
1787
+ function yankedLock(dep, requirement, origin, versions, locks) {
1788
+ const locked = (locks.get(dep.name) ?? []).filter((v) => satisfiesRequirement(requirement, v)).sort(semver8.rcompare)[0];
1789
+ if (!locked || !versions.some((v) => v.yanked && v.version === locked)) return null;
1790
+ return { skipped: { identifier: dep.name, origin: origin.kind, reason: "locked-version-yanked", detail: locked } };
1791
+ }
1787
1792
  function alignment(dep, target, located, common) {
1788
1793
  const local = target.version;
1789
1794
  if (!located || !local || !semver8.valid(local)) return null;
@@ -5380,6 +5385,8 @@ function describeSkip(skipped) {
5380
5385
  return `catalog entry could not be resolved${detail}`;
5381
5386
  case "incompatible-rust-version":
5382
5387
  return `newer versions need a newer Rust than the project's rust-version${detail}`;
5388
+ case "locked-version-yanked":
5389
+ return `Cargo.lock pins a yanked release and no allowed release can replace it${detail}`;
5383
5390
  }
5384
5391
  }
5385
5392