keep-a-changelog 2.1.0 → 2.2.1
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 +18 -1
- package/README.md +16 -4
- package/esm/bin.js +6 -2
- package/esm/deps/deno.land/std@0.173.0/_util/asserts.js +21 -0
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/_util/os.js +3 -2
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/flags/mod.js +145 -36
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_constants.js +1 -0
- package/esm/deps/deno.land/std@0.173.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_util.js +1 -0
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/common.js +1 -1
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/glob.js +1 -1
- package/esm/deps/deno.land/std@0.173.0/path/mod.js +32 -0
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/posix.js +20 -16
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/separator.js +1 -1
- package/esm/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/win32.js +17 -15
- package/esm/deps/deno.land/{x/semver@v1.4.0 → std@0.173.0/semver}/mod.js +227 -334
- package/esm/src/Change.js +15 -15
- package/esm/src/Changelog.js +9 -1
- package/esm/src/Release.js +10 -0
- package/esm/src/deps.js +1 -1
- package/esm/src/parser.js +19 -3
- package/esm/test/changelog.custom.type.md +0 -1
- package/esm/test/changelog.expected.linted.md +208 -0
- package/esm/test/changelog.expected.md +3 -1
- package/esm/test/changelog.md +4 -0
- package/esm/test/empty.expected.md +0 -1
- package/package.json +13 -8
- package/script/bin.js +6 -2
- package/script/deps/deno.land/std@0.173.0/_util/asserts.js +27 -0
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/_util/os.js +4 -3
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/flags/mod.js +149 -40
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_constants.js +1 -0
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_interface.js +1 -1
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_util.js +1 -0
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/common.js +1 -1
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/glob.js +1 -1
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/mod.js +19 -1
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/posix.js +20 -16
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/separator.js +1 -1
- package/script/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/win32.js +18 -16
- package/script/deps/deno.land/{x/semver@v1.4.0 → std@0.173.0/semver}/mod.js +232 -342
- package/script/src/Change.js +15 -15
- package/script/src/Changelog.js +9 -1
- package/script/src/Release.js +10 -0
- package/script/src/deps.js +1 -1
- package/script/src/parser.js +19 -3
- package/script/test/changelog.custom.type.md +0 -1
- package/script/test/changelog.expected.linted.md +208 -0
- package/script/test/changelog.expected.md +3 -1
- package/script/test/changelog.md +4 -0
- package/script/test/empty.expected.md +0 -1
- package/types/deps/deno.land/std@0.173.0/_util/asserts.d.ts +10 -0
- package/types/deps/deno.land/std@0.173.0/_util/os.d.ts +4 -0
- package/types/deps/deno.land/std@0.173.0/flags/mod.d.ts +166 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_constants.d.ts +0 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_interface.d.ts +1 -1
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/_util.d.ts +0 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/common.d.ts +0 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/glob.d.ts +10 -5
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/mod.d.ts +0 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/posix.d.ts +9 -5
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/separator.d.ts +0 -0
- package/types/deps/deno.land/{std@0.120.0 → std@0.173.0}/path/win32.d.ts +7 -5
- package/types/deps/deno.land/std@0.173.0/semver/mod.d.ts +398 -0
- package/types/src/Changelog.d.ts +1 -0
- package/types/src/Release.d.ts +1 -0
- package/types/src/deps.d.ts +1 -1
- package/esm/deps/deno.land/std@0.120.0/_util/assert.js +0 -13
- package/esm/deps/deno.land/std@0.120.0/path/_interface.js +0 -3
- package/esm/deps/deno.land/std@0.120.0/path/mod.js +0 -14
- package/script/deps/deno.land/std@0.120.0/_util/assert.js +0 -18
- package/types/deps/deno.land/std@0.120.0/_util/assert.d.ts +0 -5
- package/types/deps/deno.land/std@0.120.0/_util/os.d.ts +0 -3
- package/types/deps/deno.land/std@0.120.0/flags/mod.d.ts +0 -50
- package/types/deps/deno.land/x/semver@v1.4.0/mod.d.ts +0 -116
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
1
2
|
// Copyright the Browserify authors. MIT License.
|
|
2
3
|
// Ported from https://github.com/browserify/path-browserify/
|
|
3
4
|
// This module is browser compatible.
|
|
4
5
|
import * as dntShim from "../../../../_dnt.shims.js";
|
|
5
6
|
import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK, } from "./_constants.js";
|
|
6
7
|
import { _format, assertPath, encodeWhitespace, isPathSeparator, isWindowsDeviceRoot, normalizeString, } from "./_util.js";
|
|
7
|
-
import { assert } from "../_util/
|
|
8
|
+
import { assert } from "../_util/asserts.js";
|
|
8
9
|
export const sep = "\\";
|
|
9
10
|
export const delimiter = ";";
|
|
10
11
|
/**
|
|
@@ -506,8 +507,8 @@ export function toNamespacedPath(path) {
|
|
|
506
507
|
return path;
|
|
507
508
|
}
|
|
508
509
|
/**
|
|
509
|
-
* Return the directory
|
|
510
|
-
* @param path to determine
|
|
510
|
+
* Return the directory path of a `path`.
|
|
511
|
+
* @param path to determine the directory path for
|
|
511
512
|
*/
|
|
512
513
|
export function dirname(path) {
|
|
513
514
|
assertPath(path);
|
|
@@ -640,33 +641,33 @@ export function basename(path, ext = "") {
|
|
|
640
641
|
}
|
|
641
642
|
else {
|
|
642
643
|
if (firstNonSlashEnd === -1) {
|
|
643
|
-
// We saw the first non-path separator,
|
|
644
|
-
//
|
|
644
|
+
// We saw the first non-path separator, mark this as the end of our
|
|
645
|
+
// path component in case we don't match a whole suffix
|
|
645
646
|
matchedSlash = false;
|
|
646
647
|
firstNonSlashEnd = i + 1;
|
|
648
|
+
end = firstNonSlashEnd;
|
|
647
649
|
}
|
|
648
650
|
if (extIdx >= 0) {
|
|
649
|
-
// Try to match the explicit
|
|
651
|
+
// Try to match the explicit suffix
|
|
650
652
|
if (code === ext.charCodeAt(extIdx)) {
|
|
651
653
|
if (--extIdx === -1) {
|
|
652
|
-
// We matched
|
|
654
|
+
// We matched whole suffix, so mark this as the end of our path
|
|
653
655
|
// component
|
|
654
656
|
end = i;
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
659
|
else {
|
|
658
|
-
//
|
|
659
|
-
//
|
|
660
|
+
// Suffix character does not match, so bail out early
|
|
661
|
+
// from checking rest of characters
|
|
660
662
|
extIdx = -1;
|
|
661
|
-
end = firstNonSlashEnd;
|
|
662
663
|
}
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
666
|
}
|
|
667
|
+
if (end === -1)
|
|
668
|
+
return "";
|
|
666
669
|
if (start === end)
|
|
667
670
|
end = firstNonSlashEnd;
|
|
668
|
-
else if (end === -1)
|
|
669
|
-
end = path.length;
|
|
670
671
|
return path.slice(start, end);
|
|
671
672
|
}
|
|
672
673
|
else {
|
|
@@ -692,8 +693,9 @@ export function basename(path, ext = "") {
|
|
|
692
693
|
}
|
|
693
694
|
}
|
|
694
695
|
/**
|
|
695
|
-
* Return the extension of the `path
|
|
696
|
+
* Return the extension of the `path` with leading period.
|
|
696
697
|
* @param path with extension
|
|
698
|
+
* @returns extension (ex. for `file.ts` returns `.ts`)
|
|
697
699
|
*/
|
|
698
700
|
export function extname(path) {
|
|
699
701
|
assertPath(path);
|
|
@@ -917,7 +919,7 @@ export function parse(path) {
|
|
|
917
919
|
* Converts a file URL to a path string.
|
|
918
920
|
*
|
|
919
921
|
* ```ts
|
|
920
|
-
* import { fromFileUrl } from "
|
|
922
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
|
|
921
923
|
* fromFileUrl("file:///home/foo"); // "\\home\\foo"
|
|
922
924
|
* fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
|
|
923
925
|
* fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
|
|
@@ -942,7 +944,7 @@ export function fromFileUrl(url) {
|
|
|
942
944
|
* Converts a path string to a file URL.
|
|
943
945
|
*
|
|
944
946
|
* ```ts
|
|
945
|
-
* import { toFileUrl } from "
|
|
947
|
+
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
|
|
946
948
|
* toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
|
|
947
949
|
* toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
|
|
948
950
|
* toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
|