Skip to content

Commit

Permalink
deprecation(semver): deprecate rangeMax() and rangeMin() (#4561)
Browse files Browse the repository at this point in the history
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
  • Loading branch information
kt3k and iuioiua committed Apr 11, 2024
1 parent b5af8da commit 6220121
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions semver/range_max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ function comparatorMax(comparator: Comparator): SemVer {
}

/**
* @deprecated (will be removed in 1.0.0) Use {@linkcode greaterThanRange} or
* {@linkcode lessThanRange} for comparing ranges and semvers. The maximum
* version of a range is often not well defined, and therefore this API
* shouldn't be used. See
* {@link https://github.com/denoland/deno_std/issues/4365} for details.
*
* The maximum valid SemVer for a given range or INVALID
* @param range The range to calculate the max for
* @returns A valid SemVer or INVALID
Expand Down
6 changes: 6 additions & 0 deletions semver/range_min.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ function comparatorMin(comparator: Comparator): SemVer {
}

/**
* @deprecated (will be removed in 1.0.0) Use {@linkcode greaterThanRange} or
* {@linkcode lessThanRange} for comparing ranges and semvers. The minimum
* version of a range is often not well defined, and therefore this API
* shouldn't be used. See
* {@link https://github.com/denoland/deno_std/issues/4365} for details.
*
* The minimum valid SemVer for a given range or INVALID
* @param range The range to calculate the min for
* @returns A valid SemVer or INVALID
Expand Down

0 comments on commit 6220121

Please sign in to comment.