keep-a-changelog 2.5.3 → 2.6.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/CHANGELOG.md +22 -1
- package/README.md +15 -14
- package/esm/keep-a-changelog/bin.d.ts +2 -0
- package/esm/{bin.js → keep-a-changelog/bin.js} +85 -13
- package/esm/{mod.d.ts → keep-a-changelog/mod.d.ts} +1 -1
- package/esm/{mod.js → keep-a-changelog/mod.js} +1 -1
- package/esm/keep-a-changelog/test/changelog.azdo.md +24 -0
- package/esm/keep-a-changelog/test/changelog.sort.md +17 -0
- package/esm/std/cli/parse_args.d.ts +193 -0
- package/esm/std/cli/parse_args.js +357 -0
- package/esm/std/ini/_ini_map.d.ts +90 -0
- package/esm/std/ini/_ini_map.js +371 -0
- package/esm/std/ini/mod.d.ts +31 -0
- package/esm/std/ini/mod.js +33 -0
- package/esm/std/ini/parse.d.ts +77 -0
- package/esm/std/ini/parse.js +72 -0
- package/esm/std/ini/stringify.d.ts +83 -0
- package/esm/std/ini/stringify.js +66 -0
- package/esm/std/path/_common/assert_path.d.ts +1 -0
- package/esm/std/path/_common/assert_path.js +7 -0
- package/esm/std/path/_common/basename.d.ts +3 -0
- package/esm/std/path/_common/basename.js +40 -0
- package/esm/std/path/_common/common.d.ts +1 -0
- package/esm/std/path/_common/common.js +23 -0
- package/esm/{deps/deno.land/std@0.189.0/path/_constants.js → std/path/_common/constants.js} +1 -1
- package/esm/std/path/_common/dirname.d.ts +1 -0
- package/esm/std/path/_common/dirname.js +8 -0
- package/esm/std/path/_common/format.d.ts +3 -0
- package/esm/std/path/_common/format.js +19 -0
- package/esm/std/path/_common/from_file_url.d.ts +2 -0
- package/esm/std/path/_common/from_file_url.js +9 -0
- package/esm/std/path/_common/glob_to_reg_exp.d.ts +34 -0
- package/esm/std/path/_common/glob_to_reg_exp.js +234 -0
- package/esm/std/path/_common/normalize.d.ts +1 -0
- package/esm/std/path/_common/normalize.js +8 -0
- package/esm/std/path/_common/normalize_string.d.ts +1 -0
- package/esm/std/path/_common/normalize_string.js +77 -0
- package/esm/std/path/_common/relative.d.ts +1 -0
- package/esm/std/path/_common/relative.js +9 -0
- package/esm/std/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/std/path/_common/strip_trailing_separators.js +19 -0
- package/esm/std/path/_common/to_file_url.d.ts +1 -0
- package/esm/std/path/_common/to_file_url.js +15 -0
- package/esm/std/path/_os.d.ts +1 -0
- package/esm/std/path/_os.js +9 -0
- package/esm/std/path/basename.d.ts +27 -0
- package/esm/std/path/basename.js +36 -0
- package/esm/std/path/common.d.ts +27 -0
- package/esm/std/path/common.js +33 -0
- package/esm/std/path/constants.d.ts +14 -0
- package/esm/std/path/constants.js +17 -0
- package/esm/std/path/dirname.d.ts +22 -0
- package/esm/std/path/dirname.js +29 -0
- package/esm/std/path/extname.d.ts +22 -0
- package/esm/std/path/extname.js +29 -0
- package/esm/std/path/format.d.ts +21 -0
- package/esm/std/path/format.js +27 -0
- package/esm/std/path/from_file_url.d.ts +22 -0
- package/esm/std/path/from_file_url.js +28 -0
- package/esm/std/path/glob_to_regexp.d.ts +76 -0
- package/esm/std/path/glob_to_regexp.js +83 -0
- package/esm/std/path/is_absolute.d.ts +21 -0
- package/esm/std/path/is_absolute.js +28 -0
- package/esm/std/path/is_glob.d.ts +16 -0
- package/esm/std/path/is_glob.js +42 -0
- package/esm/std/path/join.d.ts +22 -0
- package/esm/std/path/join.js +29 -0
- package/esm/std/path/join_globs.d.ts +27 -0
- package/esm/std/path/join_globs.js +34 -0
- package/esm/std/path/mod.d.ts +53 -0
- package/esm/std/path/mod.js +57 -0
- package/esm/std/path/normalize.d.ts +26 -0
- package/esm/std/path/normalize.js +33 -0
- package/esm/std/path/normalize_glob.d.ts +28 -0
- package/esm/std/path/normalize_glob.js +35 -0
- package/esm/std/path/parse.d.ts +34 -0
- package/esm/std/path/parse.js +39 -0
- package/esm/std/path/posix/_util.d.ts +1 -0
- package/esm/std/path/posix/_util.js +8 -0
- package/esm/std/path/posix/basename.d.ts +39 -0
- package/esm/std/path/posix/basename.js +49 -0
- package/esm/std/path/posix/constants.d.ts +12 -0
- package/esm/std/path/posix/constants.js +14 -0
- package/esm/std/path/posix/dirname.d.ts +31 -0
- package/esm/std/path/posix/dirname.js +62 -0
- package/esm/std/path/posix/extname.d.ts +36 -0
- package/esm/std/path/posix/extname.js +89 -0
- package/esm/std/path/posix/format.d.ts +23 -0
- package/esm/std/path/posix/format.js +28 -0
- package/esm/std/path/posix/from_file_url.d.ts +16 -0
- package/esm/std/path/posix/from_file_url.js +21 -0
- package/esm/std/path/posix/glob_to_regexp.d.ts +71 -0
- package/{script/deps/deno.land/std@0.189.0/path/glob.d.ts → esm/std/path/posix/glob_to_regexp.js} +28 -29
- package/esm/std/path/posix/is_absolute.d.ts +16 -0
- package/esm/std/path/posix/is_absolute.js +23 -0
- package/esm/std/path/posix/join.d.ts +32 -0
- package/esm/std/path/posix/join.js +42 -0
- package/esm/std/path/posix/join_globs.d.ts +19 -0
- package/esm/std/path/posix/join_globs.js +40 -0
- package/esm/std/path/posix/normalize.d.ts +39 -0
- package/esm/std/path/posix/normalize.js +57 -0
- package/esm/std/path/posix/normalize_glob.d.ts +19 -0
- package/esm/std/path/posix/normalize_glob.js +32 -0
- package/esm/std/path/posix/parse.d.ts +24 -0
- package/esm/std/path/posix/parse.js +115 -0
- package/esm/std/path/posix/relative.d.ts +19 -0
- package/esm/std/path/posix/relative.js +106 -0
- package/esm/std/path/posix/resolve.d.ts +16 -0
- package/esm/std/path/posix/resolve.js +59 -0
- package/esm/std/path/posix/to_file_url.d.ts +17 -0
- package/esm/std/path/posix/to_file_url.js +27 -0
- package/esm/std/path/posix/to_namespaced_path.d.ts +15 -0
- package/esm/std/path/posix/to_namespaced_path.js +20 -0
- package/esm/std/path/relative.d.ts +23 -0
- package/esm/std/path/relative.js +30 -0
- package/esm/std/path/resolve.d.ts +21 -0
- package/esm/std/path/resolve.js +30 -0
- package/esm/std/path/to_file_url.d.ts +22 -0
- package/esm/std/path/to_file_url.js +28 -0
- package/esm/std/path/to_namespaced_path.d.ts +20 -0
- package/esm/std/path/to_namespaced_path.js +29 -0
- package/esm/{deps/deno.land/std@0.189.0/path/_interface.d.ts → std/path/types.d.ts} +13 -2
- package/esm/std/path/types.js +3 -0
- package/esm/std/path/windows/_util.d.ts +3 -0
- package/esm/std/path/windows/_util.js +15 -0
- package/esm/std/path/windows/basename.d.ts +22 -0
- package/esm/std/path/windows/basename.js +44 -0
- package/esm/std/path/windows/constants.d.ts +12 -0
- package/esm/std/path/windows/constants.js +14 -0
- package/esm/std/path/windows/dirname.d.ts +19 -0
- package/esm/std/path/windows/dirname.js +112 -0
- package/esm/std/path/windows/extname.d.ts +19 -0
- package/esm/std/path/windows/extname.js +81 -0
- package/esm/std/path/windows/format.d.ts +23 -0
- package/esm/std/path/windows/format.js +28 -0
- package/esm/std/path/windows/from_file_url.d.ts +18 -0
- package/esm/std/path/windows/from_file_url.js +30 -0
- package/esm/std/path/windows/glob_to_regexp.d.ts +70 -0
- package/esm/{deps/deno.land/std@0.189.0/path/glob.d.ts → std/path/windows/glob_to_regexp.js} +28 -29
- package/esm/std/path/windows/is_absolute.d.ts +16 -0
- package/esm/std/path/windows/is_absolute.js +38 -0
- package/esm/std/path/windows/join.d.ts +19 -0
- package/esm/std/path/windows/join.js +74 -0
- package/esm/std/path/windows/join_globs.d.ts +20 -0
- package/esm/std/path/windows/join_globs.js +41 -0
- package/esm/std/path/windows/normalize.d.ts +21 -0
- package/esm/std/path/windows/normalize.js +134 -0
- package/esm/std/path/windows/normalize_glob.d.ts +19 -0
- package/esm/std/path/windows/normalize_glob.js +32 -0
- package/esm/std/path/windows/parse.d.ts +24 -0
- package/esm/std/path/windows/parse.js +176 -0
- package/esm/std/path/windows/relative.d.ts +22 -0
- package/esm/std/path/windows/relative.js +131 -0
- package/esm/std/path/windows/resolve.d.ts +16 -0
- package/esm/std/path/windows/resolve.js +154 -0
- package/esm/std/path/windows/to_file_url.d.ts +17 -0
- package/esm/std/path/windows/to_file_url.js +34 -0
- package/esm/std/path/windows/to_namespaced_path.d.ts +16 -0
- package/esm/std/path/windows/to_namespaced_path.js +49 -0
- package/esm/std/semver/_constants.d.ts +15 -0
- package/esm/std/semver/_constants.js +38 -0
- package/esm/std/semver/_shared.d.ts +43 -0
- package/esm/std/semver/_shared.js +162 -0
- package/esm/std/semver/_test_comparator_set.d.ts +2 -0
- package/esm/std/semver/_test_comparator_set.js +58 -0
- package/esm/std/semver/can_parse.d.ts +16 -0
- package/esm/std/semver/can_parse.js +27 -0
- package/esm/std/semver/compare.d.ts +27 -0
- package/esm/std/semver/compare.js +35 -0
- package/esm/std/semver/difference.d.ts +26 -0
- package/esm/std/semver/difference.js +41 -0
- package/esm/std/semver/equals.d.ts +23 -0
- package/esm/std/semver/equals.js +27 -0
- package/esm/std/semver/format.d.ts +21 -0
- package/esm/std/semver/format.js +32 -0
- package/esm/std/semver/format_range.d.ts +17 -0
- package/esm/std/semver/format_range.js +27 -0
- package/esm/std/semver/greater_or_equal.d.ts +24 -0
- package/esm/std/semver/greater_or_equal.js +26 -0
- package/esm/std/semver/greater_than.d.ts +24 -0
- package/esm/std/semver/greater_than.js +28 -0
- package/esm/std/semver/greater_than_range.d.ts +22 -0
- package/esm/std/semver/greater_than_range.js +58 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/increment.d.ts +27 -5
- package/esm/std/semver/increment.js +176 -0
- package/esm/std/semver/is_range.d.ts +22 -0
- package/esm/std/semver/is_range.js +38 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/is_semver.d.ts +16 -0
- package/esm/{deps/deno.land/std@0.205.0 → std}/semver/is_semver.js +25 -13
- package/esm/std/semver/less_or_equal.d.ts +24 -0
- package/esm/std/semver/less_or_equal.js +26 -0
- package/esm/std/semver/less_than.d.ts +24 -0
- package/esm/std/semver/less_than.js +26 -0
- package/esm/std/semver/less_than_range.d.ts +22 -0
- package/esm/std/semver/less_than_range.js +58 -0
- package/esm/std/semver/max_satisfying.d.ts +21 -0
- package/esm/std/semver/max_satisfying.js +30 -0
- package/esm/std/semver/min_satisfying.d.ts +21 -0
- package/esm/std/semver/min_satisfying.js +30 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/mod.d.ts +72 -85
- package/esm/{deps/deno.land/std@0.205.0 → std}/semver/mod.js +73 -86
- package/esm/std/semver/not_equals.d.ts +23 -0
- package/esm/std/semver/not_equals.js +25 -0
- package/esm/std/semver/parse.d.ts +24 -0
- package/esm/std/semver/parse.js +44 -0
- package/esm/std/semver/parse_range.d.ts +26 -0
- package/esm/std/semver/parse_range.js +358 -0
- package/esm/std/semver/range_intersects.d.ts +24 -0
- package/esm/std/semver/range_intersects.js +89 -0
- package/esm/std/semver/satisfies.d.ts +23 -0
- package/esm/std/semver/satisfies.js +26 -0
- package/esm/std/semver/try_parse.d.ts +20 -0
- package/esm/std/semver/try_parse.js +27 -0
- package/esm/std/semver/try_parse_range.d.ts +22 -0
- package/esm/std/semver/try_parse_range.js +33 -0
- package/esm/std/semver/types.d.ts +57 -0
- package/esm/std/semver/types.js +3 -0
- package/package.json +14 -13
- package/script/keep-a-changelog/bin.d.ts +2 -0
- package/script/{bin.js → keep-a-changelog/bin.js} +86 -14
- package/script/{mod.d.ts → keep-a-changelog/mod.d.ts} +1 -1
- package/script/{mod.js → keep-a-changelog/mod.js} +1 -1
- package/script/keep-a-changelog/test/changelog.azdo.md +24 -0
- package/script/keep-a-changelog/test/changelog.sort.md +17 -0
- package/script/std/cli/parse_args.d.ts +193 -0
- package/script/std/cli/parse_args.js +361 -0
- package/script/std/ini/_ini_map.d.ts +90 -0
- package/script/std/ini/_ini_map.js +375 -0
- package/script/std/ini/mod.d.ts +31 -0
- package/script/std/ini/mod.js +49 -0
- package/script/std/ini/parse.d.ts +77 -0
- package/script/std/ini/parse.js +76 -0
- package/script/std/ini/stringify.d.ts +83 -0
- package/script/std/ini/stringify.js +70 -0
- package/script/std/path/_common/assert_path.d.ts +1 -0
- package/script/std/path/_common/assert_path.js +11 -0
- package/script/std/path/_common/basename.d.ts +3 -0
- package/script/std/path/_common/basename.js +46 -0
- package/script/std/path/_common/common.d.ts +1 -0
- package/script/std/path/_common/common.js +27 -0
- package/script/{deps/deno.land/std@0.189.0/path/_constants.js → std/path/_common/constants.js} +1 -1
- package/script/std/path/_common/dirname.d.ts +1 -0
- package/script/std/path/_common/dirname.js +12 -0
- package/script/std/path/_common/format.d.ts +3 -0
- package/script/std/path/_common/format.js +24 -0
- package/script/std/path/_common/from_file_url.d.ts +2 -0
- package/script/std/path/_common/from_file_url.js +13 -0
- package/script/std/path/_common/glob_to_reg_exp.d.ts +34 -0
- package/script/std/path/_common/glob_to_reg_exp.js +238 -0
- package/script/std/path/_common/normalize.d.ts +1 -0
- package/script/std/path/_common/normalize.js +12 -0
- package/script/std/path/_common/normalize_string.d.ts +1 -0
- package/script/std/path/_common/normalize_string.js +81 -0
- package/script/std/path/_common/relative.d.ts +1 -0
- package/script/std/path/_common/relative.js +13 -0
- package/script/std/path/_common/strip_trailing_separators.d.ts +1 -0
- package/script/std/path/_common/strip_trailing_separators.js +23 -0
- package/script/std/path/_common/to_file_url.d.ts +1 -0
- package/script/std/path/_common/to_file_url.js +19 -0
- package/script/std/path/_os.d.ts +1 -0
- package/script/{deps/deno.land/std@0.189.0/_util/os.js → std/path/_os.js} +10 -19
- package/script/std/path/basename.d.ts +27 -0
- package/script/std/path/basename.js +40 -0
- package/script/std/path/common.d.ts +27 -0
- package/script/std/path/common.js +37 -0
- package/script/std/path/constants.d.ts +14 -0
- package/script/std/path/constants.js +20 -0
- package/script/std/path/dirname.d.ts +22 -0
- package/script/std/path/dirname.js +33 -0
- package/script/std/path/extname.d.ts +22 -0
- package/script/std/path/extname.js +33 -0
- package/script/std/path/format.d.ts +21 -0
- package/script/std/path/format.js +31 -0
- package/script/std/path/from_file_url.d.ts +22 -0
- package/script/std/path/from_file_url.js +32 -0
- package/script/std/path/glob_to_regexp.d.ts +76 -0
- package/script/std/path/glob_to_regexp.js +87 -0
- package/script/std/path/is_absolute.d.ts +21 -0
- package/script/std/path/is_absolute.js +32 -0
- package/script/std/path/is_glob.d.ts +16 -0
- package/script/std/path/is_glob.js +46 -0
- package/script/std/path/join.d.ts +22 -0
- package/script/std/path/join.js +33 -0
- package/script/std/path/join_globs.d.ts +27 -0
- package/script/std/path/join_globs.js +38 -0
- package/script/std/path/mod.d.ts +53 -0
- package/script/std/path/mod.js +73 -0
- package/script/std/path/normalize.d.ts +26 -0
- package/script/std/path/normalize.js +37 -0
- package/script/std/path/normalize_glob.d.ts +28 -0
- package/script/std/path/normalize_glob.js +39 -0
- package/script/std/path/parse.d.ts +34 -0
- package/script/std/path/parse.js +43 -0
- package/script/std/path/posix/_util.d.ts +1 -0
- package/script/std/path/posix/_util.js +12 -0
- package/script/std/path/posix/basename.d.ts +39 -0
- package/script/std/path/posix/basename.js +53 -0
- package/script/std/path/posix/constants.d.ts +12 -0
- package/script/std/path/posix/constants.js +17 -0
- package/script/std/path/posix/dirname.d.ts +31 -0
- package/script/std/path/posix/dirname.js +66 -0
- package/script/std/path/posix/extname.d.ts +36 -0
- package/script/std/path/posix/extname.js +93 -0
- package/script/std/path/posix/format.d.ts +23 -0
- package/script/std/path/posix/format.js +32 -0
- package/script/std/path/posix/from_file_url.d.ts +16 -0
- package/script/std/path/posix/from_file_url.js +25 -0
- package/script/std/path/posix/glob_to_regexp.d.ts +71 -0
- package/script/std/path/posix/glob_to_regexp.js +86 -0
- package/script/std/path/posix/is_absolute.d.ts +16 -0
- package/script/std/path/posix/is_absolute.js +27 -0
- package/script/std/path/posix/join.d.ts +32 -0
- package/script/std/path/posix/join.js +46 -0
- package/script/std/path/posix/join_globs.d.ts +19 -0
- package/script/std/path/posix/join_globs.js +44 -0
- package/script/std/path/posix/normalize.d.ts +39 -0
- package/script/std/path/posix/normalize.js +61 -0
- package/script/std/path/posix/normalize_glob.d.ts +19 -0
- package/script/std/path/posix/normalize_glob.js +36 -0
- package/script/std/path/posix/parse.d.ts +24 -0
- package/script/std/path/posix/parse.js +119 -0
- package/script/std/path/posix/relative.d.ts +19 -0
- package/script/std/path/posix/relative.js +110 -0
- package/script/std/path/posix/resolve.d.ts +16 -0
- package/script/std/path/posix/resolve.js +86 -0
- package/script/std/path/posix/to_file_url.d.ts +17 -0
- package/script/std/path/posix/to_file_url.js +31 -0
- package/script/std/path/posix/to_namespaced_path.d.ts +15 -0
- package/script/std/path/posix/to_namespaced_path.js +24 -0
- package/script/std/path/relative.d.ts +23 -0
- package/script/std/path/relative.js +34 -0
- package/script/std/path/resolve.d.ts +21 -0
- package/script/std/path/resolve.js +34 -0
- package/script/std/path/to_file_url.d.ts +22 -0
- package/script/std/path/to_file_url.js +32 -0
- package/script/std/path/to_namespaced_path.d.ts +20 -0
- package/script/std/path/to_namespaced_path.js +33 -0
- package/script/{deps/deno.land/std@0.189.0/path/_interface.d.ts → std/path/types.d.ts} +13 -2
- package/script/{deps/deno.land/std@0.189.0/path/_interface.js → std/path/types.js} +1 -1
- package/script/std/path/windows/_util.d.ts +3 -0
- package/script/std/path/windows/_util.js +21 -0
- package/script/std/path/windows/basename.d.ts +22 -0
- package/script/std/path/windows/basename.js +48 -0
- package/script/std/path/windows/constants.d.ts +12 -0
- package/script/std/path/windows/constants.js +17 -0
- package/script/std/path/windows/dirname.d.ts +19 -0
- package/script/std/path/windows/dirname.js +116 -0
- package/script/std/path/windows/extname.d.ts +19 -0
- package/script/std/path/windows/extname.js +85 -0
- package/script/std/path/windows/format.d.ts +23 -0
- package/script/std/path/windows/format.js +32 -0
- package/script/std/path/windows/from_file_url.d.ts +18 -0
- package/script/std/path/windows/from_file_url.js +34 -0
- package/script/std/path/windows/glob_to_regexp.d.ts +70 -0
- package/script/std/path/windows/glob_to_regexp.js +86 -0
- package/script/std/path/windows/is_absolute.d.ts +16 -0
- package/script/std/path/windows/is_absolute.js +42 -0
- package/script/std/path/windows/join.d.ts +19 -0
- package/script/std/path/windows/join.js +78 -0
- package/script/std/path/windows/join_globs.d.ts +20 -0
- package/script/std/path/windows/join_globs.js +45 -0
- package/script/std/path/windows/normalize.d.ts +21 -0
- package/script/std/path/windows/normalize.js +138 -0
- package/script/std/path/windows/normalize_glob.d.ts +19 -0
- package/script/std/path/windows/normalize_glob.js +36 -0
- package/script/std/path/windows/parse.d.ts +24 -0
- package/script/std/path/windows/parse.js +180 -0
- package/script/std/path/windows/relative.d.ts +22 -0
- package/script/std/path/windows/relative.js +135 -0
- package/script/std/path/windows/resolve.d.ts +16 -0
- package/script/std/path/windows/resolve.js +181 -0
- package/script/std/path/windows/to_file_url.d.ts +17 -0
- package/script/std/path/windows/to_file_url.js +38 -0
- package/script/std/path/windows/to_namespaced_path.d.ts +16 -0
- package/script/std/path/windows/to_namespaced_path.js +53 -0
- package/script/std/semver/_constants.d.ts +15 -0
- package/script/std/semver/_constants.js +41 -0
- package/script/std/semver/_shared.d.ts +43 -0
- package/script/std/semver/_shared.js +174 -0
- package/script/std/semver/_test_comparator_set.d.ts +2 -0
- package/script/std/semver/_test_comparator_set.js +62 -0
- package/script/std/semver/can_parse.d.ts +16 -0
- package/script/std/semver/can_parse.js +31 -0
- package/script/std/semver/compare.d.ts +27 -0
- package/script/std/semver/compare.js +39 -0
- package/script/std/semver/difference.d.ts +26 -0
- package/script/std/semver/difference.js +45 -0
- package/script/std/semver/equals.d.ts +23 -0
- package/script/std/semver/equals.js +31 -0
- package/script/std/semver/format.d.ts +21 -0
- package/script/std/semver/format.js +36 -0
- package/script/std/semver/format_range.d.ts +17 -0
- package/script/std/semver/format_range.js +31 -0
- package/script/std/semver/greater_or_equal.d.ts +24 -0
- package/script/std/semver/greater_or_equal.js +30 -0
- package/script/std/semver/greater_than.d.ts +24 -0
- package/script/std/semver/greater_than.js +32 -0
- package/script/std/semver/greater_than_range.d.ts +22 -0
- package/script/std/semver/greater_than_range.js +62 -0
- package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/increment.d.ts +27 -5
- package/script/std/semver/increment.js +180 -0
- package/script/std/semver/is_range.d.ts +22 -0
- package/script/std/semver/is_range.js +42 -0
- package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/is_semver.d.ts +16 -0
- package/script/{deps/deno.land/std@0.205.0 → std}/semver/is_semver.js +26 -14
- package/script/std/semver/less_or_equal.d.ts +24 -0
- package/script/std/semver/less_or_equal.js +30 -0
- package/script/std/semver/less_than.d.ts +24 -0
- package/script/std/semver/less_than.js +30 -0
- package/script/std/semver/less_than_range.d.ts +22 -0
- package/script/std/semver/less_than_range.js +62 -0
- package/script/std/semver/max_satisfying.d.ts +21 -0
- package/script/std/semver/max_satisfying.js +34 -0
- package/script/std/semver/min_satisfying.d.ts +21 -0
- package/script/std/semver/min_satisfying.js +34 -0
- package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/mod.d.ts +72 -85
- package/script/{deps/deno.land/std@0.205.0 → std}/semver/mod.js +73 -87
- package/script/std/semver/not_equals.d.ts +23 -0
- package/script/std/semver/not_equals.js +29 -0
- package/script/std/semver/parse.d.ts +24 -0
- package/script/std/semver/parse.js +48 -0
- package/script/std/semver/parse_range.d.ts +26 -0
- package/script/std/semver/parse_range.js +362 -0
- package/script/std/semver/range_intersects.d.ts +24 -0
- package/script/std/semver/range_intersects.js +93 -0
- package/script/std/semver/satisfies.d.ts +23 -0
- package/script/std/semver/satisfies.js +30 -0
- package/script/std/semver/try_parse.d.ts +20 -0
- package/script/std/semver/try_parse.js +31 -0
- package/script/std/semver/try_parse_range.d.ts +22 -0
- package/script/std/semver/try_parse_range.js +37 -0
- package/script/std/semver/types.d.ts +57 -0
- package/script/std/semver/types.js +4 -0
- package/esm/bin.d.ts +0 -2
- package/esm/deps/deno.land/std@0.189.0/_util/asserts.d.ts +0 -10
- package/esm/deps/deno.land/std@0.189.0/_util/asserts.js +0 -21
- package/esm/deps/deno.land/std@0.189.0/_util/os.d.ts +0 -4
- package/esm/deps/deno.land/std@0.189.0/_util/os.js +0 -18
- package/esm/deps/deno.land/std@0.189.0/flags/mod.d.ts +0 -166
- package/esm/deps/deno.land/std@0.189.0/flags/mod.js +0 -365
- package/esm/deps/deno.land/std@0.189.0/path/_interface.js +0 -3
- package/esm/deps/deno.land/std@0.189.0/path/_util.d.ts +0 -11
- package/esm/deps/deno.land/std@0.189.0/path/_util.js +0 -161
- package/esm/deps/deno.land/std@0.189.0/path/common.d.ts +0 -13
- package/esm/deps/deno.land/std@0.189.0/path/common.js +0 -36
- package/esm/deps/deno.land/std@0.189.0/path/glob.js +0 -361
- package/esm/deps/deno.land/std@0.189.0/path/mod.d.ts +0 -11
- package/esm/deps/deno.land/std@0.189.0/path/mod.js +0 -35
- package/esm/deps/deno.land/std@0.189.0/path/posix.d.ts +0 -86
- package/esm/deps/deno.land/std@0.189.0/path/posix.js +0 -442
- package/esm/deps/deno.land/std@0.189.0/path/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.189.0/path/separator.js +0 -5
- package/esm/deps/deno.land/std@0.189.0/path/win32.d.ts +0 -91
- package/esm/deps/deno.land/std@0.189.0/path/win32.js +0 -909
- package/esm/deps/deno.land/std@0.205.0/semver/_shared.d.ts +0 -42
- package/esm/deps/deno.land/std@0.205.0/semver/_shared.js +0 -230
- package/esm/deps/deno.land/std@0.205.0/semver/cmp.d.ts +0 -9
- package/esm/deps/deno.land/std@0.205.0/semver/cmp.js +0 -35
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.js +0 -11
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +0 -45
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +0 -9
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.js +0 -45
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.js +0 -32
- package/esm/deps/deno.land/std@0.205.0/semver/compare.d.ts +0 -10
- package/esm/deps/deno.land/std@0.205.0/semver/compare.js +0 -18
- package/esm/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +0 -13
- package/esm/deps/deno.land/std@0.205.0/semver/compare_build.js +0 -23
- package/esm/deps/deno.land/std@0.205.0/semver/constants.d.ts +0 -42
- package/esm/deps/deno.land/std@0.205.0/semver/constants.js +0 -75
- package/esm/deps/deno.land/std@0.205.0/semver/difference.d.ts +0 -4
- package/esm/deps/deno.land/std@0.205.0/semver/difference.js +0 -26
- package/esm/deps/deno.land/std@0.205.0/semver/eq.d.ts +0 -4
- package/esm/deps/deno.land/std@0.205.0/semver/eq.js +0 -7
- package/esm/deps/deno.land/std@0.205.0/semver/format.d.ts +0 -12
- package/esm/deps/deno.land/std@0.205.0/semver/format.js +0 -54
- package/esm/deps/deno.land/std@0.205.0/semver/gt.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/gt.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/gte.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/gte.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/gtr.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/gtr.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/increment.js +0 -207
- package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +0 -12
- package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +0 -31
- package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +0 -12
- package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.js +0 -22
- package/esm/deps/deno.land/std@0.205.0/semver/lt.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/lt.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/lte.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/lte.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/ltr.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/ltr.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +0 -9
- package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.js +0 -14
- package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +0 -9
- package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.js +0 -14
- package/esm/deps/deno.land/std@0.205.0/semver/neq.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/neq.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/outside.d.ts +0 -11
- package/esm/deps/deno.land/std@0.205.0/semver/outside.js +0 -67
- package/esm/deps/deno.land/std@0.205.0/semver/parse.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/parse.js +0 -66
- package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +0 -7
- package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.js +0 -28
- package/esm/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +0 -7
- package/esm/deps/deno.land/std@0.205.0/semver/parse_range.js +0 -292
- package/esm/deps/deno.land/std@0.205.0/semver/range_format.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/range_format.js +0 -11
- package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.js +0 -35
- package/esm/deps/deno.land/std@0.205.0/semver/range_max.d.ts +0 -7
- package/esm/deps/deno.land/std@0.205.0/semver/range_max.js +0 -15
- package/esm/deps/deno.land/std@0.205.0/semver/range_min.d.ts +0 -7
- package/esm/deps/deno.land/std@0.205.0/semver/range_min.js +0 -14
- package/esm/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/rcompare.js +0 -10
- package/esm/deps/deno.land/std@0.205.0/semver/rsort.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/rsort.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/sort.d.ts +0 -3
- package/esm/deps/deno.land/std@0.205.0/semver/sort.js +0 -5
- package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.js +0 -10
- package/esm/deps/deno.land/std@0.205.0/semver/test_range.d.ts +0 -8
- package/esm/deps/deno.land/std@0.205.0/semver/test_range.js +0 -16
- package/esm/deps/deno.land/std@0.205.0/semver/types.d.ts +0 -44
- package/esm/deps/deno.land/std@0.205.0/semver/types.js +0 -2
- package/esm/deps/deno.land/std@0.51.0/fs/eol.d.ts +0 -12
- package/esm/deps/deno.land/std@0.51.0/fs/eol.js +0 -29
- package/esm/deps/deno.land/x/ini@v2.1.0/ini.d.ts +0 -53
- package/esm/deps/deno.land/x/ini@v2.1.0/ini.js +0 -226
- package/esm/deps/deno.land/x/ini@v2.1.0/mod.d.ts +0 -1
- package/esm/deps/deno.land/x/ini@v2.1.0/mod.js +0 -1
- package/esm/src/Change.d.ts +0 -8
- package/esm/src/Change.js +0 -48
- package/esm/src/Changelog.d.ts +0 -23
- package/esm/src/Changelog.js +0 -183
- package/esm/src/Release.d.ts +0 -28
- package/esm/src/Release.js +0 -220
- package/esm/src/deps.d.ts +0 -2
- package/esm/src/deps.js +0 -1
- package/esm/src/parser.d.ts +0 -11
- package/esm/src/parser.js +0 -178
- package/esm/src/settings.d.ts +0 -17
- package/esm/src/settings.js +0 -47
- package/script/bin.d.ts +0 -2
- package/script/deps/deno.land/std@0.189.0/_util/asserts.d.ts +0 -10
- package/script/deps/deno.land/std@0.189.0/_util/asserts.js +0 -27
- package/script/deps/deno.land/std@0.189.0/_util/os.d.ts +0 -4
- package/script/deps/deno.land/std@0.189.0/flags/mod.d.ts +0 -166
- package/script/deps/deno.land/std@0.189.0/flags/mod.js +0 -369
- package/script/deps/deno.land/std@0.189.0/path/_util.d.ts +0 -11
- package/script/deps/deno.land/std@0.189.0/path/_util.js +0 -174
- package/script/deps/deno.land/std@0.189.0/path/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.189.0/path/common.js +0 -40
- package/script/deps/deno.land/std@0.189.0/path/glob.js +0 -391
- package/script/deps/deno.land/std@0.189.0/path/mod.d.ts +0 -11
- package/script/deps/deno.land/std@0.189.0/path/mod.js +0 -66
- package/script/deps/deno.land/std@0.189.0/path/posix.d.ts +0 -86
- package/script/deps/deno.land/std@0.189.0/path/posix.js +0 -481
- package/script/deps/deno.land/std@0.189.0/path/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.189.0/path/separator.js +0 -8
- package/script/deps/deno.land/std@0.189.0/path/win32.d.ts +0 -91
- package/script/deps/deno.land/std@0.189.0/path/win32.js +0 -948
- package/script/deps/deno.land/std@0.205.0/semver/_shared.d.ts +0 -42
- package/script/deps/deno.land/std@0.205.0/semver/_shared.js +0 -248
- package/script/deps/deno.land/std@0.205.0/semver/cmp.d.ts +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/cmp.js +0 -39
- package/script/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/comparator_format.js +0 -15
- package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +0 -49
- package/script/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/comparator_max.js +0 -49
- package/script/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/comparator_min.js +0 -36
- package/script/deps/deno.land/std@0.205.0/semver/compare.d.ts +0 -10
- package/script/deps/deno.land/std@0.205.0/semver/compare.js +0 -22
- package/script/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +0 -13
- package/script/deps/deno.land/std@0.205.0/semver/compare_build.js +0 -27
- package/script/deps/deno.land/std@0.205.0/semver/constants.d.ts +0 -42
- package/script/deps/deno.land/std@0.205.0/semver/constants.js +0 -78
- package/script/deps/deno.land/std@0.205.0/semver/difference.d.ts +0 -4
- package/script/deps/deno.land/std@0.205.0/semver/difference.js +0 -30
- package/script/deps/deno.land/std@0.205.0/semver/eq.d.ts +0 -4
- package/script/deps/deno.land/std@0.205.0/semver/eq.js +0 -11
- package/script/deps/deno.land/std@0.205.0/semver/format.d.ts +0 -12
- package/script/deps/deno.land/std@0.205.0/semver/format.js +0 -58
- package/script/deps/deno.land/std@0.205.0/semver/gt.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/gt.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/gte.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/gte.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/gtr.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/gtr.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/increment.js +0 -211
- package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +0 -12
- package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +0 -35
- package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +0 -12
- package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.js +0 -26
- package/script/deps/deno.land/std@0.205.0/semver/lt.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/lt.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/lte.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/lte.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/ltr.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/ltr.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.js +0 -18
- package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.js +0 -18
- package/script/deps/deno.land/std@0.205.0/semver/neq.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/neq.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/outside.d.ts +0 -11
- package/script/deps/deno.land/std@0.205.0/semver/outside.js +0 -71
- package/script/deps/deno.land/std@0.205.0/semver/parse.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/parse.js +0 -70
- package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +0 -7
- package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.js +0 -32
- package/script/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +0 -7
- package/script/deps/deno.land/std@0.205.0/semver/parse_range.js +0 -296
- package/script/deps/deno.land/std@0.205.0/semver/range_format.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/range_format.js +0 -15
- package/script/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/range_intersects.js +0 -39
- package/script/deps/deno.land/std@0.205.0/semver/range_max.d.ts +0 -7
- package/script/deps/deno.land/std@0.205.0/semver/range_max.js +0 -19
- package/script/deps/deno.land/std@0.205.0/semver/range_min.d.ts +0 -7
- package/script/deps/deno.land/std@0.205.0/semver/range_min.js +0 -18
- package/script/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/rcompare.js +0 -14
- package/script/deps/deno.land/std@0.205.0/semver/rsort.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/rsort.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/sort.d.ts +0 -3
- package/script/deps/deno.land/std@0.205.0/semver/sort.js +0 -9
- package/script/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/test_comparator.js +0 -14
- package/script/deps/deno.land/std@0.205.0/semver/test_range.d.ts +0 -8
- package/script/deps/deno.land/std@0.205.0/semver/test_range.js +0 -20
- package/script/deps/deno.land/std@0.205.0/semver/types.d.ts +0 -44
- package/script/deps/deno.land/std@0.205.0/semver/types.js +0 -3
- package/script/deps/deno.land/std@0.51.0/fs/eol.d.ts +0 -12
- package/script/deps/deno.land/std@0.51.0/fs/eol.js +0 -34
- package/script/deps/deno.land/x/ini@v2.1.0/ini.d.ts +0 -53
- package/script/deps/deno.land/x/ini@v2.1.0/ini.js +0 -256
- package/script/deps/deno.land/x/ini@v2.1.0/mod.d.ts +0 -1
- package/script/deps/deno.land/x/ini@v2.1.0/mod.js +0 -17
- package/script/src/Change.d.ts +0 -8
- package/script/src/Change.js +0 -51
- package/script/src/Changelog.d.ts +0 -23
- package/script/src/Changelog.js +0 -186
- package/script/src/Release.d.ts +0 -28
- package/script/src/Release.js +0 -226
- package/script/src/deps.d.ts +0 -2
- package/script/src/deps.js +0 -8
- package/script/src/parser.d.ts +0 -11
- package/script/src/parser.js +0 -184
- package/script/src/settings.d.ts +0 -17
- package/script/src/settings.js +0 -51
- /package/esm/{test → keep-a-changelog/test}/changelog.custom.type.md +0 -0
- /package/esm/{test → keep-a-changelog/test}/changelog.expected.linted.md +0 -0
- /package/esm/{test → keep-a-changelog/test}/changelog.expected.md +0 -0
- /package/esm/{test → keep-a-changelog/test}/changelog.gitlab.md +0 -0
- /package/esm/{test → keep-a-changelog/test}/changelog.md +0 -0
- /package/esm/{test → keep-a-changelog/test}/empty.expected.md +0 -0
- /package/esm/{deps/deno.land/std@0.189.0/path/_constants.d.ts → std/path/_common/constants.d.ts} +0 -0
- /package/script/{test → keep-a-changelog/test}/changelog.custom.type.md +0 -0
- /package/script/{test → keep-a-changelog/test}/changelog.expected.linted.md +0 -0
- /package/script/{test → keep-a-changelog/test}/changelog.expected.md +0 -0
- /package/script/{test → keep-a-changelog/test}/changelog.gitlab.md +0 -0
- /package/script/{test → keep-a-changelog/test}/changelog.md +0 -0
- /package/script/{test → keep-a-changelog/test}/empty.expected.md +0 -0
- /package/script/{deps/deno.land/std@0.189.0/path/_constants.d.ts → std/path/_common/constants.d.ts} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Operator } from "./types.js";
|
|
2
|
-
export declare function compareNumber(a: number, b: number): 1 | 0 | -1;
|
|
3
|
-
export declare function checkIdentifier(v1: ReadonlyArray<string | number>, v2: ReadonlyArray<string | number>): 1 | 0 | -1;
|
|
4
|
-
export declare function compareIdentifier(v1: ReadonlyArray<string | number>, v2: ReadonlyArray<string | number>): 1 | 0 | -1;
|
|
5
|
-
declare const re: RegExp[];
|
|
6
|
-
declare const src: string[];
|
|
7
|
-
declare const NUMERICIDENTIFIER: number;
|
|
8
|
-
declare const FULL: number;
|
|
9
|
-
declare const XRANGE: number;
|
|
10
|
-
declare const TILDE: number;
|
|
11
|
-
declare const CARET: number;
|
|
12
|
-
declare const COMPARATOR: number;
|
|
13
|
-
declare const HYPHENRANGE: number;
|
|
14
|
-
declare const STAR: number;
|
|
15
|
-
/**
|
|
16
|
-
* Returns true if the value is a valid SemVer number.
|
|
17
|
-
*
|
|
18
|
-
* Must be a number. Must not be NaN. Can be positive or negative infinity.
|
|
19
|
-
* Can be between 0 and MAX_SAFE_INTEGER.
|
|
20
|
-
* @param value The value to check
|
|
21
|
-
* @returns True if its a valid semver number
|
|
22
|
-
*/
|
|
23
|
-
export declare function isValidNumber(value: unknown): value is number;
|
|
24
|
-
export declare const MAX_LENGTH = 256;
|
|
25
|
-
/**
|
|
26
|
-
* Returns true if the value is a valid semver pre-release or build identifier.
|
|
27
|
-
*
|
|
28
|
-
* Must be a string. Must be between 1 and 256 characters long. Must match
|
|
29
|
-
* the regular expression /[0-9A-Za-z-]+/.
|
|
30
|
-
* @param value The value to check
|
|
31
|
-
* @returns True if the value is a valid semver string.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isValidString(value: unknown): value is string;
|
|
34
|
-
/**
|
|
35
|
-
* Checks to see if the value is a valid Operator string.
|
|
36
|
-
*
|
|
37
|
-
* Adds a type assertion if true.
|
|
38
|
-
* @param value The value to check
|
|
39
|
-
* @returns True if the value is a valid Operator string otherwise false.
|
|
40
|
-
*/
|
|
41
|
-
export declare function isValidOperator(value: unknown): value is Operator;
|
|
42
|
-
export { CARET, COMPARATOR, FULL, HYPHENRANGE, NUMERICIDENTIFIER, re, src, STAR, TILDE, XRANGE, };
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
export function compareNumber(a, b) {
|
|
3
|
-
if (isNaN(a) || isNaN(b)) {
|
|
4
|
-
throw new Error("Comparison against non-numbers");
|
|
5
|
-
}
|
|
6
|
-
return a === b ? 0 : a < b ? -1 : 1;
|
|
7
|
-
}
|
|
8
|
-
export function checkIdentifier(v1, v2) {
|
|
9
|
-
// NOT having a prerelease is > having one
|
|
10
|
-
// But NOT having a build is < having one
|
|
11
|
-
if (v1.length && !v2.length) {
|
|
12
|
-
return -1;
|
|
13
|
-
}
|
|
14
|
-
else if (!v1.length && v2.length) {
|
|
15
|
-
return 1;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export function compareIdentifier(v1, v2) {
|
|
22
|
-
let i = 0;
|
|
23
|
-
do {
|
|
24
|
-
const a = v1[i];
|
|
25
|
-
const b = v2[i];
|
|
26
|
-
if (a === undefined && b === undefined) {
|
|
27
|
-
// same length is equal
|
|
28
|
-
return 0;
|
|
29
|
-
}
|
|
30
|
-
else if (b === undefined) {
|
|
31
|
-
// longer > shorter
|
|
32
|
-
return 1;
|
|
33
|
-
}
|
|
34
|
-
else if (a === undefined) {
|
|
35
|
-
// shorter < longer
|
|
36
|
-
return -1;
|
|
37
|
-
}
|
|
38
|
-
else if (typeof a === "string" && typeof b === "number") {
|
|
39
|
-
// string > number
|
|
40
|
-
return 1;
|
|
41
|
-
}
|
|
42
|
-
else if (typeof a === "number" && typeof b === "string") {
|
|
43
|
-
// number < string
|
|
44
|
-
return -1;
|
|
45
|
-
}
|
|
46
|
-
else if (a < b) {
|
|
47
|
-
return -1;
|
|
48
|
-
}
|
|
49
|
-
else if (a > b) {
|
|
50
|
-
return 1;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
// If they're equal, continue comparing segments.
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
} while (++i);
|
|
57
|
-
// It can't ever reach here, but typescript doesn't realize that so
|
|
58
|
-
// add this line so the return type is inferred correctly.
|
|
59
|
-
return 0;
|
|
60
|
-
}
|
|
61
|
-
// The actual regexps
|
|
62
|
-
const re = [];
|
|
63
|
-
const src = [];
|
|
64
|
-
let R = 0;
|
|
65
|
-
// The following Regular Expressions can be used for tokenizing,
|
|
66
|
-
// validating, and parsing SemVer version strings.
|
|
67
|
-
// ## Numeric Identifier
|
|
68
|
-
// A single `0`, or a non-zero digit followed by zero or more digits.
|
|
69
|
-
const NUMERICIDENTIFIER = R++;
|
|
70
|
-
src[NUMERICIDENTIFIER] = "0|[1-9]\\d*";
|
|
71
|
-
// ## Non-numeric Identifier
|
|
72
|
-
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
|
73
|
-
// more letters, digits, or hyphens.
|
|
74
|
-
const NONNUMERICIDENTIFIER = R++;
|
|
75
|
-
src[NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
|
|
76
|
-
// ## Main Version
|
|
77
|
-
// Three dot-separated numeric identifiers.
|
|
78
|
-
const MAINVERSION = R++;
|
|
79
|
-
const nid = src[NUMERICIDENTIFIER];
|
|
80
|
-
src[MAINVERSION] = `(${nid})\\.(${nid})\\.(${nid})`;
|
|
81
|
-
// ## Pre-release Version Identifier
|
|
82
|
-
// A numeric identifier, or a non-numeric identifier.
|
|
83
|
-
const PRERELEASEIDENTIFIER = R++;
|
|
84
|
-
src[PRERELEASEIDENTIFIER] = "(?:" + src[NUMERICIDENTIFIER] + "|" +
|
|
85
|
-
src[NONNUMERICIDENTIFIER] + ")";
|
|
86
|
-
// ## Pre-release Version
|
|
87
|
-
// Hyphen, followed by one or more dot-separated pre-release version
|
|
88
|
-
// identifiers.
|
|
89
|
-
const PRERELEASE = R++;
|
|
90
|
-
src[PRERELEASE] = "(?:-(" +
|
|
91
|
-
src[PRERELEASEIDENTIFIER] +
|
|
92
|
-
"(?:\\." +
|
|
93
|
-
src[PRERELEASEIDENTIFIER] +
|
|
94
|
-
")*))";
|
|
95
|
-
// ## Build Metadata Identifier
|
|
96
|
-
// Any combination of digits, letters, or hyphens.
|
|
97
|
-
const BUILDIDENTIFIER = R++;
|
|
98
|
-
src[BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
|
|
99
|
-
// ## Build Metadata
|
|
100
|
-
// Plus sign, followed by one or more period-separated build metadata
|
|
101
|
-
// identifiers.
|
|
102
|
-
const BUILD = R++;
|
|
103
|
-
src[BUILD] = "(?:\\+(" + src[BUILDIDENTIFIER] + "(?:\\." +
|
|
104
|
-
src[BUILDIDENTIFIER] + ")*))";
|
|
105
|
-
// ## Full Version String
|
|
106
|
-
// A main version, followed optionally by a pre-release version and
|
|
107
|
-
// build metadata.
|
|
108
|
-
// Note that the only major, minor, patch, and pre-release sections of
|
|
109
|
-
// the version string are capturing groups. The build metadata is not a
|
|
110
|
-
// capturing group, because it should not ever be used in version
|
|
111
|
-
// comparison.
|
|
112
|
-
const FULL = R++;
|
|
113
|
-
const FULLPLAIN = "v?" + src[MAINVERSION] + src[PRERELEASE] + "?" + src[BUILD] +
|
|
114
|
-
"?";
|
|
115
|
-
src[FULL] = "^" + FULLPLAIN + "$";
|
|
116
|
-
const GTLT = R++;
|
|
117
|
-
src[GTLT] = "((?:<|>)?=?)";
|
|
118
|
-
// Something like "2.*" or "1.2.x".
|
|
119
|
-
// Note that "x.x" is a valid xRange identifier, meaning "any version"
|
|
120
|
-
// Only the first item is strictly required.
|
|
121
|
-
const XRANGEIDENTIFIER = R++;
|
|
122
|
-
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + "|x|X|\\*";
|
|
123
|
-
const XRANGEPLAIN = R++;
|
|
124
|
-
src[XRANGEPLAIN] = "[v=\\s]*(" +
|
|
125
|
-
src[XRANGEIDENTIFIER] +
|
|
126
|
-
")" +
|
|
127
|
-
"(?:\\.(" +
|
|
128
|
-
src[XRANGEIDENTIFIER] +
|
|
129
|
-
")" +
|
|
130
|
-
"(?:\\.(" +
|
|
131
|
-
src[XRANGEIDENTIFIER] +
|
|
132
|
-
")" +
|
|
133
|
-
"(?:" +
|
|
134
|
-
src[PRERELEASE] +
|
|
135
|
-
")?" +
|
|
136
|
-
src[BUILD] +
|
|
137
|
-
"?" +
|
|
138
|
-
")?)?";
|
|
139
|
-
const XRANGE = R++;
|
|
140
|
-
src[XRANGE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAIN] + "$";
|
|
141
|
-
// Tilde ranges.
|
|
142
|
-
// Meaning is "reasonably at or greater than"
|
|
143
|
-
const LONETILDE = R++;
|
|
144
|
-
src[LONETILDE] = "(?:~>?)";
|
|
145
|
-
const TILDE = R++;
|
|
146
|
-
src[TILDE] = "^" + src[LONETILDE] + src[XRANGEPLAIN] + "$";
|
|
147
|
-
// Caret ranges.
|
|
148
|
-
// Meaning is "at least and backwards compatible with"
|
|
149
|
-
const LONECARET = R++;
|
|
150
|
-
src[LONECARET] = "(?:\\^)";
|
|
151
|
-
const CARET = R++;
|
|
152
|
-
src[CARET] = "^" + src[LONECARET] + src[XRANGEPLAIN] + "$";
|
|
153
|
-
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
154
|
-
const COMPARATOR = R++;
|
|
155
|
-
src[COMPARATOR] = "^" + src[GTLT] + "\\s*(" + FULLPLAIN + ")$|^$";
|
|
156
|
-
// Something like `1.2.3 - 1.2.4`
|
|
157
|
-
const HYPHENRANGE = R++;
|
|
158
|
-
src[HYPHENRANGE] = "^\\s*(" +
|
|
159
|
-
src[XRANGEPLAIN] +
|
|
160
|
-
")" +
|
|
161
|
-
"\\s+-\\s+" +
|
|
162
|
-
"(" +
|
|
163
|
-
src[XRANGEPLAIN] +
|
|
164
|
-
")" +
|
|
165
|
-
"\\s*$";
|
|
166
|
-
// Star ranges basically just allow anything at all.
|
|
167
|
-
const STAR = R++;
|
|
168
|
-
src[STAR] = "(<|>)?=?\\s*\\*";
|
|
169
|
-
// Compile to actual regexp objects.
|
|
170
|
-
// All are flag-free, unless they were created above with a flag.
|
|
171
|
-
for (let i = 0; i < R; i++) {
|
|
172
|
-
if (!re[i]) {
|
|
173
|
-
re[i] = new RegExp(src[i]);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Returns true if the value is a valid SemVer number.
|
|
178
|
-
*
|
|
179
|
-
* Must be a number. Must not be NaN. Can be positive or negative infinity.
|
|
180
|
-
* Can be between 0 and MAX_SAFE_INTEGER.
|
|
181
|
-
* @param value The value to check
|
|
182
|
-
* @returns True if its a valid semver number
|
|
183
|
-
*/
|
|
184
|
-
export function isValidNumber(value) {
|
|
185
|
-
return (typeof value === "number" &&
|
|
186
|
-
!Number.isNaN(value) && (!Number.isFinite(value) ||
|
|
187
|
-
(0 <= value && value <= Number.MAX_SAFE_INTEGER)));
|
|
188
|
-
}
|
|
189
|
-
export const MAX_LENGTH = 256;
|
|
190
|
-
/**
|
|
191
|
-
* Returns true if the value is a valid semver pre-release or build identifier.
|
|
192
|
-
*
|
|
193
|
-
* Must be a string. Must be between 1 and 256 characters long. Must match
|
|
194
|
-
* the regular expression /[0-9A-Za-z-]+/.
|
|
195
|
-
* @param value The value to check
|
|
196
|
-
* @returns True if the value is a valid semver string.
|
|
197
|
-
*/
|
|
198
|
-
export function isValidString(value) {
|
|
199
|
-
return (typeof value === "string" &&
|
|
200
|
-
value.length > 0 &&
|
|
201
|
-
value.length <= MAX_LENGTH &&
|
|
202
|
-
!!value.match(/[0-9A-Za-z-]+/));
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Checks to see if the value is a valid Operator string.
|
|
206
|
-
*
|
|
207
|
-
* Adds a type assertion if true.
|
|
208
|
-
* @param value The value to check
|
|
209
|
-
* @returns True if the value is a valid Operator string otherwise false.
|
|
210
|
-
*/
|
|
211
|
-
export function isValidOperator(value) {
|
|
212
|
-
if (typeof value !== "string")
|
|
213
|
-
return false;
|
|
214
|
-
switch (value) {
|
|
215
|
-
case "":
|
|
216
|
-
case "=":
|
|
217
|
-
case "==":
|
|
218
|
-
case "===":
|
|
219
|
-
case "!==":
|
|
220
|
-
case "!=":
|
|
221
|
-
case ">":
|
|
222
|
-
case ">=":
|
|
223
|
-
case "<":
|
|
224
|
-
case "<=":
|
|
225
|
-
return true;
|
|
226
|
-
default:
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
export { CARET, COMPARATOR, FULL, HYPHENRANGE, NUMERICIDENTIFIER, re, src, STAR, TILDE, XRANGE, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Operator, SemVer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Do a comparison of two semantic version objects based on the given operator
|
|
4
|
-
* @param s0 The left side of the comparison
|
|
5
|
-
* @param operator The operator to use for the comparison
|
|
6
|
-
* @param s1 The right side of the comparison
|
|
7
|
-
* @returns True or false based on the operator
|
|
8
|
-
*/
|
|
9
|
-
export declare function cmp(s0: SemVer, operator: Operator, s1: SemVer): boolean;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { eq } from "./eq.js";
|
|
2
|
-
import { neq } from "./neq.js";
|
|
3
|
-
import { gte } from "./gte.js";
|
|
4
|
-
import { gt } from "./gt.js";
|
|
5
|
-
import { lt } from "./lt.js";
|
|
6
|
-
import { lte } from "./lte.js";
|
|
7
|
-
/**
|
|
8
|
-
* Do a comparison of two semantic version objects based on the given operator
|
|
9
|
-
* @param s0 The left side of the comparison
|
|
10
|
-
* @param operator The operator to use for the comparison
|
|
11
|
-
* @param s1 The right side of the comparison
|
|
12
|
-
* @returns True or false based on the operator
|
|
13
|
-
*/
|
|
14
|
-
export function cmp(s0, operator, s1) {
|
|
15
|
-
switch (operator) {
|
|
16
|
-
case "":
|
|
17
|
-
case "=":
|
|
18
|
-
case "==":
|
|
19
|
-
case "===":
|
|
20
|
-
return eq(s0, s1);
|
|
21
|
-
case "!=":
|
|
22
|
-
case "!==":
|
|
23
|
-
return neq(s0, s1);
|
|
24
|
-
case ">":
|
|
25
|
-
return gt(s0, s1);
|
|
26
|
-
case ">=":
|
|
27
|
-
return gte(s0, s1);
|
|
28
|
-
case "<":
|
|
29
|
-
return lt(s0, s1);
|
|
30
|
-
case "<=":
|
|
31
|
-
return lte(s0, s1);
|
|
32
|
-
default:
|
|
33
|
-
throw new TypeError(`Invalid operator: ${operator}`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SemVerComparator } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Formats the comparator into a string
|
|
4
|
-
* @example >=0.0.0
|
|
5
|
-
* @param comparator
|
|
6
|
-
* @returns A string representation of the comparator
|
|
7
|
-
*/
|
|
8
|
-
export declare function comparatorFormat(comparator: SemVerComparator): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { format } from "./format.js";
|
|
2
|
-
/**
|
|
3
|
-
* Formats the comparator into a string
|
|
4
|
-
* @example >=0.0.0
|
|
5
|
-
* @param comparator
|
|
6
|
-
* @returns A string representation of the comparator
|
|
7
|
-
*/
|
|
8
|
-
export function comparatorFormat(comparator) {
|
|
9
|
-
const { semver, operator } = comparator;
|
|
10
|
-
return `${operator}${format(semver)}`;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SemVerComparator } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the range of possible versions intersects with the other comparators set of possible versions
|
|
4
|
-
* @param c0 The left side comparator
|
|
5
|
-
* @param c1 The right side comparator
|
|
6
|
-
* @returns True if any part of the comparators intersect
|
|
7
|
-
*/
|
|
8
|
-
export declare function comparatorIntersects(c0: SemVerComparator, c1: SemVerComparator): boolean;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { gte } from "./gte.js";
|
|
2
|
-
import { lte } from "./lte.js";
|
|
3
|
-
/**
|
|
4
|
-
* Returns true if the range of possible versions intersects with the other comparators set of possible versions
|
|
5
|
-
* @param c0 The left side comparator
|
|
6
|
-
* @param c1 The right side comparator
|
|
7
|
-
* @returns True if any part of the comparators intersect
|
|
8
|
-
*/
|
|
9
|
-
export function comparatorIntersects(c0, c1) {
|
|
10
|
-
const l0 = c0.min;
|
|
11
|
-
const l1 = c0.max;
|
|
12
|
-
const r0 = c1.min;
|
|
13
|
-
const r1 = c1.max;
|
|
14
|
-
// We calculate the min and max ranges of both comparators.
|
|
15
|
-
// The minimum min is 0.0.0, the maximum max is ANY.
|
|
16
|
-
//
|
|
17
|
-
// Comparators with equality operators have the same min and max.
|
|
18
|
-
//
|
|
19
|
-
// We then check to see if the min's of either range falls within the span of the other range.
|
|
20
|
-
//
|
|
21
|
-
// A couple of intersection examples:
|
|
22
|
-
// ```
|
|
23
|
-
// l0 ---- l1
|
|
24
|
-
// r0 ---- r1
|
|
25
|
-
// ```
|
|
26
|
-
// ```
|
|
27
|
-
// l0 ---- l1
|
|
28
|
-
// r0 ---- r1
|
|
29
|
-
// ```
|
|
30
|
-
// ```
|
|
31
|
-
// l0 ------ l1
|
|
32
|
-
// r0--r1
|
|
33
|
-
// ```
|
|
34
|
-
// ```
|
|
35
|
-
// l0 - l1
|
|
36
|
-
// r0 - r1
|
|
37
|
-
// ```
|
|
38
|
-
//
|
|
39
|
-
// non-intersection example
|
|
40
|
-
// ```
|
|
41
|
-
// l0 -- l1
|
|
42
|
-
// r0 -- r1
|
|
43
|
-
// ```
|
|
44
|
-
return (gte(l0, r0) && lte(l0, r1)) || (gte(r0, l0) && lte(r0, l1));
|
|
45
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Operator, SemVer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* The maximum version that could match this comparator.
|
|
4
|
-
*
|
|
5
|
-
* If an invalid comparator is given such as <0.0.0 then
|
|
6
|
-
* an out of range semver will be returned.
|
|
7
|
-
* @returns the version, the MAX version or the next smallest patch version
|
|
8
|
-
*/
|
|
9
|
-
export declare function comparatorMax(semver: SemVer, operator: Operator): SemVer;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ANY, INVALID, MAX } from "./constants.js";
|
|
2
|
-
/**
|
|
3
|
-
* The maximum version that could match this comparator.
|
|
4
|
-
*
|
|
5
|
-
* If an invalid comparator is given such as <0.0.0 then
|
|
6
|
-
* an out of range semver will be returned.
|
|
7
|
-
* @returns the version, the MAX version or the next smallest patch version
|
|
8
|
-
*/
|
|
9
|
-
export function comparatorMax(semver, operator) {
|
|
10
|
-
if (semver === ANY) {
|
|
11
|
-
return MAX;
|
|
12
|
-
}
|
|
13
|
-
switch (operator) {
|
|
14
|
-
case "!=":
|
|
15
|
-
case "!==":
|
|
16
|
-
case ">":
|
|
17
|
-
case ">=":
|
|
18
|
-
return MAX;
|
|
19
|
-
case "":
|
|
20
|
-
case "=":
|
|
21
|
-
case "==":
|
|
22
|
-
case "===":
|
|
23
|
-
case "<=":
|
|
24
|
-
return semver;
|
|
25
|
-
case "<": {
|
|
26
|
-
const patch = semver.patch - 1;
|
|
27
|
-
const minor = patch >= 0 ? semver.minor : semver.minor - 1;
|
|
28
|
-
const major = minor >= 0 ? semver.major : semver.major - 1;
|
|
29
|
-
// if you try to do <0.0.0 it will Give you -∞.∞.∞
|
|
30
|
-
// which means no SemVer can compare successfully to it.
|
|
31
|
-
if (major < 0) {
|
|
32
|
-
return INVALID;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return {
|
|
36
|
-
major,
|
|
37
|
-
minor: minor >= 0 ? minor : Number.POSITIVE_INFINITY,
|
|
38
|
-
patch: patch >= 0 ? patch : Number.POSITIVE_INFINITY,
|
|
39
|
-
prerelease: [],
|
|
40
|
-
build: [],
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Operator, SemVer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* The minimum semantic version that could match this comparator
|
|
4
|
-
* @param semver The semantic version of the comparator
|
|
5
|
-
* @param operator The operator of the comparator
|
|
6
|
-
* @returns The minimum valid semantic version
|
|
7
|
-
*/
|
|
8
|
-
export declare function comparatorMin(semver: SemVer, operator: Operator): SemVer;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ANY, MAX, MIN } from "./constants.js";
|
|
2
|
-
import { gt } from "./gt.js";
|
|
3
|
-
import { increment } from "./increment.js";
|
|
4
|
-
/**
|
|
5
|
-
* The minimum semantic version that could match this comparator
|
|
6
|
-
* @param semver The semantic version of the comparator
|
|
7
|
-
* @param operator The operator of the comparator
|
|
8
|
-
* @returns The minimum valid semantic version
|
|
9
|
-
*/
|
|
10
|
-
export function comparatorMin(semver, operator) {
|
|
11
|
-
if (semver === ANY) {
|
|
12
|
-
return MIN;
|
|
13
|
-
}
|
|
14
|
-
switch (operator) {
|
|
15
|
-
case ">":
|
|
16
|
-
return semver.prerelease.length > 0
|
|
17
|
-
? increment(semver, "pre")
|
|
18
|
-
: increment(semver, "patch");
|
|
19
|
-
case "!=":
|
|
20
|
-
case "!==":
|
|
21
|
-
case "<=":
|
|
22
|
-
case "<":
|
|
23
|
-
// The min(<0.0.0) is MAX
|
|
24
|
-
return gt(semver, MIN) ? MIN : MAX;
|
|
25
|
-
case ">=":
|
|
26
|
-
case "":
|
|
27
|
-
case "=":
|
|
28
|
-
case "==":
|
|
29
|
-
case "===":
|
|
30
|
-
return semver;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { SemVer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare two semantic version objects.
|
|
4
|
-
*
|
|
5
|
-
* Returns `0` if `v1 === v2`, or `1` if `v1` is greater, or `-1` if `v2` is
|
|
6
|
-
* greater.
|
|
7
|
-
*
|
|
8
|
-
* Sorts in ascending order if passed to `Array.sort()`,
|
|
9
|
-
*/
|
|
10
|
-
export declare function compare(s0: SemVer, s1: SemVer): 1 | 0 | -1;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { checkIdentifier, compareIdentifier, compareNumber, } from "./_shared.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare two semantic version objects.
|
|
4
|
-
*
|
|
5
|
-
* Returns `0` if `v1 === v2`, or `1` if `v1` is greater, or `-1` if `v2` is
|
|
6
|
-
* greater.
|
|
7
|
-
*
|
|
8
|
-
* Sorts in ascending order if passed to `Array.sort()`,
|
|
9
|
-
*/
|
|
10
|
-
export function compare(s0, s1) {
|
|
11
|
-
if (s0 === s1)
|
|
12
|
-
return 0;
|
|
13
|
-
return (compareNumber(s0.major, s1.major) ||
|
|
14
|
-
compareNumber(s0.minor, s1.minor) ||
|
|
15
|
-
compareNumber(s0.patch, s1.patch) ||
|
|
16
|
-
checkIdentifier(s0.prerelease, s1.prerelease) ||
|
|
17
|
-
compareIdentifier(s0.prerelease, s1.prerelease));
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { SemVer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare two semantic version objects including build metadata.
|
|
4
|
-
*
|
|
5
|
-
* Returns `0` if `v1 === v2`, or `1` if `v1` is greater, or `-1` if `v2` is
|
|
6
|
-
* greater.
|
|
7
|
-
*
|
|
8
|
-
* Sorts in ascending order if passed to `Array.sort()`,
|
|
9
|
-
* @param s0
|
|
10
|
-
* @param s1
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export declare function compareBuild(s0: SemVer, s1: SemVer): 1 | 0 | -1;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { checkIdentifier, compareIdentifier, compareNumber, } from "./_shared.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare two semantic version objects including build metadata.
|
|
4
|
-
*
|
|
5
|
-
* Returns `0` if `v1 === v2`, or `1` if `v1` is greater, or `-1` if `v2` is
|
|
6
|
-
* greater.
|
|
7
|
-
*
|
|
8
|
-
* Sorts in ascending order if passed to `Array.sort()`,
|
|
9
|
-
* @param s0
|
|
10
|
-
* @param s1
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export function compareBuild(s0, s1) {
|
|
14
|
-
if (s0 === s1)
|
|
15
|
-
return 0;
|
|
16
|
-
return (compareNumber(s0.major, s1.major) ||
|
|
17
|
-
compareNumber(s0.minor, s1.minor) ||
|
|
18
|
-
compareNumber(s0.patch, s1.patch) ||
|
|
19
|
-
checkIdentifier(s0.prerelease, s1.prerelease) ||
|
|
20
|
-
compareIdentifier(s0.prerelease, s1.prerelease) ||
|
|
21
|
-
checkIdentifier(s1.build, s0.build) ||
|
|
22
|
-
compareIdentifier(s0.build, s1.build));
|
|
23
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { SemVer, SemVerComparator } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* MAX is a sentinel value used by some range calculations.
|
|
4
|
-
* It is equivalent to `∞.∞.∞`.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MAX: SemVer;
|
|
7
|
-
/**
|
|
8
|
-
* The minimum valid SemVer object. Equivalent to `0.0.0`.
|
|
9
|
-
*/
|
|
10
|
-
export declare const MIN: SemVer;
|
|
11
|
-
/**
|
|
12
|
-
* A sentinel value used to denote an invalid SemVer object
|
|
13
|
-
* which may be the result of impossible ranges or comparator operations.
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* import { eq } from "https://deno.land/std@$STD_VERSION/semver/eq.ts";
|
|
17
|
-
* import { parse } from "https://deno.land/std@$STD_VERSION/semver/parse.ts";
|
|
18
|
-
* import { INVALID } from "https://deno.land/std@$STD_VERSION/semver/constants.ts"
|
|
19
|
-
* eq(parse("1.2.3"), INVALID);
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare const INVALID: SemVer;
|
|
23
|
-
/**
|
|
24
|
-
* ANY is a sentinel value used by some range calculations. It is not a valid
|
|
25
|
-
* SemVer object and should not be used directly.
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* import { eq } from "https://deno.land/std@$STD_VERSION/semver/eq.ts";
|
|
29
|
-
* import { parse } from "https://deno.land/std@$STD_VERSION/semver/parse.ts";
|
|
30
|
-
* import { ANY } from "https://deno.land/std@$STD_VERSION/semver/constants.ts"
|
|
31
|
-
* eq(parse("1.2.3"), ANY); // false
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare const ANY: SemVer;
|
|
35
|
-
/**
|
|
36
|
-
* A comparator which will span all valid semantic versions
|
|
37
|
-
*/
|
|
38
|
-
export declare const ALL: SemVerComparator;
|
|
39
|
-
/**
|
|
40
|
-
* A comparator which will not span any semantic versions
|
|
41
|
-
*/
|
|
42
|
-
export declare const NONE: SemVerComparator;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MAX is a sentinel value used by some range calculations.
|
|
3
|
-
* It is equivalent to `∞.∞.∞`.
|
|
4
|
-
*/
|
|
5
|
-
export const MAX = {
|
|
6
|
-
major: Number.POSITIVE_INFINITY,
|
|
7
|
-
minor: Number.POSITIVE_INFINITY,
|
|
8
|
-
patch: Number.POSITIVE_INFINITY,
|
|
9
|
-
prerelease: [],
|
|
10
|
-
build: [],
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* The minimum valid SemVer object. Equivalent to `0.0.0`.
|
|
14
|
-
*/
|
|
15
|
-
export const MIN = {
|
|
16
|
-
major: 0,
|
|
17
|
-
minor: 0,
|
|
18
|
-
patch: 0,
|
|
19
|
-
prerelease: [],
|
|
20
|
-
build: [],
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* A sentinel value used to denote an invalid SemVer object
|
|
24
|
-
* which may be the result of impossible ranges or comparator operations.
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* import { eq } from "https://deno.land/std@$STD_VERSION/semver/eq.ts";
|
|
28
|
-
* import { parse } from "https://deno.land/std@$STD_VERSION/semver/parse.ts";
|
|
29
|
-
* import { INVALID } from "https://deno.land/std@$STD_VERSION/semver/constants.ts"
|
|
30
|
-
* eq(parse("1.2.3"), INVALID);
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export const INVALID = {
|
|
34
|
-
major: Number.NEGATIVE_INFINITY,
|
|
35
|
-
minor: Number.POSITIVE_INFINITY,
|
|
36
|
-
patch: Number.POSITIVE_INFINITY,
|
|
37
|
-
prerelease: [],
|
|
38
|
-
build: [],
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* ANY is a sentinel value used by some range calculations. It is not a valid
|
|
42
|
-
* SemVer object and should not be used directly.
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* import { eq } from "https://deno.land/std@$STD_VERSION/semver/eq.ts";
|
|
46
|
-
* import { parse } from "https://deno.land/std@$STD_VERSION/semver/parse.ts";
|
|
47
|
-
* import { ANY } from "https://deno.land/std@$STD_VERSION/semver/constants.ts"
|
|
48
|
-
* eq(parse("1.2.3"), ANY); // false
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export const ANY = {
|
|
52
|
-
major: Number.NaN,
|
|
53
|
-
minor: Number.NaN,
|
|
54
|
-
patch: Number.NaN,
|
|
55
|
-
prerelease: [],
|
|
56
|
-
build: [],
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* A comparator which will span all valid semantic versions
|
|
60
|
-
*/
|
|
61
|
-
export const ALL = {
|
|
62
|
-
operator: "",
|
|
63
|
-
semver: ANY,
|
|
64
|
-
min: MIN,
|
|
65
|
-
max: MAX,
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* A comparator which will not span any semantic versions
|
|
69
|
-
*/
|
|
70
|
-
export const NONE = {
|
|
71
|
-
operator: "<",
|
|
72
|
-
semver: MIN,
|
|
73
|
-
min: MAX,
|
|
74
|
-
max: MIN,
|
|
75
|
-
};
|