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
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2023 the Deno authors. All rights reserved. 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.stripSuffix = exports.stripTrailingSeparators = exports.lastPathSegment = exports.encodeWhitespace = exports._format = exports.normalizeString = exports.isWindowsDeviceRoot = exports.isPathSeparator = exports.isPosixPathSeparator = exports.assertPath = void 0;
|
|
8
|
-
const _constants_js_1 = require("./_constants.js");
|
|
9
|
-
function assertPath(path) {
|
|
10
|
-
if (typeof path !== "string") {
|
|
11
|
-
throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.assertPath = assertPath;
|
|
15
|
-
function isPosixPathSeparator(code) {
|
|
16
|
-
return code === _constants_js_1.CHAR_FORWARD_SLASH;
|
|
17
|
-
}
|
|
18
|
-
exports.isPosixPathSeparator = isPosixPathSeparator;
|
|
19
|
-
function isPathSeparator(code) {
|
|
20
|
-
return isPosixPathSeparator(code) || code === _constants_js_1.CHAR_BACKWARD_SLASH;
|
|
21
|
-
}
|
|
22
|
-
exports.isPathSeparator = isPathSeparator;
|
|
23
|
-
function isWindowsDeviceRoot(code) {
|
|
24
|
-
return ((code >= _constants_js_1.CHAR_LOWERCASE_A && code <= _constants_js_1.CHAR_LOWERCASE_Z) ||
|
|
25
|
-
(code >= _constants_js_1.CHAR_UPPERCASE_A && code <= _constants_js_1.CHAR_UPPERCASE_Z));
|
|
26
|
-
}
|
|
27
|
-
exports.isWindowsDeviceRoot = isWindowsDeviceRoot;
|
|
28
|
-
// Resolves . and .. elements in a path with directory names
|
|
29
|
-
function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
30
|
-
let res = "";
|
|
31
|
-
let lastSegmentLength = 0;
|
|
32
|
-
let lastSlash = -1;
|
|
33
|
-
let dots = 0;
|
|
34
|
-
let code;
|
|
35
|
-
for (let i = 0, len = path.length; i <= len; ++i) {
|
|
36
|
-
if (i < len)
|
|
37
|
-
code = path.charCodeAt(i);
|
|
38
|
-
else if (isPathSeparator(code))
|
|
39
|
-
break;
|
|
40
|
-
else
|
|
41
|
-
code = _constants_js_1.CHAR_FORWARD_SLASH;
|
|
42
|
-
if (isPathSeparator(code)) {
|
|
43
|
-
if (lastSlash === i - 1 || dots === 1) {
|
|
44
|
-
// NOOP
|
|
45
|
-
}
|
|
46
|
-
else if (lastSlash !== i - 1 && dots === 2) {
|
|
47
|
-
if (res.length < 2 ||
|
|
48
|
-
lastSegmentLength !== 2 ||
|
|
49
|
-
res.charCodeAt(res.length - 1) !== _constants_js_1.CHAR_DOT ||
|
|
50
|
-
res.charCodeAt(res.length - 2) !== _constants_js_1.CHAR_DOT) {
|
|
51
|
-
if (res.length > 2) {
|
|
52
|
-
const lastSlashIndex = res.lastIndexOf(separator);
|
|
53
|
-
if (lastSlashIndex === -1) {
|
|
54
|
-
res = "";
|
|
55
|
-
lastSegmentLength = 0;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
res = res.slice(0, lastSlashIndex);
|
|
59
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
|
|
60
|
-
}
|
|
61
|
-
lastSlash = i;
|
|
62
|
-
dots = 0;
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
else if (res.length === 2 || res.length === 1) {
|
|
66
|
-
res = "";
|
|
67
|
-
lastSegmentLength = 0;
|
|
68
|
-
lastSlash = i;
|
|
69
|
-
dots = 0;
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (allowAboveRoot) {
|
|
74
|
-
if (res.length > 0)
|
|
75
|
-
res += `${separator}..`;
|
|
76
|
-
else
|
|
77
|
-
res = "..";
|
|
78
|
-
lastSegmentLength = 2;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (res.length > 0)
|
|
83
|
-
res += separator + path.slice(lastSlash + 1, i);
|
|
84
|
-
else
|
|
85
|
-
res = path.slice(lastSlash + 1, i);
|
|
86
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
87
|
-
}
|
|
88
|
-
lastSlash = i;
|
|
89
|
-
dots = 0;
|
|
90
|
-
}
|
|
91
|
-
else if (code === _constants_js_1.CHAR_DOT && dots !== -1) {
|
|
92
|
-
++dots;
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
dots = -1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return res;
|
|
99
|
-
}
|
|
100
|
-
exports.normalizeString = normalizeString;
|
|
101
|
-
function _format(sep, pathObject) {
|
|
102
|
-
const dir = pathObject.dir || pathObject.root;
|
|
103
|
-
const base = pathObject.base ||
|
|
104
|
-
(pathObject.name || "") + (pathObject.ext || "");
|
|
105
|
-
if (!dir)
|
|
106
|
-
return base;
|
|
107
|
-
if (base === sep)
|
|
108
|
-
return dir;
|
|
109
|
-
if (dir === pathObject.root)
|
|
110
|
-
return dir + base;
|
|
111
|
-
return dir + sep + base;
|
|
112
|
-
}
|
|
113
|
-
exports._format = _format;
|
|
114
|
-
const WHITESPACE_ENCODINGS = {
|
|
115
|
-
"\u0009": "%09",
|
|
116
|
-
"\u000A": "%0A",
|
|
117
|
-
"\u000B": "%0B",
|
|
118
|
-
"\u000C": "%0C",
|
|
119
|
-
"\u000D": "%0D",
|
|
120
|
-
"\u0020": "%20",
|
|
121
|
-
};
|
|
122
|
-
function encodeWhitespace(string) {
|
|
123
|
-
return string.replaceAll(/[\s]/g, (c) => {
|
|
124
|
-
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
exports.encodeWhitespace = encodeWhitespace;
|
|
128
|
-
function lastPathSegment(path, isSep, start = 0) {
|
|
129
|
-
let matchedNonSeparator = false;
|
|
130
|
-
let end = path.length;
|
|
131
|
-
for (let i = path.length - 1; i >= start; --i) {
|
|
132
|
-
if (isSep(path.charCodeAt(i))) {
|
|
133
|
-
if (matchedNonSeparator) {
|
|
134
|
-
start = i + 1;
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
else if (!matchedNonSeparator) {
|
|
139
|
-
matchedNonSeparator = true;
|
|
140
|
-
end = i + 1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return path.slice(start, end);
|
|
144
|
-
}
|
|
145
|
-
exports.lastPathSegment = lastPathSegment;
|
|
146
|
-
function stripTrailingSeparators(segment, isSep) {
|
|
147
|
-
if (segment.length <= 1) {
|
|
148
|
-
return segment;
|
|
149
|
-
}
|
|
150
|
-
let end = segment.length;
|
|
151
|
-
for (let i = segment.length - 1; i > 0; i--) {
|
|
152
|
-
if (isSep(segment.charCodeAt(i))) {
|
|
153
|
-
end = i;
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return segment.slice(0, end);
|
|
160
|
-
}
|
|
161
|
-
exports.stripTrailingSeparators = stripTrailingSeparators;
|
|
162
|
-
function stripSuffix(name, suffix) {
|
|
163
|
-
if (suffix.length >= name.length) {
|
|
164
|
-
return name;
|
|
165
|
-
}
|
|
166
|
-
const lenDiff = name.length - suffix.length;
|
|
167
|
-
for (let i = suffix.length - 1; i >= 0; --i) {
|
|
168
|
-
if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {
|
|
169
|
-
return name;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return name.slice(0, -suffix.length);
|
|
173
|
-
}
|
|
174
|
-
exports.stripSuffix = stripSuffix;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Determines the common path from a set of paths, using an optional separator,
|
|
2
|
-
* which defaults to the OS default separator.
|
|
3
|
-
*
|
|
4
|
-
* ```ts
|
|
5
|
-
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
6
|
-
* const p = common([
|
|
7
|
-
* "./deno/std/path/mod.ts",
|
|
8
|
-
* "./deno/std/fs/mod.ts",
|
|
9
|
-
* ]);
|
|
10
|
-
* console.log(p); // "./deno/std/"
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare function common(paths: string[], sep?: string): string;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.common = void 0;
|
|
6
|
-
const separator_js_1 = require("./separator.js");
|
|
7
|
-
/** Determines the common path from a set of paths, using an optional separator,
|
|
8
|
-
* which defaults to the OS default separator.
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
12
|
-
* const p = common([
|
|
13
|
-
* "./deno/std/path/mod.ts",
|
|
14
|
-
* "./deno/std/fs/mod.ts",
|
|
15
|
-
* ]);
|
|
16
|
-
* console.log(p); // "./deno/std/"
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
function common(paths, sep = separator_js_1.SEP) {
|
|
20
|
-
const [first = "", ...remaining] = paths;
|
|
21
|
-
if (first === "" || remaining.length === 0) {
|
|
22
|
-
return first.substring(0, first.lastIndexOf(sep) + 1);
|
|
23
|
-
}
|
|
24
|
-
const parts = first.split(sep);
|
|
25
|
-
let endOfPrefix = parts.length;
|
|
26
|
-
for (const path of remaining) {
|
|
27
|
-
const compare = path.split(sep);
|
|
28
|
-
for (let i = 0; i < endOfPrefix; i++) {
|
|
29
|
-
if (compare[i] !== parts[i]) {
|
|
30
|
-
endOfPrefix = i;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (endOfPrefix === 0) {
|
|
34
|
-
return "";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
const prefix = parts.slice(0, endOfPrefix).join(sep);
|
|
38
|
-
return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`;
|
|
39
|
-
}
|
|
40
|
-
exports.common = common;
|
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
-
if (mod && mod.__esModule) return mod;
|
|
22
|
-
var result = {};
|
|
23
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
-
__setModuleDefault(result, mod);
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.joinGlobs = exports.normalizeGlob = exports.isGlob = exports.globToRegExp = void 0;
|
|
29
|
-
const os_js_1 = require("../_util/os.js");
|
|
30
|
-
const separator_js_1 = require("./separator.js");
|
|
31
|
-
const _win32 = __importStar(require("./win32.js"));
|
|
32
|
-
const _posix = __importStar(require("./posix.js"));
|
|
33
|
-
const path = os_js_1.isWindows ? _win32 : _posix;
|
|
34
|
-
const { join, normalize } = path;
|
|
35
|
-
const regExpEscapeChars = [
|
|
36
|
-
"!",
|
|
37
|
-
"$",
|
|
38
|
-
"(",
|
|
39
|
-
")",
|
|
40
|
-
"*",
|
|
41
|
-
"+",
|
|
42
|
-
".",
|
|
43
|
-
"=",
|
|
44
|
-
"?",
|
|
45
|
-
"[",
|
|
46
|
-
"\\",
|
|
47
|
-
"^",
|
|
48
|
-
"{",
|
|
49
|
-
"|",
|
|
50
|
-
];
|
|
51
|
-
const rangeEscapeChars = ["-", "\\", "]"];
|
|
52
|
-
/** Convert a glob string to a regular expression.
|
|
53
|
-
*
|
|
54
|
-
* Tries to match bash glob expansion as closely as possible.
|
|
55
|
-
*
|
|
56
|
-
* Basic glob syntax:
|
|
57
|
-
* - `*` - Matches everything without leaving the path segment.
|
|
58
|
-
* - `?` - Matches any single character.
|
|
59
|
-
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
60
|
-
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
61
|
-
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
62
|
-
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
63
|
-
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
64
|
-
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
65
|
-
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
66
|
-
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
67
|
-
* for a complete list of supported character classes.
|
|
68
|
-
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
69
|
-
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
70
|
-
* - `/` - Path separator.
|
|
71
|
-
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
72
|
-
*
|
|
73
|
-
* Extended syntax:
|
|
74
|
-
* - Requires `{ extended: true }`.
|
|
75
|
-
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
76
|
-
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
77
|
-
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
78
|
-
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
79
|
-
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
80
|
-
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
81
|
-
*
|
|
82
|
-
* Globstar syntax:
|
|
83
|
-
* - Requires `{ globstar: true }`.
|
|
84
|
-
* - `**` - Matches any number of any path segments.
|
|
85
|
-
* - Must comprise its entire path segment in the provided glob.
|
|
86
|
-
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
87
|
-
*
|
|
88
|
-
* Note the following properties:
|
|
89
|
-
* - The generated `RegExp` is anchored at both start and end.
|
|
90
|
-
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
91
|
-
* provided glob have no meaning and are discarded.
|
|
92
|
-
* - Absolute globs will only match absolute paths, etc.
|
|
93
|
-
* - Empty globs will match nothing.
|
|
94
|
-
* - Any special glob syntax must be contained to one path segment. For example,
|
|
95
|
-
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
96
|
-
* first segment ends with an unclosed group.
|
|
97
|
-
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
98
|
-
* parse error has occurred. Every character for that segment is taken
|
|
99
|
-
* literally in this event.
|
|
100
|
-
*
|
|
101
|
-
* Limitations:
|
|
102
|
-
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
103
|
-
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
104
|
-
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
105
|
-
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
106
|
-
* the group occurs not nested at the end of the segment. */
|
|
107
|
-
function globToRegExp(glob, { extended = true, globstar: globstarOption = true, os = os_js_1.osType, caseInsensitive = false, } = {}) {
|
|
108
|
-
if (glob == "") {
|
|
109
|
-
return /(?!)/;
|
|
110
|
-
}
|
|
111
|
-
const sep = os == "windows" ? "(?:\\\\|/)+" : "/+";
|
|
112
|
-
const sepMaybe = os == "windows" ? "(?:\\\\|/)*" : "/*";
|
|
113
|
-
const seps = os == "windows" ? ["\\", "/"] : ["/"];
|
|
114
|
-
const globstar = os == "windows"
|
|
115
|
-
? "(?:[^\\\\/]*(?:\\\\|/|$)+)*"
|
|
116
|
-
: "(?:[^/]*(?:/|$)+)*";
|
|
117
|
-
const wildcard = os == "windows" ? "[^\\\\/]*" : "[^/]*";
|
|
118
|
-
const escapePrefix = os == "windows" ? "`" : "\\";
|
|
119
|
-
// Remove trailing separators.
|
|
120
|
-
let newLength = glob.length;
|
|
121
|
-
for (; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--)
|
|
122
|
-
;
|
|
123
|
-
glob = glob.slice(0, newLength);
|
|
124
|
-
let regExpString = "";
|
|
125
|
-
// Terminates correctly. Trust that `j` is incremented every iteration.
|
|
126
|
-
for (let j = 0; j < glob.length;) {
|
|
127
|
-
let segment = "";
|
|
128
|
-
const groupStack = [];
|
|
129
|
-
let inRange = false;
|
|
130
|
-
let inEscape = false;
|
|
131
|
-
let endsWithSep = false;
|
|
132
|
-
let i = j;
|
|
133
|
-
// Terminates with `i` at the non-inclusive end of the current segment.
|
|
134
|
-
for (; i < glob.length && !seps.includes(glob[i]); i++) {
|
|
135
|
-
if (inEscape) {
|
|
136
|
-
inEscape = false;
|
|
137
|
-
const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
|
|
138
|
-
segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
if (glob[i] == escapePrefix) {
|
|
142
|
-
inEscape = true;
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
if (glob[i] == "[") {
|
|
146
|
-
if (!inRange) {
|
|
147
|
-
inRange = true;
|
|
148
|
-
segment += "[";
|
|
149
|
-
if (glob[i + 1] == "!") {
|
|
150
|
-
i++;
|
|
151
|
-
segment += "^";
|
|
152
|
-
}
|
|
153
|
-
else if (glob[i + 1] == "^") {
|
|
154
|
-
i++;
|
|
155
|
-
segment += "\\^";
|
|
156
|
-
}
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
159
|
-
else if (glob[i + 1] == ":") {
|
|
160
|
-
let k = i + 1;
|
|
161
|
-
let value = "";
|
|
162
|
-
while (glob[k + 1] != null && glob[k + 1] != ":") {
|
|
163
|
-
value += glob[k + 1];
|
|
164
|
-
k++;
|
|
165
|
-
}
|
|
166
|
-
if (glob[k + 1] == ":" && glob[k + 2] == "]") {
|
|
167
|
-
i = k + 2;
|
|
168
|
-
if (value == "alnum")
|
|
169
|
-
segment += "\\dA-Za-z";
|
|
170
|
-
else if (value == "alpha")
|
|
171
|
-
segment += "A-Za-z";
|
|
172
|
-
else if (value == "ascii")
|
|
173
|
-
segment += "\x00-\x7F";
|
|
174
|
-
else if (value == "blank")
|
|
175
|
-
segment += "\t ";
|
|
176
|
-
else if (value == "cntrl")
|
|
177
|
-
segment += "\x00-\x1F\x7F";
|
|
178
|
-
else if (value == "digit")
|
|
179
|
-
segment += "\\d";
|
|
180
|
-
else if (value == "graph")
|
|
181
|
-
segment += "\x21-\x7E";
|
|
182
|
-
else if (value == "lower")
|
|
183
|
-
segment += "a-z";
|
|
184
|
-
else if (value == "print")
|
|
185
|
-
segment += "\x20-\x7E";
|
|
186
|
-
else if (value == "punct") {
|
|
187
|
-
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
|
|
188
|
-
}
|
|
189
|
-
else if (value == "space")
|
|
190
|
-
segment += "\\s\v";
|
|
191
|
-
else if (value == "upper")
|
|
192
|
-
segment += "A-Z";
|
|
193
|
-
else if (value == "word")
|
|
194
|
-
segment += "\\w";
|
|
195
|
-
else if (value == "xdigit")
|
|
196
|
-
segment += "\\dA-Fa-f";
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (glob[i] == "]" && inRange) {
|
|
202
|
-
inRange = false;
|
|
203
|
-
segment += "]";
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
206
|
-
if (inRange) {
|
|
207
|
-
if (glob[i] == "\\") {
|
|
208
|
-
segment += `\\\\`;
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
segment += glob[i];
|
|
212
|
-
}
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
if (glob[i] == ")" && groupStack.length > 0 &&
|
|
216
|
-
groupStack[groupStack.length - 1] != "BRACE") {
|
|
217
|
-
segment += ")";
|
|
218
|
-
const type = groupStack.pop();
|
|
219
|
-
if (type == "!") {
|
|
220
|
-
segment += wildcard;
|
|
221
|
-
}
|
|
222
|
-
else if (type != "@") {
|
|
223
|
-
segment += type;
|
|
224
|
-
}
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
if (glob[i] == "|" && groupStack.length > 0 &&
|
|
228
|
-
groupStack[groupStack.length - 1] != "BRACE") {
|
|
229
|
-
segment += "|";
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
if (glob[i] == "+" && extended && glob[i + 1] == "(") {
|
|
233
|
-
i++;
|
|
234
|
-
groupStack.push("+");
|
|
235
|
-
segment += "(?:";
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
if (glob[i] == "@" && extended && glob[i + 1] == "(") {
|
|
239
|
-
i++;
|
|
240
|
-
groupStack.push("@");
|
|
241
|
-
segment += "(?:";
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
if (glob[i] == "?") {
|
|
245
|
-
if (extended && glob[i + 1] == "(") {
|
|
246
|
-
i++;
|
|
247
|
-
groupStack.push("?");
|
|
248
|
-
segment += "(?:";
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
segment += ".";
|
|
252
|
-
}
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
if (glob[i] == "!" && extended && glob[i + 1] == "(") {
|
|
256
|
-
i++;
|
|
257
|
-
groupStack.push("!");
|
|
258
|
-
segment += "(?!";
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
if (glob[i] == "{") {
|
|
262
|
-
groupStack.push("BRACE");
|
|
263
|
-
segment += "(?:";
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
if (glob[i] == "}" && groupStack[groupStack.length - 1] == "BRACE") {
|
|
267
|
-
groupStack.pop();
|
|
268
|
-
segment += ")";
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
if (glob[i] == "," && groupStack[groupStack.length - 1] == "BRACE") {
|
|
272
|
-
segment += "|";
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
if (glob[i] == "*") {
|
|
276
|
-
if (extended && glob[i + 1] == "(") {
|
|
277
|
-
i++;
|
|
278
|
-
groupStack.push("*");
|
|
279
|
-
segment += "(?:";
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
const prevChar = glob[i - 1];
|
|
283
|
-
let numStars = 1;
|
|
284
|
-
while (glob[i + 1] == "*") {
|
|
285
|
-
i++;
|
|
286
|
-
numStars++;
|
|
287
|
-
}
|
|
288
|
-
const nextChar = glob[i + 1];
|
|
289
|
-
if (globstarOption && numStars == 2 &&
|
|
290
|
-
[...seps, undefined].includes(prevChar) &&
|
|
291
|
-
[...seps, undefined].includes(nextChar)) {
|
|
292
|
-
segment += globstar;
|
|
293
|
-
endsWithSep = true;
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
segment += wildcard;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
continue;
|
|
300
|
-
}
|
|
301
|
-
segment += regExpEscapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
|
|
302
|
-
}
|
|
303
|
-
// Check for unclosed groups or a dangling backslash.
|
|
304
|
-
if (groupStack.length > 0 || inRange || inEscape) {
|
|
305
|
-
// Parse failure. Take all characters from this segment literally.
|
|
306
|
-
segment = "";
|
|
307
|
-
for (const c of glob.slice(j, i)) {
|
|
308
|
-
segment += regExpEscapeChars.includes(c) ? `\\${c}` : c;
|
|
309
|
-
endsWithSep = false;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
regExpString += segment;
|
|
313
|
-
if (!endsWithSep) {
|
|
314
|
-
regExpString += i < glob.length ? sep : sepMaybe;
|
|
315
|
-
endsWithSep = true;
|
|
316
|
-
}
|
|
317
|
-
// Terminates with `i` at the start of the next segment.
|
|
318
|
-
while (seps.includes(glob[i]))
|
|
319
|
-
i++;
|
|
320
|
-
// Check that the next value of `j` is indeed higher than the current value.
|
|
321
|
-
if (!(i > j)) {
|
|
322
|
-
throw new Error("Assertion failure: i > j (potential infinite loop)");
|
|
323
|
-
}
|
|
324
|
-
j = i;
|
|
325
|
-
}
|
|
326
|
-
regExpString = `^${regExpString}$`;
|
|
327
|
-
return new RegExp(regExpString, caseInsensitive ? "i" : "");
|
|
328
|
-
}
|
|
329
|
-
exports.globToRegExp = globToRegExp;
|
|
330
|
-
/** Test whether the given string is a glob */
|
|
331
|
-
function isGlob(str) {
|
|
332
|
-
const chars = { "{": "}", "(": ")", "[": "]" };
|
|
333
|
-
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
|
334
|
-
if (str === "") {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
let match;
|
|
338
|
-
while ((match = regex.exec(str))) {
|
|
339
|
-
if (match[2])
|
|
340
|
-
return true;
|
|
341
|
-
let idx = match.index + match[0].length;
|
|
342
|
-
// if an open bracket/brace/paren is escaped,
|
|
343
|
-
// set the index to the next closing character
|
|
344
|
-
const open = match[1];
|
|
345
|
-
const close = open ? chars[open] : null;
|
|
346
|
-
if (open && close) {
|
|
347
|
-
const n = str.indexOf(close, idx);
|
|
348
|
-
if (n !== -1) {
|
|
349
|
-
idx = n + 1;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
str = str.slice(idx);
|
|
353
|
-
}
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
exports.isGlob = isGlob;
|
|
357
|
-
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
358
|
-
function normalizeGlob(glob, { globstar = false } = {}) {
|
|
359
|
-
if (glob.match(/\0/g)) {
|
|
360
|
-
throw new Error(`Glob contains invalid characters: "${glob}"`);
|
|
361
|
-
}
|
|
362
|
-
if (!globstar) {
|
|
363
|
-
return normalize(glob);
|
|
364
|
-
}
|
|
365
|
-
const s = separator_js_1.SEP_PATTERN.source;
|
|
366
|
-
const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
|
|
367
|
-
return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
|
|
368
|
-
}
|
|
369
|
-
exports.normalizeGlob = normalizeGlob;
|
|
370
|
-
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
371
|
-
function joinGlobs(globs, { extended = true, globstar = false } = {}) {
|
|
372
|
-
if (!globstar || globs.length == 0) {
|
|
373
|
-
return join(...globs);
|
|
374
|
-
}
|
|
375
|
-
if (globs.length === 0)
|
|
376
|
-
return ".";
|
|
377
|
-
let joined;
|
|
378
|
-
for (const glob of globs) {
|
|
379
|
-
const path = glob;
|
|
380
|
-
if (path.length > 0) {
|
|
381
|
-
if (!joined)
|
|
382
|
-
joined = path;
|
|
383
|
-
else
|
|
384
|
-
joined += `${separator_js_1.SEP}${path}`;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
if (!joined)
|
|
388
|
-
return ".";
|
|
389
|
-
return normalizeGlob(joined, { extended, globstar });
|
|
390
|
-
}
|
|
391
|
-
exports.joinGlobs = joinGlobs;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as _win32 from "./win32.js";
|
|
2
|
-
import * as _posix from "./posix.js";
|
|
3
|
-
export declare const win32: typeof _win32;
|
|
4
|
-
export declare const posix: typeof _posix;
|
|
5
|
-
export declare const basename: typeof _posix.basename | typeof _win32.basename, delimiter: string, dirname: typeof _posix.dirname | typeof _win32.dirname, extname: typeof _posix.extname | typeof _win32.extname, format: typeof _posix.format | typeof _win32.format, fromFileUrl: typeof _posix.fromFileUrl | typeof _win32.fromFileUrl, isAbsolute: typeof _win32.isAbsolute | typeof _posix.isAbsolute, join: typeof _posix.join | typeof _win32.join, normalize: typeof _win32.normalize | typeof _posix.normalize, parse: typeof _posix.parse | typeof _win32.parse, relative: typeof _posix.relative | typeof _win32.relative, resolve: typeof _win32.resolve | typeof _posix.resolve, toFileUrl: typeof _posix.toFileUrl | typeof _win32.toFileUrl, toNamespacedPath: typeof _posix.toNamespacedPath | typeof _win32.toNamespacedPath;
|
|
6
|
-
/** @deprecated (will be removed after 0.188.0) Use SEP intead. */
|
|
7
|
-
export declare const sep: string;
|
|
8
|
-
export * from "./common.js";
|
|
9
|
-
export { SEP, SEP_PATTERN } from "./separator.js";
|
|
10
|
-
export * from "./_interface.js";
|
|
11
|
-
export * from "./glob.js";
|