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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { IniMap } from "./_ini_map.js";
|
|
4
|
+
/**
|
|
5
|
+
* Compile an object into an INI config string. Provide formatting options to modify the output.
|
|
6
|
+
*
|
|
7
|
+
* @example Usage
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { stringify } from "stringify.ts";
|
|
10
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
11
|
+
*
|
|
12
|
+
* const str = stringify({
|
|
13
|
+
* key1: "value1",
|
|
14
|
+
* key2: "value2",
|
|
15
|
+
* section1: {
|
|
16
|
+
* foo: "bar",
|
|
17
|
+
* },
|
|
18
|
+
* section2: {
|
|
19
|
+
* hello: "world",
|
|
20
|
+
* },
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* assertEquals(str, `key1=value1
|
|
24
|
+
* key2=value2
|
|
25
|
+
* [section1]
|
|
26
|
+
* foo=bar
|
|
27
|
+
* [section2]
|
|
28
|
+
* hello=world`);
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example Using replacer option
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { stringify } from "stringify.ts";
|
|
34
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
35
|
+
*
|
|
36
|
+
* const str = stringify({
|
|
37
|
+
* "section X": {
|
|
38
|
+
* date: new Date("2024-06-10"),
|
|
39
|
+
* },
|
|
40
|
+
* "section Y": {
|
|
41
|
+
* name: "John"
|
|
42
|
+
* }
|
|
43
|
+
* }, {
|
|
44
|
+
* replacer(key, value, section) {
|
|
45
|
+
* if (section === "section X" && key === "date") {
|
|
46
|
+
* return value.toISOString().slice(0, 10);
|
|
47
|
+
* }
|
|
48
|
+
* return value;
|
|
49
|
+
* },
|
|
50
|
+
* });
|
|
51
|
+
*
|
|
52
|
+
* assertEquals(str, `[section X]
|
|
53
|
+
* date=2024-06-10
|
|
54
|
+
* [section Y]
|
|
55
|
+
* name=John`);
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @param object The object to stringify
|
|
59
|
+
* @param options The option to use
|
|
60
|
+
* @returns The INI string
|
|
61
|
+
*/
|
|
62
|
+
export function stringify(
|
|
63
|
+
// deno-lint-ignore no-explicit-any
|
|
64
|
+
object, options) {
|
|
65
|
+
return IniMap.from(object, options).toString(options?.replacer);
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertPath(path?: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
export function assertPath(path) {
|
|
4
|
+
if (typeof path !== "string") {
|
|
5
|
+
throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function stripSuffix(name: string, suffix: string): string;
|
|
2
|
+
export declare function lastPathSegment(path: string, isSep: (char: number) => boolean, start?: number): string;
|
|
3
|
+
export declare function assertArgs(path: string, suffix: string): string | undefined;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { assertPath } from "./assert_path.js";
|
|
4
|
+
export function stripSuffix(name, suffix) {
|
|
5
|
+
if (suffix.length >= name.length) {
|
|
6
|
+
return name;
|
|
7
|
+
}
|
|
8
|
+
const lenDiff = name.length - suffix.length;
|
|
9
|
+
for (let i = suffix.length - 1; i >= 0; --i) {
|
|
10
|
+
if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {
|
|
11
|
+
return name;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return name.slice(0, -suffix.length);
|
|
15
|
+
}
|
|
16
|
+
export function lastPathSegment(path, isSep, start = 0) {
|
|
17
|
+
let matchedNonSeparator = false;
|
|
18
|
+
let end = path.length;
|
|
19
|
+
for (let i = path.length - 1; i >= start; --i) {
|
|
20
|
+
if (isSep(path.charCodeAt(i))) {
|
|
21
|
+
if (matchedNonSeparator) {
|
|
22
|
+
start = i + 1;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else if (!matchedNonSeparator) {
|
|
27
|
+
matchedNonSeparator = true;
|
|
28
|
+
end = i + 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return path.slice(start, end);
|
|
32
|
+
}
|
|
33
|
+
export function assertArgs(path, suffix) {
|
|
34
|
+
assertPath(path);
|
|
35
|
+
if (path.length === 0)
|
|
36
|
+
return path;
|
|
37
|
+
if (typeof suffix !== "string") {
|
|
38
|
+
throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function common(paths: string[], sep: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
export function common(paths, sep) {
|
|
4
|
+
const [first = "", ...remaining] = paths;
|
|
5
|
+
const parts = first.split(sep);
|
|
6
|
+
let endOfPrefix = parts.length;
|
|
7
|
+
let append = "";
|
|
8
|
+
for (const path of remaining) {
|
|
9
|
+
const compare = path.split(sep);
|
|
10
|
+
if (compare.length <= endOfPrefix) {
|
|
11
|
+
endOfPrefix = compare.length;
|
|
12
|
+
append = "";
|
|
13
|
+
}
|
|
14
|
+
for (let i = 0; i < endOfPrefix; i++) {
|
|
15
|
+
if (compare[i] !== parts[i]) {
|
|
16
|
+
endOfPrefix = i;
|
|
17
|
+
append = i === 0 ? "" : sep;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return parts.slice(0, endOfPrefix).join(sep) + append;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
2
|
// Copyright the Browserify authors. MIT License.
|
|
3
3
|
// Ported from https://github.com/browserify/path-browserify/
|
|
4
4
|
// This module is browser compatible.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArg(path: string): "." | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
export function _format(sep, pathObject) {
|
|
4
|
+
const dir = pathObject.dir || pathObject.root;
|
|
5
|
+
const base = pathObject.base ||
|
|
6
|
+
(pathObject.name ?? "") + (pathObject.ext ?? "");
|
|
7
|
+
if (!dir)
|
|
8
|
+
return base;
|
|
9
|
+
if (base === sep)
|
|
10
|
+
return dir;
|
|
11
|
+
if (dir === pathObject.root)
|
|
12
|
+
return dir + base;
|
|
13
|
+
return dir + sep + base;
|
|
14
|
+
}
|
|
15
|
+
export function assertArg(pathObject) {
|
|
16
|
+
if (pathObject === null || typeof pathObject !== "object") {
|
|
17
|
+
throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
export function assertArg(url) {
|
|
4
|
+
url = url instanceof URL ? url : new URL(url);
|
|
5
|
+
if (url.protocol !== "file:") {
|
|
6
|
+
throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
|
|
7
|
+
}
|
|
8
|
+
return url;
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},
|
|
3
|
+
* {@linkcode normalizeGlob} and {@linkcode expandGlob}.
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobOptions {
|
|
6
|
+
/** Extended glob syntax.
|
|
7
|
+
* See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
8
|
+
*
|
|
9
|
+
* @default {true}
|
|
10
|
+
*/
|
|
11
|
+
extended?: boolean;
|
|
12
|
+
/** Globstar syntax.
|
|
13
|
+
* See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
14
|
+
* If false, `**` is treated like `*`.
|
|
15
|
+
*
|
|
16
|
+
* @default {true}
|
|
17
|
+
*/
|
|
18
|
+
globstar?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether globstar should be case-insensitive.
|
|
21
|
+
*
|
|
22
|
+
* @default {false}
|
|
23
|
+
*/
|
|
24
|
+
caseInsensitive?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface GlobConstants {
|
|
27
|
+
sep: string;
|
|
28
|
+
sepMaybe: string;
|
|
29
|
+
seps: string[];
|
|
30
|
+
globstar: string;
|
|
31
|
+
wildcard: string;
|
|
32
|
+
escapePrefix: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function _globToRegExp(c: GlobConstants, glob: string, { extended, globstar: globstarOption, caseInsensitive, }?: GlobOptions): RegExp;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
const REG_EXP_ESCAPE_CHARS = [
|
|
4
|
+
"!",
|
|
5
|
+
"$",
|
|
6
|
+
"(",
|
|
7
|
+
")",
|
|
8
|
+
"*",
|
|
9
|
+
"+",
|
|
10
|
+
".",
|
|
11
|
+
"=",
|
|
12
|
+
"?",
|
|
13
|
+
"[",
|
|
14
|
+
"\\",
|
|
15
|
+
"^",
|
|
16
|
+
"{",
|
|
17
|
+
"|",
|
|
18
|
+
];
|
|
19
|
+
const RANGE_ESCAPE_CHARS = ["-", "\\", "]"];
|
|
20
|
+
export function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
|
|
21
|
+
// os = osType,
|
|
22
|
+
caseInsensitive = false, } = {}) {
|
|
23
|
+
if (glob === "") {
|
|
24
|
+
return /(?!)/;
|
|
25
|
+
}
|
|
26
|
+
// Remove trailing separators.
|
|
27
|
+
let newLength = glob.length;
|
|
28
|
+
for (; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--)
|
|
29
|
+
;
|
|
30
|
+
glob = glob.slice(0, newLength);
|
|
31
|
+
let regExpString = "";
|
|
32
|
+
// Terminates correctly. Trust that `j` is incremented every iteration.
|
|
33
|
+
for (let j = 0; j < glob.length;) {
|
|
34
|
+
let segment = "";
|
|
35
|
+
const groupStack = [];
|
|
36
|
+
let inRange = false;
|
|
37
|
+
let inEscape = false;
|
|
38
|
+
let endsWithSep = false;
|
|
39
|
+
let i = j;
|
|
40
|
+
// Terminates with `i` at the non-inclusive end of the current segment.
|
|
41
|
+
for (; i < glob.length && !c.seps.includes(glob[i]); i++) {
|
|
42
|
+
if (inEscape) {
|
|
43
|
+
inEscape = false;
|
|
44
|
+
const escapeChars = (inRange
|
|
45
|
+
? RANGE_ESCAPE_CHARS
|
|
46
|
+
: REG_EXP_ESCAPE_CHARS);
|
|
47
|
+
segment += escapeChars.includes(glob[i])
|
|
48
|
+
? `\\${glob[i]}`
|
|
49
|
+
: glob[i];
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (glob[i] === c.escapePrefix) {
|
|
53
|
+
inEscape = true;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (glob[i] === "[") {
|
|
57
|
+
if (!inRange) {
|
|
58
|
+
inRange = true;
|
|
59
|
+
segment += "[";
|
|
60
|
+
if (glob[i + 1] === "!") {
|
|
61
|
+
i++;
|
|
62
|
+
segment += "^";
|
|
63
|
+
}
|
|
64
|
+
else if (glob[i + 1] === "^") {
|
|
65
|
+
i++;
|
|
66
|
+
segment += "\\^";
|
|
67
|
+
}
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
else if (glob[i + 1] === ":") {
|
|
71
|
+
let k = i + 1;
|
|
72
|
+
let value = "";
|
|
73
|
+
while (glob[k + 1] !== undefined && glob[k + 1] !== ":") {
|
|
74
|
+
value += glob[k + 1];
|
|
75
|
+
k++;
|
|
76
|
+
}
|
|
77
|
+
if (glob[k + 1] === ":" && glob[k + 2] === "]") {
|
|
78
|
+
i = k + 2;
|
|
79
|
+
if (value === "alnum")
|
|
80
|
+
segment += "\\dA-Za-z";
|
|
81
|
+
else if (value === "alpha")
|
|
82
|
+
segment += "A-Za-z";
|
|
83
|
+
else if (value === "ascii")
|
|
84
|
+
segment += "\x00-\x7F";
|
|
85
|
+
else if (value === "blank")
|
|
86
|
+
segment += "\t ";
|
|
87
|
+
else if (value === "cntrl")
|
|
88
|
+
segment += "\x00-\x1F\x7F";
|
|
89
|
+
else if (value === "digit")
|
|
90
|
+
segment += "\\d";
|
|
91
|
+
else if (value === "graph")
|
|
92
|
+
segment += "\x21-\x7E";
|
|
93
|
+
else if (value === "lower")
|
|
94
|
+
segment += "a-z";
|
|
95
|
+
else if (value === "print")
|
|
96
|
+
segment += "\x20-\x7E";
|
|
97
|
+
else if (value === "punct") {
|
|
98
|
+
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
|
|
99
|
+
}
|
|
100
|
+
else if (value === "space")
|
|
101
|
+
segment += "\\s\v";
|
|
102
|
+
else if (value === "upper")
|
|
103
|
+
segment += "A-Z";
|
|
104
|
+
else if (value === "word")
|
|
105
|
+
segment += "\\w";
|
|
106
|
+
else if (value === "xdigit")
|
|
107
|
+
segment += "\\dA-Fa-f";
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (glob[i] === "]" && inRange) {
|
|
113
|
+
inRange = false;
|
|
114
|
+
segment += "]";
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (inRange) {
|
|
118
|
+
segment += glob[i];
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (glob[i] === ")" && groupStack.length > 0 &&
|
|
122
|
+
groupStack[groupStack.length - 1] !== "BRACE") {
|
|
123
|
+
segment += ")";
|
|
124
|
+
const type = groupStack.pop();
|
|
125
|
+
if (type === "!") {
|
|
126
|
+
segment += c.wildcard;
|
|
127
|
+
}
|
|
128
|
+
else if (type !== "@") {
|
|
129
|
+
segment += type;
|
|
130
|
+
}
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (glob[i] === "|" && groupStack.length > 0 &&
|
|
134
|
+
groupStack[groupStack.length - 1] !== "BRACE") {
|
|
135
|
+
segment += "|";
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (glob[i] === "+" && extended && glob[i + 1] === "(") {
|
|
139
|
+
i++;
|
|
140
|
+
groupStack.push("+");
|
|
141
|
+
segment += "(?:";
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (glob[i] === "@" && extended && glob[i + 1] === "(") {
|
|
145
|
+
i++;
|
|
146
|
+
groupStack.push("@");
|
|
147
|
+
segment += "(?:";
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (glob[i] === "?") {
|
|
151
|
+
if (extended && glob[i + 1] === "(") {
|
|
152
|
+
i++;
|
|
153
|
+
groupStack.push("?");
|
|
154
|
+
segment += "(?:";
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
segment += ".";
|
|
158
|
+
}
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (glob[i] === "!" && extended && glob[i + 1] === "(") {
|
|
162
|
+
i++;
|
|
163
|
+
groupStack.push("!");
|
|
164
|
+
segment += "(?!";
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
if (glob[i] === "{") {
|
|
168
|
+
groupStack.push("BRACE");
|
|
169
|
+
segment += "(?:";
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") {
|
|
173
|
+
groupStack.pop();
|
|
174
|
+
segment += ")";
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") {
|
|
178
|
+
segment += "|";
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (glob[i] === "*") {
|
|
182
|
+
if (extended && glob[i + 1] === "(") {
|
|
183
|
+
i++;
|
|
184
|
+
groupStack.push("*");
|
|
185
|
+
segment += "(?:";
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
const prevChar = glob[i - 1];
|
|
189
|
+
let numStars = 1;
|
|
190
|
+
while (glob[i + 1] === "*") {
|
|
191
|
+
i++;
|
|
192
|
+
numStars++;
|
|
193
|
+
}
|
|
194
|
+
const nextChar = glob[i + 1];
|
|
195
|
+
if (globstarOption && numStars === 2 &&
|
|
196
|
+
[...c.seps, undefined].includes(prevChar) &&
|
|
197
|
+
[...c.seps, undefined].includes(nextChar)) {
|
|
198
|
+
segment += c.globstar;
|
|
199
|
+
endsWithSep = true;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
segment += c.wildcard;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
segment += REG_EXP_ESCAPE_CHARS.includes(glob[i])
|
|
208
|
+
? `\\${glob[i]}`
|
|
209
|
+
: glob[i];
|
|
210
|
+
}
|
|
211
|
+
// Check for unclosed groups or a dangling backslash.
|
|
212
|
+
if (groupStack.length > 0 || inRange || inEscape) {
|
|
213
|
+
// Parse failure. Take all characters from this segment literally.
|
|
214
|
+
segment = "";
|
|
215
|
+
for (const c of glob.slice(j, i)) {
|
|
216
|
+
segment += REG_EXP_ESCAPE_CHARS.includes(c)
|
|
217
|
+
? `\\${c}`
|
|
218
|
+
: c;
|
|
219
|
+
endsWithSep = false;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
regExpString += segment;
|
|
223
|
+
if (!endsWithSep) {
|
|
224
|
+
regExpString += i < glob.length ? c.sep : c.sepMaybe;
|
|
225
|
+
endsWithSep = true;
|
|
226
|
+
}
|
|
227
|
+
// Terminates with `i` at the start of the next segment.
|
|
228
|
+
while (c.seps.includes(glob[i]))
|
|
229
|
+
i++;
|
|
230
|
+
j = i;
|
|
231
|
+
}
|
|
232
|
+
regExpString = `^${regExpString}$`;
|
|
233
|
+
return new RegExp(regExpString, caseInsensitive ? "i" : "");
|
|
234
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArg(path: string): "." | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeString(path: string, allowAboveRoot: boolean, separator: string, isPathSeparator: (code: number) => boolean): string;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
4
|
+
// This module is browser compatible.
|
|
5
|
+
import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./constants.js";
|
|
6
|
+
// Resolves . and .. elements in a path with directory names
|
|
7
|
+
export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
8
|
+
let res = "";
|
|
9
|
+
let lastSegmentLength = 0;
|
|
10
|
+
let lastSlash = -1;
|
|
11
|
+
let dots = 0;
|
|
12
|
+
let code;
|
|
13
|
+
for (let i = 0; i <= path.length; ++i) {
|
|
14
|
+
if (i < path.length)
|
|
15
|
+
code = path.charCodeAt(i);
|
|
16
|
+
else if (isPathSeparator(code))
|
|
17
|
+
break;
|
|
18
|
+
else
|
|
19
|
+
code = CHAR_FORWARD_SLASH;
|
|
20
|
+
if (isPathSeparator(code)) {
|
|
21
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
22
|
+
// NOOP
|
|
23
|
+
}
|
|
24
|
+
else if (lastSlash !== i - 1 && dots === 2) {
|
|
25
|
+
if (res.length < 2 ||
|
|
26
|
+
lastSegmentLength !== 2 ||
|
|
27
|
+
res.charCodeAt(res.length - 1) !== CHAR_DOT ||
|
|
28
|
+
res.charCodeAt(res.length - 2) !== CHAR_DOT) {
|
|
29
|
+
if (res.length > 2) {
|
|
30
|
+
const lastSlashIndex = res.lastIndexOf(separator);
|
|
31
|
+
if (lastSlashIndex === -1) {
|
|
32
|
+
res = "";
|
|
33
|
+
lastSegmentLength = 0;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
res = res.slice(0, lastSlashIndex);
|
|
37
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
|
|
38
|
+
}
|
|
39
|
+
lastSlash = i;
|
|
40
|
+
dots = 0;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (res.length === 2 || res.length === 1) {
|
|
44
|
+
res = "";
|
|
45
|
+
lastSegmentLength = 0;
|
|
46
|
+
lastSlash = i;
|
|
47
|
+
dots = 0;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (allowAboveRoot) {
|
|
52
|
+
if (res.length > 0)
|
|
53
|
+
res += `${separator}..`;
|
|
54
|
+
else
|
|
55
|
+
res = "..";
|
|
56
|
+
lastSegmentLength = 2;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
if (res.length > 0)
|
|
61
|
+
res += separator + path.slice(lastSlash + 1, i);
|
|
62
|
+
else
|
|
63
|
+
res = path.slice(lastSlash + 1, i);
|
|
64
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
65
|
+
}
|
|
66
|
+
lastSlash = i;
|
|
67
|
+
dots = 0;
|
|
68
|
+
}
|
|
69
|
+
else if (code === CHAR_DOT && dots !== -1) {
|
|
70
|
+
++dots;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
dots = -1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArgs(from: string, to: string): "" | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stripTrailingSeparators(segment: string, isSep: (char: number) => boolean): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
4
|
+
// This module is browser compatible.
|
|
5
|
+
export function stripTrailingSeparators(segment, isSep) {
|
|
6
|
+
if (segment.length <= 1) {
|
|
7
|
+
return segment;
|
|
8
|
+
}
|
|
9
|
+
let end = segment.length;
|
|
10
|
+
for (let i = segment.length - 1; i > 0; i--) {
|
|
11
|
+
if (isSep(segment.charCodeAt(i))) {
|
|
12
|
+
end = i;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return segment.slice(0, end);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodeWhitespace(string: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
const WHITESPACE_ENCODINGS = {
|
|
4
|
+
"\u0009": "%09",
|
|
5
|
+
"\u000A": "%0A",
|
|
6
|
+
"\u000B": "%0B",
|
|
7
|
+
"\u000C": "%0C",
|
|
8
|
+
"\u000D": "%0D",
|
|
9
|
+
"\u0020": "%20",
|
|
10
|
+
};
|
|
11
|
+
export function encodeWhitespace(string) {
|
|
12
|
+
return string.replaceAll(/[\s]/g, (c) => {
|
|
13
|
+
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isWindows: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// deno-lint-ignore-file no-explicit-any
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
// Check Deno, then the remaining runtimes (e.g. Node, Bun and the browser)
|
|
5
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
6
|
+
export const isWindows = dntShim.dntGlobalThis.Deno?.build.os === "windows" ||
|
|
7
|
+
dntShim.dntGlobalThis.navigator?.platform?.startsWith("Win") ||
|
|
8
|
+
dntShim.dntGlobalThis.process?.platform?.startsWith("win") ||
|
|
9
|
+
false;
|