Skip to content

Commit

Permalink
BREAKING(semver): remove eq(), gt(), gte(), lt(), lte() and…
Browse files Browse the repository at this point in the history
… `neq()` (#4294)
  • Loading branch information
iuioiua authored Feb 9, 2024
1 parent 6da4e4e commit b9f3a74
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 89 deletions.
12 changes: 10 additions & 2 deletions _tools/check_deprecation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ for await (

if (afterVersion) {
if (
semver.lt(semver.parse(afterVersion), semver.parse(VERSION))
semver.lessThan(
semver.parse(afterVersion),
semver.parse(VERSION),
)
) {
console.warn(
colors.yellow("Warn"),
Expand All @@ -109,7 +112,12 @@ for await (
continue;
}

if (!semver.gt(semver.parse(inVersion), semver.parse(VERSION))) {
if (
!semver.greaterThan(
semver.parse(inVersion),
semver.parse(VERSION),
)
) {
console.error(
colors.red("Error"),
`${
Expand Down
12 changes: 0 additions & 12 deletions semver/eq.ts

This file was deleted.

13 changes: 0 additions & 13 deletions semver/gt.ts

This file was deleted.

13 changes: 0 additions & 13 deletions semver/gte.ts

This file was deleted.

13 changes: 0 additions & 13 deletions semver/lt.ts

This file was deleted.

13 changes: 0 additions & 13 deletions semver/lte.ts

This file was deleted.

14 changes: 4 additions & 10 deletions semver/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@
* import {
* parse,
* parseRange,
* gt,
* lt,
* greaterThan,
* lessThan,
* format
* } from "https://deno.land/std@$STD_VERSION/semver/mod.ts";
*
Expand All @@ -262,8 +262,8 @@
*
* const s0 = parse("1.2.3");
* const s1 = parse("9.8.7");
* gt(s0, s1); // false
* lt(s0, s1); // true
* greaterThan(s0, s1); // false
* lessThan(s0, s1); // true
*
* format(semver) // "1.2.3"
* ```
Expand All @@ -273,21 +273,15 @@
export * from "./compare.ts";
export * from "./constants.ts";
export * from "./difference.ts";
export * from "./eq.ts";
export * from "./format.ts";
export * from "./gt.ts";
export * from "./gte.ts";
export * from "./gtr.ts";
export * from "./test_range.ts";
export * from "./increment.ts";
export * from "./is_semver_range.ts";
export * from "./is_semver.ts";
export * from "./lt.ts";
export * from "./lte.ts";
export * from "./ltr.ts";
export * from "./max_satisfying.ts";
export * from "./min_satisfying.ts";
export * from "./neq.ts";
export * from "./parse_range.ts";
export * from "./parse.ts";
export * from "./range_intersects.ts";
Expand Down
13 changes: 0 additions & 13 deletions semver/neq.ts

This file was deleted.

0 comments on commit b9f3a74

Please sign in to comment.