@fedify/fedify 0.9.0-dev.177 → 0.9.0-dev.179
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @fedify/fedify might be problematic. Click here for more details.
- package/CHANGES.md +2 -0
- package/esm/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/base64.js +14 -7
- package/esm/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/hex.js +24 -7
- package/esm/deps/jsr.io/@std/semver/0.224.1/can_parse.js +30 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/compare.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/difference.js +37 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/equals.js +27 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format.js +14 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format_range.js +9 -1
- package/esm/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.js +25 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/greater_than.js +27 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/greater_than_range.js +19 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/increment.js +18 -2
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_range.js +10 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_semver.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/less_or_equal.js +25 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/less_than.js +25 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/less_than_range.js +21 -3
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/max_satisfying.js +12 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/min_satisfying.js +12 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.js +3 -2
- package/esm/deps/jsr.io/@std/semver/0.224.1/not_equals.js +24 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/parse.js +16 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/parse_range.js +18 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_intersects.js +16 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_max.js +16 -5
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_min.js +16 -5
- package/esm/deps/jsr.io/@std/semver/0.224.1/satisfies.js +26 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/test_range.js +28 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/try_parse.js +30 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/try_parse_range.js +16 -1
- package/esm/federation/collection.js +1 -1
- package/esm/federation/handler.js +1 -1
- package/esm/httpsig/mod.js +1 -1
- package/esm/nodeinfo/types.js +1 -1
- package/esm/runtime/key.js +1 -1
- package/esm/vocab/tombstone.yaml +20 -0
- package/esm/vocab/vocab.js +165 -0
- package/package.json +1 -1
- package/types/deps/jsr.io/@std/assert/0.225.3/assert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/0.225.3/assertion_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{0.224.2/_util.d.ts → 0.224.3/_validate_binary_like.d.ts} +1 -1
- package/types/deps/jsr.io/@std/encoding/0.224.3/_validate_binary_like.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/base64.d.ts +9 -4
- package/types/deps/jsr.io/@std/encoding/0.224.3/base64.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/0.224.3/hex.d.ts +37 -0
- package/types/deps/jsr.io/@std/encoding/0.224.3/hex.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/negotiation.d.ts +27 -6
- package/types/deps/jsr.io/@std/http/0.224.2/negotiation.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/_constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/can_parse.d.ts +17 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/can_parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/compare.d.ts +28 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/compare.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/difference.d.ts +27 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/difference.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/equals.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format.d.ts +14 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/format_range.d.ts +17 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/format_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than_range.d.ts +22 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/increment.d.ts +18 -2
- package/types/deps/jsr.io/@std/semver/0.224.1/increment.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_range.d.ts +10 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/is_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_semver.d.ts +16 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/is_semver.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_or_equal.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than_range.d.ts +22 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/max_satisfying.d.ts +12 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/max_satisfying.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/min_satisfying.d.ts +12 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/min_satisfying.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.d.ts +3 -2
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/not_equals.d.ts +23 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/not_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse.d.ts +25 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse_range.d.ts +26 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/range_intersects.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/range_intersects.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_max.d.ts +16 -5
- package/types/deps/jsr.io/@std/semver/0.224.1/range_max.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_min.d.ts +16 -5
- package/types/deps/jsr.io/@std/semver/0.224.1/range_min.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/satisfies.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/satisfies.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/test_range.d.ts +27 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/test_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse.d.ts +21 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse_range.d.ts +23 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/types.d.ts +7 -2
- package/types/deps/jsr.io/@std/semver/0.224.1/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/_util.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/case.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/0.224.1/closest_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/0.224.1/compare_similarity.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/levenshtein_distance.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/0.224.1/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/0.224.1/word_similarity_sort.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_dumper/dumper.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_dumper/dumper_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_error.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_loader/loader.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_loader/loader_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_mark.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/binary.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/bool.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/float.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/function.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/int.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/map.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/merge.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/nil.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/omap.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/pairs.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/regexp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/seq.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/set.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/str.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/timestamp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/undefined.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/0.224.1/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/parse.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/core.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/default.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/extended.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/failsafe.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/json.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/stringify.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/type.d.ts.map +1 -1
- package/types/nodeinfo/types.d.ts +1 -1
- package/types/vocab/vocab.d.ts +143 -0
- package/types/vocab/vocab.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/semver/0.224.0/can_parse.js +0 -15
- package/esm/deps/jsr.io/@std/semver/0.224.0/difference.js +0 -16
- package/esm/deps/jsr.io/@std/semver/0.224.0/equals.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/greater_than.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/less_or_equal.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/less_than.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/not_equals.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/satisfies.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/test_range.js +0 -13
- package/esm/deps/jsr.io/@std/semver/0.224.0/try_parse.js +0 -17
- package/types/deps/jsr.io/@std/encoding/0.224.2/_util.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/0.224.2/base64.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/0.224.2/hex.d.ts +0 -24
- package/types/deps/jsr.io/@std/encoding/0.224.2/hex.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/http/0.224.1/negotiation.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/_constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/can_parse.d.ts +0 -2
- package/types/deps/jsr.io/@std/semver/0.224.0/can_parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/compare.d.ts +0 -11
- package/types/deps/jsr.io/@std/semver/0.224.0/compare.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/difference.d.ts +0 -6
- package/types/deps/jsr.io/@std/semver/0.224.0/difference.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/equals.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/format_range.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/format_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts +0 -4
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/increment.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/is_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/is_semver.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_or_equal.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/less_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts +0 -4
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/max_satisfying.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/min_satisfying.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/not_equals.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/not_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/parse.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/parse_range.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/parse_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_intersects.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/range_intersects.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_max.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_min.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/satisfies.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/satisfies.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts +0 -12
- package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse_range.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/closest_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/compare_similarity.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/word_similarity_sort.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/0.224.0/_utils.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/encoding/{0.224.2/_util.js → 0.224.3/_validate_binary_like.js} +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/negotiation.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_constants.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/types.js +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.d.ts +0 -0
package/CHANGES.md
CHANGED
@@ -12,15 +12,17 @@
|
|
12
12
|
* encodeBase64,
|
13
13
|
* decodeBase64,
|
14
14
|
* } from "@std/encoding/base64";
|
15
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
15
16
|
*
|
16
|
-
* const
|
17
|
+
* const foobar = new TextEncoder().encode("foobar");
|
17
18
|
*
|
18
|
-
*
|
19
|
+
* assertEquals(encodeBase64(foobar), "Zm9vYmFy");
|
20
|
+
* assertEquals(decodeBase64("Zm9vYmFy"), foobar);
|
19
21
|
* ```
|
20
22
|
*
|
21
23
|
* @module
|
22
24
|
*/
|
23
|
-
import { validateBinaryLike } from "./
|
25
|
+
import { validateBinaryLike } from "./_validate_binary_like.js";
|
24
26
|
const base64abc = [
|
25
27
|
"A",
|
26
28
|
"B",
|
@@ -95,11 +97,12 @@ const base64abc = [
|
|
95
97
|
* @param data The data to encode.
|
96
98
|
* @returns The base64-encoded string.
|
97
99
|
*
|
98
|
-
* @example
|
100
|
+
* @example Usage
|
99
101
|
* ```ts
|
100
102
|
* import { encodeBase64 } from "@std/encoding/base64";
|
103
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
101
104
|
*
|
102
|
-
* encodeBase64("foobar")
|
105
|
+
* assertEquals(encodeBase64("foobar"), "Zm9vYmFy");
|
103
106
|
* ```
|
104
107
|
*/
|
105
108
|
export function encodeBase64(data) {
|
@@ -140,11 +143,15 @@ export function encodeBase64(data) {
|
|
140
143
|
* @param b64 The base64-encoded string to decode.
|
141
144
|
* @returns The decoded data.
|
142
145
|
*
|
143
|
-
* @example
|
146
|
+
* @example Usage
|
144
147
|
* ```ts
|
145
148
|
* import { decodeBase64 } from "@std/encoding/base64";
|
149
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
146
150
|
*
|
147
|
-
*
|
151
|
+
* assertEquals(
|
152
|
+
* decodeBase64("Zm9vYmFy"),
|
153
|
+
* new TextEncoder().encode("foobar")
|
154
|
+
* );
|
148
155
|
* ```
|
149
156
|
*/
|
150
157
|
export function decodeBase64(b64) {
|
@@ -14,15 +14,19 @@
|
|
14
14
|
* decodeHex,
|
15
15
|
* encodeHex,
|
16
16
|
* } from "@std/encoding/hex";
|
17
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
17
18
|
*
|
18
|
-
*
|
19
|
+
* assertEquals(encodeHex("abc"), "616263");
|
19
20
|
*
|
20
|
-
*
|
21
|
+
* assertEquals(
|
22
|
+
* decodeHex("616263"),
|
23
|
+
* new TextEncoder().encode("abc"),
|
24
|
+
* );
|
21
25
|
* ```
|
22
26
|
*
|
23
27
|
* @module
|
24
28
|
*/
|
25
|
-
import { validateBinaryLike } from "./
|
29
|
+
import { validateBinaryLike } from "./_validate_binary_like.js";
|
26
30
|
const hexTable = new TextEncoder().encode("0123456789abcdef");
|
27
31
|
const textEncoder = new TextEncoder();
|
28
32
|
const textDecoder = new TextDecoder();
|
@@ -48,11 +52,16 @@ function fromHexChar(byte) {
|
|
48
52
|
/**
|
49
53
|
* Converts data into a hex-encoded string.
|
50
54
|
*
|
51
|
-
* @
|
55
|
+
* @param src The data to encode.
|
56
|
+
*
|
57
|
+
* @returns The hex-encoded string.
|
58
|
+
*
|
59
|
+
* @example Usage
|
52
60
|
* ```ts
|
53
61
|
* import { encodeHex } from "@std/encoding/hex";
|
62
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
54
63
|
*
|
55
|
-
* encodeHex("abc")
|
64
|
+
* assertEquals(encodeHex("abc"), "616263");
|
56
65
|
* ```
|
57
66
|
*/
|
58
67
|
export function encodeHex(src) {
|
@@ -69,11 +78,19 @@ export function encodeHex(src) {
|
|
69
78
|
* Decodes the given hex-encoded string. If the input is malformed, an error is
|
70
79
|
* thrown.
|
71
80
|
*
|
72
|
-
* @
|
81
|
+
* @param src The hex-encoded string to decode.
|
82
|
+
*
|
83
|
+
* @returns The decoded data.
|
84
|
+
*
|
85
|
+
* @example Usage
|
73
86
|
* ```ts
|
74
87
|
* import { decodeHex } from "@std/encoding/hex";
|
88
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
75
89
|
*
|
76
|
-
*
|
90
|
+
* assertEquals(
|
91
|
+
* decodeHex("616263"),
|
92
|
+
* new TextEncoder().encode("abc"),
|
93
|
+
* );
|
77
94
|
* ```
|
78
95
|
*/
|
79
96
|
export function decodeHex(src) {
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { parse } from "./parse.js";
|
4
|
+
/**
|
5
|
+
* Returns true if the string can be parsed as SemVer.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { canParse } from "@std/semver/can-parse";
|
10
|
+
* import { assert, assertFalse } from "@std/assert";
|
11
|
+
*
|
12
|
+
* assert(canParse("1.2.3"));
|
13
|
+
* assertFalse(canParse("invalid"));
|
14
|
+
* ```
|
15
|
+
*
|
16
|
+
* @param version The version string to check
|
17
|
+
* @returns `true` if the string can be parsed as SemVer, `false` otherwise
|
18
|
+
*/
|
19
|
+
export function canParse(version) {
|
20
|
+
try {
|
21
|
+
parse(version);
|
22
|
+
return true;
|
23
|
+
}
|
24
|
+
catch (err) {
|
25
|
+
if (!(err instanceof TypeError)) {
|
26
|
+
throw err;
|
27
|
+
}
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
}
|
@@ -6,6 +6,23 @@ import { checkIdentifier, compareIdentifier, compareNumber, } from "./_shared.js
|
|
6
6
|
* greater.
|
7
7
|
*
|
8
8
|
* Sorts in ascending order if passed to `Array.sort()`,
|
9
|
+
*
|
10
|
+
* @example Usage
|
11
|
+
* ```ts
|
12
|
+
* import { parse, compare } from "@std/semver";
|
13
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
14
|
+
*
|
15
|
+
* const s0 = parse("1.2.3");
|
16
|
+
* const s1 = parse("1.2.4");
|
17
|
+
*
|
18
|
+
* assertEquals(compare(s0, s1), -1);
|
19
|
+
* assertEquals(compare(s1, s0), 1);
|
20
|
+
* assertEquals(compare(s0, s0), 0);
|
21
|
+
* ```
|
22
|
+
*
|
23
|
+
* @param s0 The first SemVer to compare
|
24
|
+
* @param s1 The second SemVer to compare
|
25
|
+
* @returns `1` if `s0` is greater, `0` if equal, or `-1` if `s1` is greater
|
9
26
|
*/
|
10
27
|
export function compare(s0, s1) {
|
11
28
|
if (s0 === s1)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { compareIdentifier } from "./_shared.js";
|
2
|
+
/**
|
3
|
+
* Returns difference between two versions by the release type,
|
4
|
+
* or `undefined` if the versions are the same.
|
5
|
+
*
|
6
|
+
* @example Usage
|
7
|
+
* ```ts
|
8
|
+
* import { parse, difference } from "@std/semver";
|
9
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
10
|
+
*
|
11
|
+
* const s0 = parse("1.2.3");
|
12
|
+
* const s1 = parse("1.2.4");
|
13
|
+
* const s2 = parse("1.3.0");
|
14
|
+
* const s3 = parse("2.0.0");
|
15
|
+
*
|
16
|
+
* assertEquals(difference(s0, s1), "patch");
|
17
|
+
* assertEquals(difference(s0, s2), "minor");
|
18
|
+
* assertEquals(difference(s0, s3), "major");
|
19
|
+
* assertEquals(difference(s0, s0), undefined);
|
20
|
+
* ```
|
21
|
+
*
|
22
|
+
* @param s0 The first SemVer to compare
|
23
|
+
* @param s1 The second SemVer to compare
|
24
|
+
* @returns The release type difference or `undefined` if the versions are the same
|
25
|
+
*/
|
26
|
+
export function difference(s0, s1) {
|
27
|
+
const hasPrerelease = s0.prerelease?.length || s1.prerelease?.length;
|
28
|
+
if (s0.major !== s1.major)
|
29
|
+
return hasPrerelease ? "premajor" : "major";
|
30
|
+
if (s0.minor !== s1.minor)
|
31
|
+
return hasPrerelease ? "preminor" : "minor";
|
32
|
+
if (s0.patch !== s1.patch)
|
33
|
+
return hasPrerelease ? "prepatch" : "patch";
|
34
|
+
if (compareIdentifier(s0.prerelease, s1.prerelease) !== 0) {
|
35
|
+
return "prerelease";
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { compare } from "./compare.js";
|
4
|
+
/**
|
5
|
+
* Returns `true` if both semantic versions are logically equivalent, even if they're not the exact same version object.
|
6
|
+
*
|
7
|
+
* This is equal to `compare(s0, s1) === 0`.
|
8
|
+
*
|
9
|
+
* @example Usage
|
10
|
+
* ```ts
|
11
|
+
* import { parse, equals } from "@std/semver";
|
12
|
+
* import { assert, assertFalse } from "@std/assert";
|
13
|
+
*
|
14
|
+
* const s0 = parse("1.2.3");
|
15
|
+
* const s1 = parse("1.2.3");
|
16
|
+
*
|
17
|
+
* assert(equals(s0, s1));
|
18
|
+
* assertFalse(equals(s0, parse("1.2.4")));
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @param s0 The first SemVer to compare
|
22
|
+
* @param s1 The second SemVer to compare
|
23
|
+
* @returns `true` if `s0` is equal to `s1`, `false` otherwise
|
24
|
+
*/
|
25
|
+
export function equals(s0, s1) {
|
26
|
+
return compare(s0, s1) === 0;
|
27
|
+
}
|
@@ -17,7 +17,20 @@ function formatNumber(value) {
|
|
17
17
|
*
|
18
18
|
* If any number is positive or negative infinity then '∞' or '⧞' will be printed instead.
|
19
19
|
*
|
20
|
-
* @
|
20
|
+
* @example Usage
|
21
|
+
* ```ts
|
22
|
+
* import { format } from "@std/semver/format";
|
23
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
24
|
+
*
|
25
|
+
* const semver = {
|
26
|
+
* major: 1,
|
27
|
+
* minor: 2,
|
28
|
+
* patch: 3,
|
29
|
+
* };
|
30
|
+
* assertEquals(format(semver), "1.2.3");
|
31
|
+
* ```
|
32
|
+
*
|
33
|
+
* @param semver The SemVer to format
|
21
34
|
* @returns The string representation of a semantic version.
|
22
35
|
*/
|
23
36
|
export function format(semver) {
|
@@ -7,7 +7,15 @@ function formatComparator(comparator) {
|
|
7
7
|
}
|
8
8
|
/**
|
9
9
|
* Formats the range into a string
|
10
|
-
* @example
|
10
|
+
* @example Usage
|
11
|
+
* ```ts
|
12
|
+
* import { formatRange, parseRange } from "@std/semver";
|
13
|
+
* import { assertEquals } from "@std/assert";
|
14
|
+
*
|
15
|
+
* const range = parseRange(">=1.2.3 <1.2.4");
|
16
|
+
* assertEquals(formatRange(range), ">=1.2.3 <1.2.4");
|
17
|
+
* ```
|
18
|
+
*
|
11
19
|
* @param range The range to format
|
12
20
|
* @returns A string representation of the range
|
13
21
|
*/
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { compare } from "./compare.js";
|
2
|
+
/**
|
3
|
+
* Greater than or equal to comparison
|
4
|
+
*
|
5
|
+
* This is equal to `compare(s0, s1) >= 0`.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, greaterOrEqual } from "@std/semver";
|
10
|
+
* import { assert, assertFalse } from "@std/assert";
|
11
|
+
*
|
12
|
+
* const s0 = parse("1.2.3");
|
13
|
+
* const s1 = parse("1.2.4");
|
14
|
+
* assert(greaterOrEqual(s1, s0));
|
15
|
+
* assertFalse(greaterOrEqual(s0, s1));
|
16
|
+
* assert(greaterOrEqual(s0, s0));
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* @param s0 The first version to compare
|
20
|
+
* @param s1 The second version to compare
|
21
|
+
* @returns `true` if `s0` is greater than or equal to `s1`, `false` otherwise
|
22
|
+
*/
|
23
|
+
export function greaterOrEqual(s0, s1) {
|
24
|
+
return compare(s0, s1) >= 0;
|
25
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { compare } from "./compare.js";
|
4
|
+
/**
|
5
|
+
* Greater than comparison
|
6
|
+
*
|
7
|
+
* This is equal to `compare(s0, s1) > 0`.
|
8
|
+
*
|
9
|
+
* @example Usage
|
10
|
+
* ```ts
|
11
|
+
* import { parse, greaterThan } from "@std/semver";
|
12
|
+
* import { assert, assertFalse } from "@std/assert";
|
13
|
+
*
|
14
|
+
* const s0 = parse("1.2.3");
|
15
|
+
* const s1 = parse("1.2.4");
|
16
|
+
* assert(greaterThan(s1, s0));
|
17
|
+
* assertFalse(greaterThan(s0, s1));
|
18
|
+
* assertFalse(greaterThan(s0, s0));
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @param s0 The first version to compare
|
22
|
+
* @param s1 The second version to compare
|
23
|
+
* @returns `true` if `s0` is greater than `s1`, `false` otherwise
|
24
|
+
*/
|
25
|
+
export function greaterThan(s0, s1) {
|
26
|
+
return compare(s0, s1) > 0;
|
27
|
+
}
|
@@ -3,7 +3,25 @@
|
|
3
3
|
import { testComparatorSet } from "./_test_comparator_set.js";
|
4
4
|
import { isWildcardComparator } from "./_shared.js";
|
5
5
|
import { compare } from "./compare.js";
|
6
|
-
/**
|
6
|
+
/**
|
7
|
+
* Check if the SemVer is greater than the range.
|
8
|
+
*
|
9
|
+
* @example Usage
|
10
|
+
* ```ts
|
11
|
+
* import { parse, parseRange, greaterThanRange } from "@std/semver";
|
12
|
+
* import { assert, assertFalse } from "@std/assert";
|
13
|
+
*
|
14
|
+
* const v0 = parse("1.2.3");
|
15
|
+
* const v1 = parse("1.2.4");
|
16
|
+
* const range = parseRange(">=1.2.3 <1.2.4");
|
17
|
+
* assertFalse(greaterThanRange(v0, range));
|
18
|
+
* assert(greaterThanRange(v1, range));
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @param semver The version to check.
|
22
|
+
* @param range The range to check against.
|
23
|
+
* @returns `true` if the semver is greater than the range, `false` otherwise.
|
24
|
+
*/
|
7
25
|
export function greaterThanRange(semver, range) {
|
8
26
|
return range.every((comparatorSet) => greaterThanComparatorSet(semver, comparatorSet));
|
9
27
|
}
|
@@ -48,11 +48,27 @@ function bumpPrerelease(prerelease = [], identifier) {
|
|
48
48
|
* If the input version has build metadata it will be preserved on the resulting version
|
49
49
|
* unless a new build parameter is specified. Specifying `""` will unset existing build
|
50
50
|
* metadata.
|
51
|
+
*
|
52
|
+
* @example Usage
|
53
|
+
* ```ts
|
54
|
+
* import { increment, parse } from "@std/semver";
|
55
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
56
|
+
*
|
57
|
+
* const version = parse("1.2.3");
|
58
|
+
* assertEquals(increment(version, "major"), parse("2.0.0"));
|
59
|
+
* assertEquals(increment(version, "minor"), parse("1.3.0"));
|
60
|
+
* assertEquals(increment(version, "patch"), parse("1.2.4"));
|
61
|
+
* assertEquals(increment(version, "prerelease"), parse("1.2.4-0"));
|
62
|
+
*
|
63
|
+
* const prerelease = parse("1.2.3-beta.0");
|
64
|
+
* assertEquals(increment(prerelease, "prerelease"), parse("1.2.3-beta.1"));
|
65
|
+
* ```
|
66
|
+
*
|
51
67
|
* @param version The version to increment
|
52
68
|
* @param release The type of increment to perform
|
53
69
|
* @param prerelease The pre-release metadata of the new version
|
54
|
-
* @param
|
55
|
-
* @returns
|
70
|
+
* @param buildmetadata The build metadata of the new version
|
71
|
+
* @returns The new version
|
56
72
|
*/
|
57
73
|
export function increment(version, release, prerelease, buildmetadata) {
|
58
74
|
const build = buildmetadata !== undefined
|
@@ -19,6 +19,16 @@ function isComparator(value) {
|
|
19
19
|
* least the correct fields.
|
20
20
|
*
|
21
21
|
* Adds a type assertion if true.
|
22
|
+
*
|
23
|
+
* @example Usage
|
24
|
+
* ```ts
|
25
|
+
* import { isRange } from "@std/semver/is-range";
|
26
|
+
* import { assert, assertFalse } from "@std/assert";
|
27
|
+
*
|
28
|
+
* const range = [[{ major: 1, minor: 2, patch: 3 }]];
|
29
|
+
* assert(isRange(range));
|
30
|
+
* assertFalse(isRange({}));
|
31
|
+
* ```
|
22
32
|
* @param value The value to check if its a valid Range
|
23
33
|
* @returns True if its a valid Range otherwise false.
|
24
34
|
*/
|
@@ -14,6 +14,22 @@ import { isValidNumber, isValidString } from "./_shared.js";
|
|
14
14
|
* considered SemVer objects and this will return true.
|
15
15
|
*
|
16
16
|
* A type assertion is added to the value.
|
17
|
+
*
|
18
|
+
* @example Usage
|
19
|
+
* ```ts
|
20
|
+
* import { isSemVer } from "@std/semver/is-semver";
|
21
|
+
* import { assert, assertFalse } from "@std/assert";
|
22
|
+
*
|
23
|
+
* const value = {
|
24
|
+
* major: 1,
|
25
|
+
* minor: 2,
|
26
|
+
* patch: 3,
|
27
|
+
* };
|
28
|
+
*
|
29
|
+
* assert(isSemVer(value));
|
30
|
+
* assertFalse(isSemVer({ major: 1, minor: 2 }));
|
31
|
+
* ```
|
32
|
+
*
|
17
33
|
* @param value The value to check to see if its a valid SemVer object
|
18
34
|
* @returns True if value is a valid SemVer otherwise false
|
19
35
|
*/
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { compare } from "./compare.js";
|
2
|
+
/**
|
3
|
+
* Less than or equal to comparison
|
4
|
+
*
|
5
|
+
* This is equal to `compare(s0, s1) <= 0`.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, lessOrEqual } from "@std/semver";
|
10
|
+
* import { assert, assertFalse } from "@std/assert";
|
11
|
+
*
|
12
|
+
* const s0 = parse("1.2.3");
|
13
|
+
* const s1 = parse("1.2.4");
|
14
|
+
* assert(lessOrEqual(s0, s1));
|
15
|
+
* assertFalse(lessOrEqual(s1, s0));
|
16
|
+
* assert(lessOrEqual(s0, s0));
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* @param s0 the first version to compare
|
20
|
+
* @param s1 the second version to compare
|
21
|
+
* @returns `true` if `s0` is less than or equal to `s1`, `false` otherwise
|
22
|
+
*/
|
23
|
+
export function lessOrEqual(s0, s1) {
|
24
|
+
return compare(s0, s1) <= 0;
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { compare } from "./compare.js";
|
2
|
+
/**
|
3
|
+
* Less than comparison
|
4
|
+
*
|
5
|
+
* This is equal to `compare(s0, s1) < 0`.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, lessThan } from "@std/semver";
|
10
|
+
* import { assert, assertFalse } from "@std/assert";
|
11
|
+
*
|
12
|
+
* const s0 = parse("1.2.3");
|
13
|
+
* const s1 = parse("1.2.4");
|
14
|
+
* assert(lessThan(s0, s1));
|
15
|
+
* assertFalse(lessThan(s1, s0));
|
16
|
+
* assertFalse(lessThan(s0, s0));
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* @param s0 the first version to compare
|
20
|
+
* @param s1 the second version to compare
|
21
|
+
* @returns `true` if `s0` is less than `s1`, `false` otherwise
|
22
|
+
*/
|
23
|
+
export function lessThan(s0, s1) {
|
24
|
+
return compare(s0, s1) < 0;
|
25
|
+
}
|
@@ -3,7 +3,25 @@
|
|
3
3
|
import { testComparatorSet } from "./_test_comparator_set.js";
|
4
4
|
import { isWildcardComparator } from "./_shared.js";
|
5
5
|
import { compare } from "./compare.js";
|
6
|
-
/**
|
6
|
+
/**
|
7
|
+
* Check if the SemVer is less than the range.
|
8
|
+
*
|
9
|
+
* @example Usage
|
10
|
+
* ```ts
|
11
|
+
* import { parse, parseRange, lessThanRange } from "@std/semver";
|
12
|
+
* import { assert, assertFalse } from "@std/assert";
|
13
|
+
*
|
14
|
+
* const v0 = parse("1.2.3");
|
15
|
+
* const v1 = parse("1.0.0");
|
16
|
+
* const range = parseRange(">=1.2.3 <1.2.4");
|
17
|
+
* assertFalse(lessThanRange(v0, range));
|
18
|
+
* assert(lessThanRange(v1, range));
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @param semver The version to check.
|
22
|
+
* @param range The range to check against.
|
23
|
+
* @returns `true` if the SemVer is less than the range, `false` otherwise.
|
24
|
+
*/
|
7
25
|
export function lessThanRange(semver, range) {
|
8
26
|
return range.every((comparatorSet) => lessThanComparatorSet(semver, comparatorSet));
|
9
27
|
}
|
@@ -11,10 +29,10 @@ function lessThanComparatorSet(semver, comparatorSet) {
|
|
11
29
|
// If the comparator set contains wildcard, then the semver is not greater than the range.
|
12
30
|
if (comparatorSet.some(isWildcardComparator))
|
13
31
|
return false;
|
14
|
-
// If the
|
32
|
+
// If the SemVer satisfies the comparator set, then it's not less than the range.
|
15
33
|
if (testComparatorSet(semver, comparatorSet))
|
16
34
|
return false;
|
17
|
-
// If the
|
35
|
+
// If the SemVer is greater than any of the comparator set, then it's not less than the range.
|
18
36
|
if (comparatorSet.some((comparator) => greaterThanComparator(semver, comparator)))
|
19
37
|
return false;
|
20
38
|
return true;
|
@@ -3,6 +3,18 @@ import { greaterThan } from "./greater_than.js";
|
|
3
3
|
/**
|
4
4
|
* Returns the highest version in the list that satisfies the range, or `undefined`
|
5
5
|
* if none of them do.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, parseRange, maxSatisfying } from "@std/semver";
|
10
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
11
|
+
*
|
12
|
+
* const versions = ["1.2.3", "1.2.4", "1.3.0", "2.0.0", "2.1.0"].map(parse);
|
13
|
+
* const range = parseRange(">=1.0.0 <2.0.0");
|
14
|
+
*
|
15
|
+
* assertEquals(maxSatisfying(versions, range), parse("1.3.0"));
|
16
|
+
* ```
|
17
|
+
*
|
6
18
|
* @param versions The versions to check.
|
7
19
|
* @param range The range of possible versions to compare to.
|
8
20
|
* @returns The highest version in versions that satisfies the range.
|
@@ -3,6 +3,18 @@ import { lessThan } from "./less_than.js";
|
|
3
3
|
/**
|
4
4
|
* Returns the lowest version in the list that satisfies the range, or `undefined` if
|
5
5
|
* none of them do.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, parseRange, minSatisfying } from "@std/semver";
|
10
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
11
|
+
*
|
12
|
+
* const versions = ["0.2.0", "1.2.3", "1.3.0", "2.0.0", "2.1.0"].map(parse);
|
13
|
+
* const range = parseRange(">=1.0.0 <2.0.0");
|
14
|
+
*
|
15
|
+
* assertEquals(minSatisfying(versions, range), parse("1.2.3"));
|
16
|
+
* ```
|
17
|
+
*
|
6
18
|
* @param versions The versions to check.
|
7
19
|
* @param range The range of possible versions to compare to.
|
8
20
|
* @returns The lowest version in versions that satisfies the range.
|
@@ -104,8 +104,8 @@
|
|
104
104
|
*
|
105
105
|
* Build metadata is `.` delimited alpha-numeric string.
|
106
106
|
* When parsing a version it is retained on the `build: string[]` field
|
107
|
-
* of the
|
108
|
-
* can set the build metadata on the
|
107
|
+
* of the SemVer instance. When incrementing there is an additional parameter that
|
108
|
+
* can set the build metadata on the SemVer instance.
|
109
109
|
*
|
110
110
|
* ### Advanced Range Syntax
|
111
111
|
*
|
@@ -293,4 +293,5 @@ export * from "./greater_or_equal.js";
|
|
293
293
|
export * from "./less_than.js";
|
294
294
|
export * from "./less_than_range.js";
|
295
295
|
export * from "./less_or_equal.js";
|
296
|
+
/** The SemVer spec version */
|
296
297
|
export const SEMVER_SPEC_VERSION = "2.0.0";
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { compare } from "./compare.js";
|
2
|
+
/**
|
3
|
+
* Not equal comparison
|
4
|
+
*
|
5
|
+
* This is equal to `compare(s0, s1) !== 0`.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse, notEquals } from "@std/semver";
|
10
|
+
* import { assert, assertFalse } from "@std/assert";
|
11
|
+
*
|
12
|
+
* const s0 = parse("1.2.3");
|
13
|
+
* const s1 = parse("1.2.4");
|
14
|
+
* assert(notEquals(s0, s1));
|
15
|
+
* assertFalse(notEquals(s0, s0));
|
16
|
+
* ```
|
17
|
+
*
|
18
|
+
* @param s0 The first version to compare
|
19
|
+
* @param s1 The second version to compare
|
20
|
+
* @returns `true` if `s0` is not equal to `s1`, `false` otherwise
|
21
|
+
*/
|
22
|
+
export function notEquals(s0, s1) {
|
23
|
+
return compare(s0, s1) !== 0;
|
24
|
+
}
|
@@ -3,6 +3,22 @@ import { FULL_REGEXP, MAX_LENGTH } from "./_shared.js";
|
|
3
3
|
/**
|
4
4
|
* Attempt to parse a string as a semantic version, returning either a `SemVer`
|
5
5
|
* object or throws a TypeError.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { parse } from "@std/semver/parse";
|
10
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
11
|
+
*
|
12
|
+
* const version = parse("1.2.3");
|
13
|
+
* assertEquals(version, {
|
14
|
+
* major: 1,
|
15
|
+
* minor: 2,
|
16
|
+
* patch: 3,
|
17
|
+
* prerelease: [],
|
18
|
+
* build: [],
|
19
|
+
* });
|
20
|
+
* ```
|
21
|
+
*
|
6
22
|
* @param version The version string to parse
|
7
23
|
* @returns A valid SemVer
|
8
24
|
*/
|
@@ -325,6 +325,24 @@ function parseOperatorRanges(string) {
|
|
325
325
|
}
|
326
326
|
/**
|
327
327
|
* Parses a range string into a Range object or throws a TypeError.
|
328
|
+
*
|
329
|
+
* @example Usage
|
330
|
+
* ```ts
|
331
|
+
* import { parseRange } from "@std/semver/parse-range";
|
332
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
333
|
+
*
|
334
|
+
* const range = parseRange(">=1.0.0 <2.0.0 || >=3.0.0");
|
335
|
+
* assertEquals(range, [
|
336
|
+
* [
|
337
|
+
* { operator: ">=", major: 1, minor: 0, patch: 0, prerelease: [], build: [] },
|
338
|
+
* { operator: "<", major: 2, minor: 0, patch: 0, prerelease: [], build: [] },
|
339
|
+
* ],
|
340
|
+
* [
|
341
|
+
* { operator: ">=", major: 3, minor: 0, patch: 0, prerelease: [], build: [] },
|
342
|
+
* ]
|
343
|
+
* ]);
|
344
|
+
* ```
|
345
|
+
*
|
328
346
|
* @param range The range set string
|
329
347
|
* @returns A valid semantic range
|
330
348
|
*/
|