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,12 +0,0 @@
|
|
|
1
|
-
/** EndOfLine character enum */
|
|
2
|
-
export declare enum EOL {
|
|
3
|
-
LF = "\n",
|
|
4
|
-
CRLF = "\r\n"
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Detect the EOL character for string input.
|
|
8
|
-
* returns null if no newline
|
|
9
|
-
*/
|
|
10
|
-
export declare function detect(content: string): EOL | null;
|
|
11
|
-
/** Format the file to the targeted EOL */
|
|
12
|
-
export declare function format(content: string, eol: EOL): string;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
/** EndOfLine character enum */
|
|
3
|
-
export var EOL;
|
|
4
|
-
(function (EOL) {
|
|
5
|
-
EOL["LF"] = "\n";
|
|
6
|
-
EOL["CRLF"] = "\r\n";
|
|
7
|
-
})(EOL || (EOL = {}));
|
|
8
|
-
const regDetect = /(?:\r?\n)/g;
|
|
9
|
-
/**
|
|
10
|
-
* Detect the EOL character for string input.
|
|
11
|
-
* returns null if no newline
|
|
12
|
-
*/
|
|
13
|
-
export function detect(content) {
|
|
14
|
-
const d = content.match(regDetect);
|
|
15
|
-
if (!d || d.length === 0) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
const crlf = d.filter((x) => x === EOL.CRLF);
|
|
19
|
-
if (crlf.length > 0) {
|
|
20
|
-
return EOL.CRLF;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return EOL.LF;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/** Format the file to the targeted EOL */
|
|
27
|
-
export function format(content, eol) {
|
|
28
|
-
return content.replace(regDetect, eol);
|
|
29
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export declare const parse: typeof decode;
|
|
2
|
-
export declare const stringify: typeof encode;
|
|
3
|
-
export interface EncodeOptions {
|
|
4
|
-
section?: string;
|
|
5
|
-
whitespace?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Encode the object `object` into an ini-style formatted string. If the
|
|
9
|
-
* optional parameter `section` is given, then all top-level properties
|
|
10
|
-
* of the object are put into this section and the `section`-string is
|
|
11
|
-
* prepended to all sub-sections, see the usage example above.
|
|
12
|
-
*
|
|
13
|
-
* The `options` object may contain the following:
|
|
14
|
-
* - `section` A string which will be the first `section` in the encoded
|
|
15
|
-
* ini data. Defaults to none.
|
|
16
|
-
* - `whitespace` Boolean to specify whether to put whitespace around the
|
|
17
|
-
* `=` character. By default, whitespace is omitted, to be friendly to
|
|
18
|
-
* some persnickety old parsers that don't tolerate it well. But some
|
|
19
|
-
* find that it's more human-readable and pretty with the whitespace.
|
|
20
|
-
*
|
|
21
|
-
* For backwards compatibility reasons, if a `string` options is passed,
|
|
22
|
-
* then it is assumed to be the `section` value.
|
|
23
|
-
*
|
|
24
|
-
* @param obj Object to encode
|
|
25
|
-
* @param opt Encoding options
|
|
26
|
-
*/
|
|
27
|
-
export declare function encode(obj: any, opt?: string | EncodeOptions): string;
|
|
28
|
-
/**
|
|
29
|
-
* Decode the given ini-style formatted document into a nested object.
|
|
30
|
-
* @param str ini-style document
|
|
31
|
-
*/
|
|
32
|
-
export declare function decode(str: string): any;
|
|
33
|
-
/**
|
|
34
|
-
* Escapes the string `val` such that it is safe to be used as a key or
|
|
35
|
-
* value in an ini-file. Basically escapes quotes. For example:
|
|
36
|
-
*
|
|
37
|
-
* ```javascript
|
|
38
|
-
* ini.safe('"unsafe string"')
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* would result in
|
|
42
|
-
*
|
|
43
|
-
* ```javascript
|
|
44
|
-
* "\"unsafe string\""
|
|
45
|
-
* ```
|
|
46
|
-
* @param val String to escape
|
|
47
|
-
*/
|
|
48
|
-
export declare function safe(val: string | any): string;
|
|
49
|
-
/**
|
|
50
|
-
* Unescapes the given string value.
|
|
51
|
-
* @param val String to unescape
|
|
52
|
-
*/
|
|
53
|
-
export declare function unsafe(val?: string): string;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import * as dntShim from "../../../../_dnt.shims.js";
|
|
2
|
-
import * as eol from '../../std@0.51.0/fs/eol.js';
|
|
3
|
-
const isWindows = dntShim.Deno.build.os == "windows";
|
|
4
|
-
const EOL = isWindows ? eol.EOL.CRLF : eol.EOL.LF;
|
|
5
|
-
export const parse = decode;
|
|
6
|
-
export const stringify = encode;
|
|
7
|
-
/**
|
|
8
|
-
* Encode the object `object` into an ini-style formatted string. If the
|
|
9
|
-
* optional parameter `section` is given, then all top-level properties
|
|
10
|
-
* of the object are put into this section and the `section`-string is
|
|
11
|
-
* prepended to all sub-sections, see the usage example above.
|
|
12
|
-
*
|
|
13
|
-
* The `options` object may contain the following:
|
|
14
|
-
* - `section` A string which will be the first `section` in the encoded
|
|
15
|
-
* ini data. Defaults to none.
|
|
16
|
-
* - `whitespace` Boolean to specify whether to put whitespace around the
|
|
17
|
-
* `=` character. By default, whitespace is omitted, to be friendly to
|
|
18
|
-
* some persnickety old parsers that don't tolerate it well. But some
|
|
19
|
-
* find that it's more human-readable and pretty with the whitespace.
|
|
20
|
-
*
|
|
21
|
-
* For backwards compatibility reasons, if a `string` options is passed,
|
|
22
|
-
* then it is assumed to be the `section` value.
|
|
23
|
-
*
|
|
24
|
-
* @param obj Object to encode
|
|
25
|
-
* @param opt Encoding options
|
|
26
|
-
*/
|
|
27
|
-
export function encode(obj, opt = { whitespace: false }) {
|
|
28
|
-
const children = [];
|
|
29
|
-
let out = '';
|
|
30
|
-
let options = typeof opt === 'string' ? { section: opt, whitespace: false } : opt;
|
|
31
|
-
const separator = options.whitespace ? ' = ' : '=';
|
|
32
|
-
Object.keys(obj).forEach(function (k, _, __) {
|
|
33
|
-
const val = obj[k];
|
|
34
|
-
if (val && Array.isArray(val)) {
|
|
35
|
-
val.forEach(function (item) {
|
|
36
|
-
out += safe(k + '[]') + separator + safe(item) + EOL;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
else if (val && typeof val === 'object') {
|
|
40
|
-
children.push(k);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
out += safe(k) + separator + safe(val) + EOL;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
if (options.section && out.length) {
|
|
47
|
-
out = '[' + safe(options.section) + ']' + EOL + out;
|
|
48
|
-
}
|
|
49
|
-
children.forEach(function (k, _, __) {
|
|
50
|
-
const nk = dotSplit(k).join('\\.');
|
|
51
|
-
const section = (options.section ? options.section + '.' : '') + nk;
|
|
52
|
-
const child = encode(obj[k], {
|
|
53
|
-
section: section,
|
|
54
|
-
whitespace: options.whitespace
|
|
55
|
-
});
|
|
56
|
-
if (out.length && child.length) {
|
|
57
|
-
out += EOL;
|
|
58
|
-
}
|
|
59
|
-
out += child;
|
|
60
|
-
});
|
|
61
|
-
return out;
|
|
62
|
-
}
|
|
63
|
-
function dotSplit(str) {
|
|
64
|
-
return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
|
|
65
|
-
.replace(/\\\./g, '\u0001')
|
|
66
|
-
.split(/\./).map(function (part) {
|
|
67
|
-
return part.replace(/\1/g, '\\.')
|
|
68
|
-
.replace(/\2LITERAL\\1LITERAL\2/g, '\u0001');
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Decode the given ini-style formatted document into a nested object.
|
|
73
|
-
* @param str ini-style document
|
|
74
|
-
*/
|
|
75
|
-
export function decode(str) {
|
|
76
|
-
const out = {};
|
|
77
|
-
let p = out;
|
|
78
|
-
// section |key = value
|
|
79
|
-
const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
|
|
80
|
-
const lines = str.split(/[\r\n]+/g);
|
|
81
|
-
lines.forEach(function (line, _, __) {
|
|
82
|
-
if (!line || line.match(/^\s*[;#]/))
|
|
83
|
-
return;
|
|
84
|
-
const match = line.match(re);
|
|
85
|
-
if (!match)
|
|
86
|
-
return;
|
|
87
|
-
if (match[1] !== undefined) {
|
|
88
|
-
let section = unsafe(match[1]);
|
|
89
|
-
p = out[section] = out[section] || {};
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
let key = unsafe(match[2]);
|
|
93
|
-
let value = match[3] ? unsafe(match[4]) : true;
|
|
94
|
-
switch (value) {
|
|
95
|
-
case 'true':
|
|
96
|
-
case 'false':
|
|
97
|
-
case 'null': value = JSON.parse(value);
|
|
98
|
-
}
|
|
99
|
-
const valueAsFloat = parseFloat(`${value}`);
|
|
100
|
-
if (!Number.isNaN(valueAsFloat)) {
|
|
101
|
-
value = valueAsFloat;
|
|
102
|
-
}
|
|
103
|
-
// Convert keys with '[]' suffix to an array
|
|
104
|
-
if (key.length > 2 && key.slice(-2) === '[]') {
|
|
105
|
-
key = key.substring(0, key.length - 2);
|
|
106
|
-
if (!p[key]) {
|
|
107
|
-
p[key] = [];
|
|
108
|
-
}
|
|
109
|
-
else if (!Array.isArray(p[key])) {
|
|
110
|
-
p[key] = [p[key]];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
// safeguard against resetting a previously defined
|
|
114
|
-
// array by accidentally forgetting the brackets
|
|
115
|
-
if (Array.isArray(p[key])) {
|
|
116
|
-
p[key].push(value);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
p[key] = value;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
|
123
|
-
// use a filter to return the keys that have to be deleted.
|
|
124
|
-
Object.keys(out).filter(function (k, _, __) {
|
|
125
|
-
if (!out[k] ||
|
|
126
|
-
typeof out[k] !== 'object' ||
|
|
127
|
-
Array.isArray(out[k])) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
// see if the parent section is also an object.
|
|
131
|
-
// if so, add it to that, and mark this one for deletion
|
|
132
|
-
const parts = dotSplit(k);
|
|
133
|
-
let parentSection = out;
|
|
134
|
-
const lastPart = parts.pop() ?? '';
|
|
135
|
-
const nl = lastPart.replace(/\\\./g, '.');
|
|
136
|
-
parts.forEach(function (part, _, __) {
|
|
137
|
-
if (!parentSection[part] || typeof parentSection[part] !== 'object')
|
|
138
|
-
parentSection[part] = {};
|
|
139
|
-
parentSection = parentSection[part];
|
|
140
|
-
});
|
|
141
|
-
if (parentSection === out && nl === lastPart) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
parentSection[nl] = out[k];
|
|
145
|
-
return true;
|
|
146
|
-
}).forEach(function (del, _, __) {
|
|
147
|
-
delete out[del];
|
|
148
|
-
});
|
|
149
|
-
return out;
|
|
150
|
-
}
|
|
151
|
-
function isQuoted(val) {
|
|
152
|
-
return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
|
|
153
|
-
(val.charAt(0) === "'" && val.slice(-1) === "'");
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Escapes the string `val` such that it is safe to be used as a key or
|
|
157
|
-
* value in an ini-file. Basically escapes quotes. For example:
|
|
158
|
-
*
|
|
159
|
-
* ```javascript
|
|
160
|
-
* ini.safe('"unsafe string"')
|
|
161
|
-
* ```
|
|
162
|
-
*
|
|
163
|
-
* would result in
|
|
164
|
-
*
|
|
165
|
-
* ```javascript
|
|
166
|
-
* "\"unsafe string\""
|
|
167
|
-
* ```
|
|
168
|
-
* @param val String to escape
|
|
169
|
-
*/
|
|
170
|
-
export function safe(val) {
|
|
171
|
-
return (typeof val !== 'string' ||
|
|
172
|
-
val.match(/[=\r\n]/) ||
|
|
173
|
-
val.match(/^\[/) ||
|
|
174
|
-
(val.length > 1 && isQuoted(val)) ||
|
|
175
|
-
val !== val.trim())
|
|
176
|
-
? JSON.stringify(val)
|
|
177
|
-
: val.replace(/;/g, '\\;').replace(/#/g, '\\#');
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Unescapes the given string value.
|
|
181
|
-
* @param val String to unescape
|
|
182
|
-
*/
|
|
183
|
-
export function unsafe(val = '') {
|
|
184
|
-
val = val.trim();
|
|
185
|
-
if (isQuoted(val)) {
|
|
186
|
-
// remove the single quotes before calling JSON.parse
|
|
187
|
-
if (val.charAt(0) === "'") {
|
|
188
|
-
val = val.substr(1, val.length - 2);
|
|
189
|
-
}
|
|
190
|
-
try {
|
|
191
|
-
val = JSON.parse(val);
|
|
192
|
-
}
|
|
193
|
-
catch (_) { }
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
// walk the val to find the first unescaped ; character
|
|
197
|
-
let esc = false;
|
|
198
|
-
let unesc = '';
|
|
199
|
-
for (let i = 0, l = val.length; i < l; i++) {
|
|
200
|
-
const c = val.charAt(i);
|
|
201
|
-
if (esc) {
|
|
202
|
-
if ('\\;#'.indexOf(c) !== -1) {
|
|
203
|
-
unesc += c;
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
unesc += '\\' + c;
|
|
207
|
-
}
|
|
208
|
-
esc = false;
|
|
209
|
-
}
|
|
210
|
-
else if (';#'.indexOf(c) !== -1) {
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
else if (c === '\\') {
|
|
214
|
-
esc = true;
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
unesc += c;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (esc) {
|
|
221
|
-
unesc += '\\';
|
|
222
|
-
}
|
|
223
|
-
return unesc.trim();
|
|
224
|
-
}
|
|
225
|
-
return val;
|
|
226
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ini.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ini.js';
|
package/esm/src/Change.d.ts
DELETED
package/esm/src/Change.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export default class Change {
|
|
2
|
-
static extractIssues(text, issues) {
|
|
3
|
-
return text
|
|
4
|
-
.replace(/(^|[^\\])\[#(\d+)\](?=[^\(]|$)/g, (_, start, index) => {
|
|
5
|
-
if (!issues.includes(index)) {
|
|
6
|
-
issues.push(index);
|
|
7
|
-
}
|
|
8
|
-
return `${start}[#${index}]`;
|
|
9
|
-
})
|
|
10
|
-
.replace(/(^|[\s,])#(\d+)(?=[\s,\.]|$)/g, (_, start, index) => {
|
|
11
|
-
if (!issues.includes(index)) {
|
|
12
|
-
issues.push(index);
|
|
13
|
-
}
|
|
14
|
-
return `${start}[#${index}]`;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
constructor(title, description = "") {
|
|
18
|
-
Object.defineProperty(this, "title", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: void 0
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "description", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: void 0
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(this, "issues", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true,
|
|
34
|
-
value: []
|
|
35
|
-
});
|
|
36
|
-
this.title = Change.extractIssues(title, this.issues);
|
|
37
|
-
this.description = Change.extractIssues(description, this.issues);
|
|
38
|
-
}
|
|
39
|
-
toString() {
|
|
40
|
-
let t = this.title.split("\n").map((line) => ` ${line}`.trimEnd());
|
|
41
|
-
t[0] = "-" + t[0].substr(1);
|
|
42
|
-
if (this.description) {
|
|
43
|
-
t.push("");
|
|
44
|
-
t = t.concat(this.description.split("\n").map((line) => ` ${line}`.trimEnd()));
|
|
45
|
-
}
|
|
46
|
-
return t.join("\n").trim();
|
|
47
|
-
}
|
|
48
|
-
}
|
package/esm/src/Changelog.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Release from "./Release.js";
|
|
2
|
-
import type { SemVer } from "./deps.js";
|
|
3
|
-
export default class Changelog {
|
|
4
|
-
flag?: string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
head: string;
|
|
8
|
-
footer?: string;
|
|
9
|
-
url?: string;
|
|
10
|
-
releases: Release[];
|
|
11
|
-
tagNameBuilder?: (release: Release) => string;
|
|
12
|
-
/** @deprecated: Use tagLinkBuilder() instead */
|
|
13
|
-
compareLinkBuilder?: (previous: Release, release: Release) => string;
|
|
14
|
-
tagLinkBuilder?: (url: string, tag: string, previous?: string) => string;
|
|
15
|
-
format: "compact" | "markdownlint";
|
|
16
|
-
constructor(title: string, description?: string);
|
|
17
|
-
addRelease(release: Release): this;
|
|
18
|
-
findRelease(version?: SemVer | string): Release | undefined;
|
|
19
|
-
sortReleases(): void;
|
|
20
|
-
compareLink(previous: Release, release: Release): string;
|
|
21
|
-
tagName(release: Release): string;
|
|
22
|
-
toString(): string;
|
|
23
|
-
}
|
package/esm/src/Changelog.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { eq, parse } from "./deps.js";
|
|
2
|
-
export default class Changelog {
|
|
3
|
-
constructor(title, description = "") {
|
|
4
|
-
Object.defineProperty(this, "flag", {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true,
|
|
8
|
-
value: void 0
|
|
9
|
-
});
|
|
10
|
-
Object.defineProperty(this, "title", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: void 0
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(this, "description", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: void 0
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(this, "head", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
configurable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
value: "HEAD"
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(this, "footer", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true,
|
|
31
|
-
writable: true,
|
|
32
|
-
value: void 0
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(this, "url", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true,
|
|
37
|
-
writable: true,
|
|
38
|
-
value: void 0
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(this, "releases", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true,
|
|
43
|
-
writable: true,
|
|
44
|
-
value: []
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(this, "tagNameBuilder", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true,
|
|
49
|
-
writable: true,
|
|
50
|
-
value: void 0
|
|
51
|
-
});
|
|
52
|
-
/** @deprecated: Use tagLinkBuilder() instead */
|
|
53
|
-
Object.defineProperty(this, "compareLinkBuilder", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
configurable: true,
|
|
56
|
-
writable: true,
|
|
57
|
-
value: void 0
|
|
58
|
-
});
|
|
59
|
-
Object.defineProperty(this, "tagLinkBuilder", {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
configurable: true,
|
|
62
|
-
writable: true,
|
|
63
|
-
value: void 0
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(this, "format", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true,
|
|
69
|
-
value: "compact"
|
|
70
|
-
});
|
|
71
|
-
this.title = title;
|
|
72
|
-
this.description = description;
|
|
73
|
-
}
|
|
74
|
-
addRelease(release) {
|
|
75
|
-
this.releases.push(release);
|
|
76
|
-
this.sortReleases();
|
|
77
|
-
release.changelog = this;
|
|
78
|
-
return this;
|
|
79
|
-
}
|
|
80
|
-
findRelease(version) {
|
|
81
|
-
if (!version) {
|
|
82
|
-
return this.releases.find((release) => !release.version);
|
|
83
|
-
}
|
|
84
|
-
if (typeof version === "string") {
|
|
85
|
-
version = parse(version);
|
|
86
|
-
}
|
|
87
|
-
return this.releases.find((release) => release.parsedVersion && eq(release.parsedVersion, version));
|
|
88
|
-
}
|
|
89
|
-
sortReleases() {
|
|
90
|
-
this.releases.sort((a, b) => a.compare(b));
|
|
91
|
-
}
|
|
92
|
-
compareLink(previous, release) {
|
|
93
|
-
if (this.compareLinkBuilder) {
|
|
94
|
-
return this.compareLinkBuilder(previous, release);
|
|
95
|
-
}
|
|
96
|
-
if (this.tagLinkBuilder) {
|
|
97
|
-
const url = this.url;
|
|
98
|
-
if (!previous) {
|
|
99
|
-
return this.tagLinkBuilder(this.url, this.tagName(release));
|
|
100
|
-
}
|
|
101
|
-
if (!release.date || !release.version) {
|
|
102
|
-
return this.tagLinkBuilder(url, this.head, this.tagName(previous));
|
|
103
|
-
}
|
|
104
|
-
return this.tagLinkBuilder(url, this.tagName(release), this.tagName(previous));
|
|
105
|
-
}
|
|
106
|
-
if (!previous) {
|
|
107
|
-
return `${this.url}/releases/tag/${this.tagName(release)}`;
|
|
108
|
-
}
|
|
109
|
-
if (!release.date || !release.version) {
|
|
110
|
-
return `${this.url}/compare/${this.tagName(previous)}...${this.head}`;
|
|
111
|
-
}
|
|
112
|
-
return `${this.url}/compare/${this.tagName(previous)}...${this.tagName(release)}`;
|
|
113
|
-
}
|
|
114
|
-
tagName(release) {
|
|
115
|
-
if (this.tagNameBuilder) {
|
|
116
|
-
return this.tagNameBuilder(release);
|
|
117
|
-
}
|
|
118
|
-
return `v${release.version}`;
|
|
119
|
-
}
|
|
120
|
-
toString() {
|
|
121
|
-
const t = [];
|
|
122
|
-
if (this.flag) {
|
|
123
|
-
t.push(`<!-- ${this.flag} -->`);
|
|
124
|
-
t.push("");
|
|
125
|
-
}
|
|
126
|
-
t.push(`# ${this.title}`);
|
|
127
|
-
if (this.format === "markdownlint") {
|
|
128
|
-
t.push("");
|
|
129
|
-
}
|
|
130
|
-
const links = [];
|
|
131
|
-
const compareLinks = [];
|
|
132
|
-
const description = this.description.trim() ||
|
|
133
|
-
`All notable changes to this project will be documented in this file.
|
|
134
|
-
|
|
135
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/)
|
|
136
|
-
and this project adheres to [Semantic Versioning](https://semver.org/).`;
|
|
137
|
-
if (description) {
|
|
138
|
-
t.push(description);
|
|
139
|
-
}
|
|
140
|
-
this.releases.forEach((release) => {
|
|
141
|
-
t.push("");
|
|
142
|
-
t.push(release.toString(this));
|
|
143
|
-
release.getLinks(this).forEach((link) => {
|
|
144
|
-
if (!links.includes(link)) {
|
|
145
|
-
links.push(link);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
const compareLink = release.getCompareLink(this);
|
|
149
|
-
if (compareLink) {
|
|
150
|
-
compareLinks.push(compareLink);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
if (links.length) {
|
|
154
|
-
t.push("");
|
|
155
|
-
links.sort(compare);
|
|
156
|
-
links.forEach((link) => t.push(link));
|
|
157
|
-
}
|
|
158
|
-
if (compareLinks.length) {
|
|
159
|
-
t.push("");
|
|
160
|
-
compareLinks.forEach((link) => t.push(link));
|
|
161
|
-
}
|
|
162
|
-
t.push("");
|
|
163
|
-
if (this.footer) {
|
|
164
|
-
t.push("---");
|
|
165
|
-
t.push("");
|
|
166
|
-
t.push(this.footer);
|
|
167
|
-
t.push("");
|
|
168
|
-
}
|
|
169
|
-
return t.join("\n");
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function compare(a, b) {
|
|
173
|
-
if (a === b) {
|
|
174
|
-
return 0;
|
|
175
|
-
}
|
|
176
|
-
const reg = /^\[#(\d+)\]:/;
|
|
177
|
-
const aNumber = a.match(reg);
|
|
178
|
-
const bNumber = b.match(reg);
|
|
179
|
-
if (aNumber && bNumber) {
|
|
180
|
-
return parseInt(aNumber[1]) - parseInt(bNumber[1]);
|
|
181
|
-
}
|
|
182
|
-
return a < b ? -1 : 1;
|
|
183
|
-
}
|
package/esm/src/Release.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Change from "./Change.js";
|
|
2
|
-
import Changelog from "./Changelog.js";
|
|
3
|
-
import type { SemVer } from "./deps.js";
|
|
4
|
-
export default class Release {
|
|
5
|
-
changelog?: Changelog;
|
|
6
|
-
parsedVersion?: SemVer;
|
|
7
|
-
date?: Date;
|
|
8
|
-
yanked: boolean;
|
|
9
|
-
description: string;
|
|
10
|
-
changes: Map<string, Change[]>;
|
|
11
|
-
constructor(version?: string | SemVer, date?: string | Date, description?: string);
|
|
12
|
-
get version(): string | undefined;
|
|
13
|
-
compare(release: Release): number;
|
|
14
|
-
isEmpty(): boolean;
|
|
15
|
-
setVersion(version?: string | SemVer): void;
|
|
16
|
-
setDate(date?: Date | string): void;
|
|
17
|
-
setYanked(yanked?: boolean): this;
|
|
18
|
-
addChange(type: string, change: Change | string): this;
|
|
19
|
-
added(change: Change | string): this;
|
|
20
|
-
changed(change: Change | string): this;
|
|
21
|
-
deprecated(change: Change | string): this;
|
|
22
|
-
removed(change: Change | string): this;
|
|
23
|
-
fixed(change: Change | string): this;
|
|
24
|
-
security(change: Change | string): this;
|
|
25
|
-
toString(changelog?: Changelog): string;
|
|
26
|
-
getCompareLink(changelog?: Changelog): string | undefined;
|
|
27
|
-
getLinks(changelog: Changelog): string[];
|
|
28
|
-
}
|