keep-a-changelog 2.5.2 → 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 +28 -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} +96 -18
- 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} +97 -19
- 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,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isAbsolute = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const is_absolute_js_1 = require("./posix/is_absolute.js");
|
|
8
|
+
const is_absolute_js_2 = require("./windows/is_absolute.js");
|
|
9
|
+
/**
|
|
10
|
+
* Verifies whether provided path is absolute.
|
|
11
|
+
*
|
|
12
|
+
* @example Usage
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { isAbsolute } from "is_absolute.ts";
|
|
15
|
+
* import { assert, assertFalse } from "../assert/mod.ts";
|
|
16
|
+
*
|
|
17
|
+
* if (Deno.build.os === "windows") {
|
|
18
|
+
* assert(isAbsolute("C:\\home\\foo"));
|
|
19
|
+
* assertFalse(isAbsolute("home\\foo"));
|
|
20
|
+
* } else {
|
|
21
|
+
* assert(isAbsolute("/home/foo"));
|
|
22
|
+
* assertFalse(isAbsolute("home/foo"));
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param path Path to be verified as absolute.
|
|
27
|
+
* @returns `true` if path is absolute, `false` otherwise
|
|
28
|
+
*/
|
|
29
|
+
function isAbsolute(path) {
|
|
30
|
+
return _os_js_1.isWindows ? (0, is_absolute_js_2.isAbsolute)(path) : (0, is_absolute_js_1.isAbsolute)(path);
|
|
31
|
+
}
|
|
32
|
+
exports.isAbsolute = isAbsolute;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test whether the given string is a glob.
|
|
3
|
+
*
|
|
4
|
+
* @example Usage
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { isGlob } from "is_glob.ts";
|
|
7
|
+
* import { assert } from "../assert/mod.ts";
|
|
8
|
+
*
|
|
9
|
+
* assert(!isGlob("foo/bar/../baz"));
|
|
10
|
+
* assert(isGlob("foo/*ar/../baz"));
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @param str String to test.
|
|
14
|
+
* @returns `true` if the given string is a glob, otherwise `false`
|
|
15
|
+
*/
|
|
16
|
+
export declare function isGlob(str: string): boolean;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isGlob = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Test whether the given string is a glob.
|
|
8
|
+
*
|
|
9
|
+
* @example Usage
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { isGlob } from "is_glob.ts";
|
|
12
|
+
* import { assert } from "../assert/mod.ts";
|
|
13
|
+
*
|
|
14
|
+
* assert(!isGlob("foo/bar/../baz"));
|
|
15
|
+
* assert(isGlob("foo/*ar/../baz"));
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param str String to test.
|
|
19
|
+
* @returns `true` if the given string is a glob, otherwise `false`
|
|
20
|
+
*/
|
|
21
|
+
function isGlob(str) {
|
|
22
|
+
const chars = { "{": "}", "(": ")", "[": "]" };
|
|
23
|
+
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
|
24
|
+
if (str === "") {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
let match;
|
|
28
|
+
while ((match = regex.exec(str))) {
|
|
29
|
+
if (match[2])
|
|
30
|
+
return true;
|
|
31
|
+
let idx = match.index + match[0].length;
|
|
32
|
+
// if an open bracket/brace/paren is escaped,
|
|
33
|
+
// set the index to the next closing character
|
|
34
|
+
const open = match[1];
|
|
35
|
+
const close = open ? chars[open] : null;
|
|
36
|
+
if (open && close) {
|
|
37
|
+
const n = str.indexOf(close, idx);
|
|
38
|
+
if (n !== -1) {
|
|
39
|
+
idx = n + 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
str = str.slice(idx);
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
exports.isGlob = isGlob;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Joins a sequence of paths, then normalizes the resulting path.
|
|
3
|
+
*
|
|
4
|
+
* @example Usage
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { join } from "join.ts";
|
|
7
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
8
|
+
*
|
|
9
|
+
* if (Deno.build.os === "windows") {
|
|
10
|
+
* assertEquals(join("C:\\foo", "bar", "baz\\quux", "garply", ".."), "C:\\foo\\bar\\baz\\quux");
|
|
11
|
+
* } else {
|
|
12
|
+
* assertEquals(join("/foo", "bar", "baz/quux", "garply", ".."), "/foo/bar/baz/quux");
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Note: If you are working with file URLs,
|
|
17
|
+
* use the new version of `join` from `@std/path/unstable-join`.
|
|
18
|
+
*
|
|
19
|
+
* @param paths Paths to be joined and normalized.
|
|
20
|
+
* @returns The joined and normalized path.
|
|
21
|
+
*/
|
|
22
|
+
export declare function join(...paths: string[]): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.join = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const join_js_1 = require("./posix/join.js");
|
|
8
|
+
const join_js_2 = require("./windows/join.js");
|
|
9
|
+
/**
|
|
10
|
+
* Joins a sequence of paths, then normalizes the resulting path.
|
|
11
|
+
*
|
|
12
|
+
* @example Usage
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { join } from "join.ts";
|
|
15
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
16
|
+
*
|
|
17
|
+
* if (Deno.build.os === "windows") {
|
|
18
|
+
* assertEquals(join("C:\\foo", "bar", "baz\\quux", "garply", ".."), "C:\\foo\\bar\\baz\\quux");
|
|
19
|
+
* } else {
|
|
20
|
+
* assertEquals(join("/foo", "bar", "baz/quux", "garply", ".."), "/foo/bar/baz/quux");
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Note: If you are working with file URLs,
|
|
25
|
+
* use the new version of `join` from `@std/path/unstable-join`.
|
|
26
|
+
*
|
|
27
|
+
* @param paths Paths to be joined and normalized.
|
|
28
|
+
* @returns The joined and normalized path.
|
|
29
|
+
*/
|
|
30
|
+
function join(...paths) {
|
|
31
|
+
return _os_js_1.isWindows ? (0, join_js_2.join)(...paths) : (0, join_js_1.join)(...paths);
|
|
32
|
+
}
|
|
33
|
+
exports.join = join;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
|
|
2
|
+
export type { GlobOptions };
|
|
3
|
+
/**
|
|
4
|
+
* Joins a sequence of globs, then normalizes the resulting glob.
|
|
5
|
+
*
|
|
6
|
+
* Behaves like {@linkcode https://jsr.io/@std/path/doc/~/join | join()}, but
|
|
7
|
+
* doesn't collapse `**\/..` when `globstar` is true.
|
|
8
|
+
*
|
|
9
|
+
* @example Usage
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { joinGlobs } from "join_globs.ts";
|
|
12
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
13
|
+
*
|
|
14
|
+
* if (Deno.build.os === "windows") {
|
|
15
|
+
* assertEquals(joinGlobs(["foo", "bar", "..", "baz"]), "foo\\baz");
|
|
16
|
+
* assertEquals(joinGlobs(["foo", "**", "bar", "..", "baz"], { globstar: true }), "foo\\**\\baz");
|
|
17
|
+
* } else {
|
|
18
|
+
* assertEquals(joinGlobs(["foo", "bar", "..", "baz"]), "foo/baz");
|
|
19
|
+
* assertEquals(joinGlobs(["foo", "**", "bar", "..", "baz"], { globstar: true }), "foo/**\/baz");
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param globs Globs to be joined and normalized.
|
|
24
|
+
* @param options Glob options.
|
|
25
|
+
* @returns The joined and normalized glob string.
|
|
26
|
+
*/
|
|
27
|
+
export declare function joinGlobs(globs: string[], options?: GlobOptions): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.joinGlobs = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const join_globs_js_1 = require("./posix/join_globs.js");
|
|
8
|
+
const join_globs_js_2 = require("./windows/join_globs.js");
|
|
9
|
+
/**
|
|
10
|
+
* Joins a sequence of globs, then normalizes the resulting glob.
|
|
11
|
+
*
|
|
12
|
+
* Behaves like {@linkcode https://jsr.io/@std/path/doc/~/join | join()}, but
|
|
13
|
+
* doesn't collapse `**\/..` when `globstar` is true.
|
|
14
|
+
*
|
|
15
|
+
* @example Usage
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { joinGlobs } from "join_globs.ts";
|
|
18
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
19
|
+
*
|
|
20
|
+
* if (Deno.build.os === "windows") {
|
|
21
|
+
* assertEquals(joinGlobs(["foo", "bar", "..", "baz"]), "foo\\baz");
|
|
22
|
+
* assertEquals(joinGlobs(["foo", "**", "bar", "..", "baz"], { globstar: true }), "foo\\**\\baz");
|
|
23
|
+
* } else {
|
|
24
|
+
* assertEquals(joinGlobs(["foo", "bar", "..", "baz"]), "foo/baz");
|
|
25
|
+
* assertEquals(joinGlobs(["foo", "**", "bar", "..", "baz"], { globstar: true }), "foo/**\/baz");
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param globs Globs to be joined and normalized.
|
|
30
|
+
* @param options Glob options.
|
|
31
|
+
* @returns The joined and normalized glob string.
|
|
32
|
+
*/
|
|
33
|
+
function joinGlobs(globs, options = {}) {
|
|
34
|
+
return _os_js_1.isWindows
|
|
35
|
+
? (0, join_globs_js_2.joinGlobs)(globs, options)
|
|
36
|
+
: (0, join_globs_js_1.joinGlobs)(globs, options);
|
|
37
|
+
}
|
|
38
|
+
exports.joinGlobs = joinGlobs;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for working with OS-specific file paths.
|
|
3
|
+
*
|
|
4
|
+
* Functions from this module will automatically switch to support the path style
|
|
5
|
+
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
6
|
+
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
7
|
+
*
|
|
8
|
+
* To use functions for a specific path style regardless of the current OS
|
|
9
|
+
* import the modules from the platform sub directory instead.
|
|
10
|
+
*
|
|
11
|
+
* Example, for POSIX:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { fromFileUrl } from "posix/from_file_url.ts";
|
|
15
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
16
|
+
*
|
|
17
|
+
* assertEquals(fromFileUrl("file:///home/foo"), "/home/foo");
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Or, for Windows:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { fromFileUrl } from "windows/from_file_url.ts";
|
|
24
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
25
|
+
*
|
|
26
|
+
* assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Functions for working with URLs can be found in
|
|
30
|
+
* {@link ./doc/posix/~ | @std/path/posix}.
|
|
31
|
+
*
|
|
32
|
+
* @module
|
|
33
|
+
*/
|
|
34
|
+
export * from "./basename.js";
|
|
35
|
+
export * from "./constants.js";
|
|
36
|
+
export * from "./dirname.js";
|
|
37
|
+
export * from "./extname.js";
|
|
38
|
+
export * from "./format.js";
|
|
39
|
+
export * from "./from_file_url.js";
|
|
40
|
+
export * from "./is_absolute.js";
|
|
41
|
+
export * from "./join.js";
|
|
42
|
+
export * from "./normalize.js";
|
|
43
|
+
export * from "./parse.js";
|
|
44
|
+
export * from "./relative.js";
|
|
45
|
+
export * from "./resolve.js";
|
|
46
|
+
export * from "./to_file_url.js";
|
|
47
|
+
export * from "./to_namespaced_path.js";
|
|
48
|
+
export * from "./common.js";
|
|
49
|
+
export * from "./types.js";
|
|
50
|
+
export * from "./glob_to_regexp.js";
|
|
51
|
+
export * from "./is_glob.js";
|
|
52
|
+
export * from "./join_globs.js";
|
|
53
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
// Ported mostly from https://github.com/browserify/path-browserify/
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
/**
|
|
22
|
+
* Utilities for working with OS-specific file paths.
|
|
23
|
+
*
|
|
24
|
+
* Functions from this module will automatically switch to support the path style
|
|
25
|
+
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
26
|
+
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
27
|
+
*
|
|
28
|
+
* To use functions for a specific path style regardless of the current OS
|
|
29
|
+
* import the modules from the platform sub directory instead.
|
|
30
|
+
*
|
|
31
|
+
* Example, for POSIX:
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { fromFileUrl } from "posix/from_file_url.ts";
|
|
35
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
36
|
+
*
|
|
37
|
+
* assertEquals(fromFileUrl("file:///home/foo"), "/home/foo");
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* Or, for Windows:
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { fromFileUrl } from "windows/from_file_url.ts";
|
|
44
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
45
|
+
*
|
|
46
|
+
* assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* Functions for working with URLs can be found in
|
|
50
|
+
* {@link ./doc/posix/~ | @std/path/posix}.
|
|
51
|
+
*
|
|
52
|
+
* @module
|
|
53
|
+
*/
|
|
54
|
+
__exportStar(require("./basename.js"), exports);
|
|
55
|
+
__exportStar(require("./constants.js"), exports);
|
|
56
|
+
__exportStar(require("./dirname.js"), exports);
|
|
57
|
+
__exportStar(require("./extname.js"), exports);
|
|
58
|
+
__exportStar(require("./format.js"), exports);
|
|
59
|
+
__exportStar(require("./from_file_url.js"), exports);
|
|
60
|
+
__exportStar(require("./is_absolute.js"), exports);
|
|
61
|
+
__exportStar(require("./join.js"), exports);
|
|
62
|
+
__exportStar(require("./normalize.js"), exports);
|
|
63
|
+
__exportStar(require("./parse.js"), exports);
|
|
64
|
+
__exportStar(require("./relative.js"), exports);
|
|
65
|
+
__exportStar(require("./resolve.js"), exports);
|
|
66
|
+
__exportStar(require("./to_file_url.js"), exports);
|
|
67
|
+
__exportStar(require("./to_namespaced_path.js"), exports);
|
|
68
|
+
__exportStar(require("./common.js"), exports);
|
|
69
|
+
__exportStar(require("./types.js"), exports);
|
|
70
|
+
__exportStar(require("./glob_to_regexp.js"), exports);
|
|
71
|
+
__exportStar(require("./is_glob.js"), exports);
|
|
72
|
+
__exportStar(require("./join_globs.js"), exports);
|
|
73
|
+
__exportStar(require("./normalize_glob.js"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the path, resolving `'..'` and `'.'` segments.
|
|
3
|
+
*
|
|
4
|
+
* Note: Resolving these segments does not necessarily mean that all will be
|
|
5
|
+
* eliminated. A `'..'` at the top-level will be preserved, and an empty path is
|
|
6
|
+
* canonically `'.'`.
|
|
7
|
+
*
|
|
8
|
+
* @example Usage
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { normalize } from "normalize.ts";
|
|
11
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
12
|
+
*
|
|
13
|
+
* if (Deno.build.os === "windows") {
|
|
14
|
+
* assertEquals(normalize("C:\\foo\\bar\\..\\baz\\quux"), "C:\\foo\\baz\\quux");
|
|
15
|
+
* } else {
|
|
16
|
+
* assertEquals(normalize("/foo/bar/../baz/quux"), "/foo/baz/quux");
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Note: If you are working with file URLs,
|
|
21
|
+
* use the new version of `normalize` from `@std/path/unstable-normalize`.
|
|
22
|
+
*
|
|
23
|
+
* @param path Path to be normalized
|
|
24
|
+
* @returns The normalized path.
|
|
25
|
+
*/
|
|
26
|
+
export declare function normalize(path: string): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.normalize = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const normalize_js_1 = require("./posix/normalize.js");
|
|
8
|
+
const normalize_js_2 = require("./windows/normalize.js");
|
|
9
|
+
/**
|
|
10
|
+
* Normalize the path, resolving `'..'` and `'.'` segments.
|
|
11
|
+
*
|
|
12
|
+
* Note: Resolving these segments does not necessarily mean that all will be
|
|
13
|
+
* eliminated. A `'..'` at the top-level will be preserved, and an empty path is
|
|
14
|
+
* canonically `'.'`.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { normalize } from "normalize.ts";
|
|
19
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
20
|
+
*
|
|
21
|
+
* if (Deno.build.os === "windows") {
|
|
22
|
+
* assertEquals(normalize("C:\\foo\\bar\\..\\baz\\quux"), "C:\\foo\\baz\\quux");
|
|
23
|
+
* } else {
|
|
24
|
+
* assertEquals(normalize("/foo/bar/../baz/quux"), "/foo/baz/quux");
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Note: If you are working with file URLs,
|
|
29
|
+
* use the new version of `normalize` from `@std/path/unstable-normalize`.
|
|
30
|
+
*
|
|
31
|
+
* @param path Path to be normalized
|
|
32
|
+
* @returns The normalized path.
|
|
33
|
+
*/
|
|
34
|
+
function normalize(path) {
|
|
35
|
+
return _os_js_1.isWindows ? (0, normalize_js_2.normalize)(path) : (0, normalize_js_1.normalize)(path);
|
|
36
|
+
}
|
|
37
|
+
exports.normalize = normalize;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
|
|
2
|
+
export type { GlobOptions };
|
|
3
|
+
/**
|
|
4
|
+
* Normalizes a glob string.
|
|
5
|
+
*
|
|
6
|
+
* Behaves like
|
|
7
|
+
* {@linkcode https://jsr.io/@std/path/doc/~/normalize | normalize()}, but
|
|
8
|
+
* doesn't collapse "**\/.." when `globstar` is true.
|
|
9
|
+
*
|
|
10
|
+
* @example Usage
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { normalizeGlob } from "normalize_glob.ts";
|
|
13
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
14
|
+
*
|
|
15
|
+
* if (Deno.build.os === "windows") {
|
|
16
|
+
* assertEquals(normalizeGlob("foo\\bar\\..\\baz"), "foo\\baz");
|
|
17
|
+
* assertEquals(normalizeGlob("foo\\**\\..\\bar\\..\\baz", { globstar: true }), "foo\\**\\..\\baz");
|
|
18
|
+
* } else {
|
|
19
|
+
* assertEquals(normalizeGlob("foo/bar/../baz"), "foo/baz");
|
|
20
|
+
* assertEquals(normalizeGlob("foo/**\/../bar/../baz", { globstar: true }), "foo/**\/../baz");
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param glob Glob string to normalize.
|
|
25
|
+
* @param options Glob options.
|
|
26
|
+
* @returns The normalized glob string.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeGlob(glob: string, options?: GlobOptions): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.normalizeGlob = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const normalize_glob_js_1 = require("./posix/normalize_glob.js");
|
|
8
|
+
const normalize_glob_js_2 = require("./windows/normalize_glob.js");
|
|
9
|
+
/**
|
|
10
|
+
* Normalizes a glob string.
|
|
11
|
+
*
|
|
12
|
+
* Behaves like
|
|
13
|
+
* {@linkcode https://jsr.io/@std/path/doc/~/normalize | normalize()}, but
|
|
14
|
+
* doesn't collapse "**\/.." when `globstar` is true.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { normalizeGlob } from "normalize_glob.ts";
|
|
19
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
20
|
+
*
|
|
21
|
+
* if (Deno.build.os === "windows") {
|
|
22
|
+
* assertEquals(normalizeGlob("foo\\bar\\..\\baz"), "foo\\baz");
|
|
23
|
+
* assertEquals(normalizeGlob("foo\\**\\..\\bar\\..\\baz", { globstar: true }), "foo\\**\\..\\baz");
|
|
24
|
+
* } else {
|
|
25
|
+
* assertEquals(normalizeGlob("foo/bar/../baz"), "foo/baz");
|
|
26
|
+
* assertEquals(normalizeGlob("foo/**\/../bar/../baz", { globstar: true }), "foo/**\/../baz");
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @param glob Glob string to normalize.
|
|
31
|
+
* @param options Glob options.
|
|
32
|
+
* @returns The normalized glob string.
|
|
33
|
+
*/
|
|
34
|
+
function normalizeGlob(glob, options = {}) {
|
|
35
|
+
return _os_js_1.isWindows
|
|
36
|
+
? (0, normalize_glob_js_2.normalizeGlob)(glob, options)
|
|
37
|
+
: (0, normalize_glob_js_1.normalizeGlob)(glob, options);
|
|
38
|
+
}
|
|
39
|
+
exports.normalizeGlob = normalizeGlob;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ParsedPath } from "./types.js";
|
|
2
|
+
export type { ParsedPath } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Return an object containing the parsed components of the path.
|
|
5
|
+
*
|
|
6
|
+
* Use {@linkcode https://jsr.io/@std/path/doc/~/format | format()} to reverse
|
|
7
|
+
* the result.
|
|
8
|
+
*
|
|
9
|
+
* @example Usage
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { parse } from "parse.ts";
|
|
12
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
13
|
+
*
|
|
14
|
+
* if (Deno.build.os === "windows") {
|
|
15
|
+
* const parsedPathObj = parse("C:\\path\\to\\script.ts");
|
|
16
|
+
* assertEquals(parsedPathObj.root, "C:\\");
|
|
17
|
+
* assertEquals(parsedPathObj.dir, "C:\\path\\to");
|
|
18
|
+
* assertEquals(parsedPathObj.base, "script.ts");
|
|
19
|
+
* assertEquals(parsedPathObj.ext, ".ts");
|
|
20
|
+
* assertEquals(parsedPathObj.name, "script");
|
|
21
|
+
* } else {
|
|
22
|
+
* const parsedPathObj = parse("/path/to/dir/script.ts");
|
|
23
|
+
* parsedPathObj.root; // "/"
|
|
24
|
+
* parsedPathObj.dir; // "/path/to/dir"
|
|
25
|
+
* parsedPathObj.base; // "script.ts"
|
|
26
|
+
* parsedPathObj.ext; // ".ts"
|
|
27
|
+
* parsedPathObj.name; // "script"
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @param path Path to process
|
|
32
|
+
* @returns An object with the parsed path components.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parse(path: string): ParsedPath;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.parse = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const parse_js_1 = require("./posix/parse.js");
|
|
8
|
+
const parse_js_2 = require("./windows/parse.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return an object containing the parsed components of the path.
|
|
11
|
+
*
|
|
12
|
+
* Use {@linkcode https://jsr.io/@std/path/doc/~/format | format()} to reverse
|
|
13
|
+
* the result.
|
|
14
|
+
*
|
|
15
|
+
* @example Usage
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { parse } from "parse.ts";
|
|
18
|
+
* import { assertEquals } from "../assert/mod.ts";
|
|
19
|
+
*
|
|
20
|
+
* if (Deno.build.os === "windows") {
|
|
21
|
+
* const parsedPathObj = parse("C:\\path\\to\\script.ts");
|
|
22
|
+
* assertEquals(parsedPathObj.root, "C:\\");
|
|
23
|
+
* assertEquals(parsedPathObj.dir, "C:\\path\\to");
|
|
24
|
+
* assertEquals(parsedPathObj.base, "script.ts");
|
|
25
|
+
* assertEquals(parsedPathObj.ext, ".ts");
|
|
26
|
+
* assertEquals(parsedPathObj.name, "script");
|
|
27
|
+
* } else {
|
|
28
|
+
* const parsedPathObj = parse("/path/to/dir/script.ts");
|
|
29
|
+
* parsedPathObj.root; // "/"
|
|
30
|
+
* parsedPathObj.dir; // "/path/to/dir"
|
|
31
|
+
* parsedPathObj.base; // "script.ts"
|
|
32
|
+
* parsedPathObj.ext; // ".ts"
|
|
33
|
+
* parsedPathObj.name; // "script"
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @param path Path to process
|
|
38
|
+
* @returns An object with the parsed path components.
|
|
39
|
+
*/
|
|
40
|
+
function parse(path) {
|
|
41
|
+
return _os_js_1.isWindows ? (0, parse_js_2.parse)(path) : (0, parse_js_1.parse)(path);
|
|
42
|
+
}
|
|
43
|
+
exports.parse = parse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPosixPathSeparator(code: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.isPosixPathSeparator = void 0;
|
|
8
|
+
const constants_js_1 = require("../_common/constants.js");
|
|
9
|
+
function isPosixPathSeparator(code) {
|
|
10
|
+
return code === constants_js_1.CHAR_FORWARD_SLASH;
|
|
11
|
+
}
|
|
12
|
+
exports.isPosixPathSeparator = isPosixPathSeparator;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the last portion of a `path`.
|
|
3
|
+
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
+
*
|
|
5
|
+
* @example Usage
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { basename } from "basename.ts";
|
|
8
|
+
* import { assertEquals } from "../../assert/mod.ts";
|
|
9
|
+
*
|
|
10
|
+
* assertEquals(basename("/home/user/Documents/"), "Documents");
|
|
11
|
+
* assertEquals(basename("/home/user/Documents/image.png"), "image.png");
|
|
12
|
+
* assertEquals(basename("/home/user/Documents/image.png", ".png"), "image");
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @example Working with URLs
|
|
16
|
+
*
|
|
17
|
+
* Note: This function doesn't automatically strip hash and query parts from
|
|
18
|
+
* URLs. If your URL contains a hash or query, remove them before passing the
|
|
19
|
+
* URL to the function. This can be done by passing the URL to `new URL(url)`,
|
|
20
|
+
* and setting the `hash` and `search` properties to empty strings.
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { basename } from "basename.ts";
|
|
24
|
+
* import { assertEquals } from "../../assert/mod.ts";
|
|
25
|
+
*
|
|
26
|
+
* assertEquals(basename("https://deno.land/std/path/mod.ts"), "mod.ts");
|
|
27
|
+
* assertEquals(basename("https://deno.land/std/path/mod.ts", ".ts"), "mod");
|
|
28
|
+
* assertEquals(basename("https://deno.land/std/path/mod.ts?a=b"), "mod.ts?a=b");
|
|
29
|
+
* assertEquals(basename("https://deno.land/std/path/mod.ts#header"), "mod.ts#header");
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Note: If you are working with file URLs,
|
|
33
|
+
* use the new version of `basename` from `@std/path/posix/unstable-basename`.
|
|
34
|
+
*
|
|
35
|
+
* @param path The path to extract the name from.
|
|
36
|
+
* @param suffix The suffix to remove from extracted name.
|
|
37
|
+
* @returns The extracted name.
|
|
38
|
+
*/
|
|
39
|
+
export declare function basename(path: string, suffix?: string): string;
|