fork-version 5.1.4 → 5.1.5
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 +14 -0
- package/dist/services/git.d.ts +14 -15
- package/dist/services/git.js +16 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Fork Version
|
|
2
2
|
|
|
3
|
+
## [5.1.5](https://github.com/eglavin/fork-version/compare/v5.1.4...v5.1.5) (2026-04-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Refactor
|
|
7
|
+
|
|
8
|
+
* set no-color and date-order opts when getting commits ([2756155](https://github.com/eglavin/fork-version/commit/27561551745da68f7eaa2b298a2a34b803cc2a6d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Test
|
|
12
|
+
|
|
13
|
+
* add test for long running branch scenario ([4dfcbbc](https://github.com/eglavin/fork-version/commit/4dfcbbcec5a27a8baf66dff440b58d9d6ef864f9))
|
|
14
|
+
* tag out of order commit test as skippable when not running in e2e mode ([b7d67e3](https://github.com/eglavin/fork-version/commit/b7d67e3fd5cfaccccffd2173473dfd85d2dc2728))
|
|
15
|
+
|
|
16
|
+
|
|
3
17
|
## [5.1.4](https://github.com/eglavin/fork-version/compare/v5.1.3...v5.1.4) (2026-04-18)
|
|
4
18
|
|
|
5
19
|
|
package/dist/services/git.d.ts
CHANGED
|
@@ -87,35 +87,33 @@ declare class Git {
|
|
|
87
87
|
*/
|
|
88
88
|
getRemoteUrl(): Promise<string>;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Returns an array of tags from the git log, filtered by an optional tag prefix and pre-release configuration.
|
|
91
91
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2, tag: v1.0.1, tag: v1.0.0)
|
|
95
|
+
* await git.getTags("v"); // ["v1.0.2", "v1.0.1", "v1.0.0"]
|
|
96
|
+
*
|
|
97
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2-0, tag: v1.0.1-0, tag: v1.0.0)
|
|
98
|
+
* await git.getTags("v", true); // ["v1.0.2-0", "v1.0.1-0", "v1.0.0"]
|
|
98
99
|
*
|
|
99
|
-
*
|
|
100
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2-alpha.0, tag: v1.0.1-alpha.0, tag: v1.0.0)
|
|
101
|
+
* await git.getTags("v", "alpha"); // ["v1.0.2-alpha.0", "v1.0.1-alpha.0", "v1.0.0"]
|
|
100
102
|
* ```
|
|
101
103
|
*
|
|
102
104
|
* - [Functionality extracted from the conventional-changelog - git-semver-tags project](https://github.com/conventional-changelog/conventional-changelog/blob/fac8045242099c016f5f3905e54e02b7d466bd7b/packages/git-semver-tags/index.js)
|
|
103
105
|
* - [conventional-changelog git-semver-tags MIT Licence](https://github.com/conventional-changelog/conventional-changelog/blob/fac8045242099c016f5f3905e54e02b7d466bd7b/packages/git-semver-tags/LICENSE.md)
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* await git.getTags("v"); // ["v1.0.2", "v1.0.1", "v1.0.0"]
|
|
108
|
-
* ```
|
|
109
106
|
*/
|
|
110
107
|
getTags(tagPrefix?: string, preRelease?: string | boolean): Promise<string[]>;
|
|
111
108
|
/**
|
|
112
|
-
*
|
|
109
|
+
* Returns an array of commits between two git references (e.g., tags, branches, or commits), optionally filtered by file paths.
|
|
113
110
|
*
|
|
114
|
-
*
|
|
111
|
+
* Each commit in the returned array is a string containing the following information, separated by newlines:
|
|
115
112
|
* ```txt
|
|
116
113
|
* subject
|
|
117
114
|
* body
|
|
118
115
|
* hash
|
|
116
|
+
* ref names
|
|
119
117
|
* committer date
|
|
120
118
|
* committer name
|
|
121
119
|
* committer email
|
|
@@ -123,6 +121,7 @@ declare class Git {
|
|
|
123
121
|
*
|
|
124
122
|
* @example
|
|
125
123
|
* ```ts
|
|
124
|
+
* await git.getCommits("v1.0.0", "HEAD");
|
|
126
125
|
* await git.getCommits("v1.0.0", "HEAD", "src/utils");
|
|
127
126
|
* ```
|
|
128
127
|
*/
|
package/dist/services/git.js
CHANGED
|
@@ -180,28 +180,25 @@ var Git = class {
|
|
|
180
180
|
return false;
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* Returns an array of tags from the git log, filtered by an optional tag prefix and pre-release configuration.
|
|
184
184
|
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2, tag: v1.0.1, tag: v1.0.0)
|
|
188
|
+
* await git.getTags("v"); // ["v1.0.2", "v1.0.1", "v1.0.0"]
|
|
189
|
+
*
|
|
190
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2-0, tag: v1.0.1-0, tag: v1.0.0)
|
|
191
|
+
* await git.getTags("v", true); // ["v1.0.2-0", "v1.0.1-0", "v1.0.0"]
|
|
191
192
|
*
|
|
192
|
-
*
|
|
193
|
+
* // Given the following git log: (HEAD -> main, tag: v1.0.2-alpha.0, tag: v1.0.1-alpha.0, tag: v1.0.0)
|
|
194
|
+
* await git.getTags("v", "alpha"); // ["v1.0.2-alpha.0", "v1.0.1-alpha.0", "v1.0.0"]
|
|
193
195
|
* ```
|
|
194
196
|
*
|
|
195
197
|
* - [Functionality extracted from the conventional-changelog - git-semver-tags project](https://github.com/conventional-changelog/conventional-changelog/blob/fac8045242099c016f5f3905e54e02b7d466bd7b/packages/git-semver-tags/index.js)
|
|
196
198
|
* - [conventional-changelog git-semver-tags MIT Licence](https://github.com/conventional-changelog/conventional-changelog/blob/fac8045242099c016f5f3905e54e02b7d466bd7b/packages/git-semver-tags/LICENSE.md)
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* ```ts
|
|
200
|
-
* await git.getTags("v"); // ["v1.0.2", "v1.0.1", "v1.0.0"]
|
|
201
|
-
* ```
|
|
202
199
|
*/
|
|
203
200
|
async getTags(tagPrefix, preRelease) {
|
|
204
|
-
const logOutput = await this.log("--
|
|
201
|
+
const logOutput = await this.log("--format=%d", "--no-color", "--date-order");
|
|
205
202
|
/**
|
|
206
203
|
* Search for tags in the following formats:
|
|
207
204
|
* @example "tag: 1.2.3," or "tag: 1.2.3)"
|
|
@@ -221,13 +218,14 @@ var Git = class {
|
|
|
221
218
|
return tags;
|
|
222
219
|
}
|
|
223
220
|
/**
|
|
224
|
-
*
|
|
221
|
+
* Returns an array of commits between two git references (e.g., tags, branches, or commits), optionally filtered by file paths.
|
|
225
222
|
*
|
|
226
|
-
*
|
|
223
|
+
* Each commit in the returned array is a string containing the following information, separated by newlines:
|
|
227
224
|
* ```txt
|
|
228
225
|
* subject
|
|
229
226
|
* body
|
|
230
227
|
* hash
|
|
228
|
+
* ref names
|
|
231
229
|
* committer date
|
|
232
230
|
* committer name
|
|
233
231
|
* committer email
|
|
@@ -235,6 +233,7 @@ var Git = class {
|
|
|
235
233
|
*
|
|
236
234
|
* @example
|
|
237
235
|
* ```ts
|
|
236
|
+
* await git.getCommits("v1.0.0", "HEAD");
|
|
238
237
|
* await git.getCommits("v1.0.0", "HEAD", "src/utils");
|
|
239
238
|
* ```
|
|
240
239
|
*/
|
|
@@ -250,7 +249,7 @@ var Git = class {
|
|
|
250
249
|
"%cE",
|
|
251
250
|
SCISSOR
|
|
252
251
|
].join("%n");
|
|
253
|
-
const splitCommits = (await this.log(`--format=${LOG_FORMAT}`, [from, to].filter(Boolean).join(".."), paths.length ? "--" : "", ...paths)).split(`\n${SCISSOR}\n`);
|
|
252
|
+
const splitCommits = (await this.log(`--format=${LOG_FORMAT}`, "--no-color", "--date-order", [from, to].filter(Boolean).join(".."), paths.length ? "--" : "", ...paths)).split(`\n${SCISSOR}\n`);
|
|
254
253
|
if (splitCommits.length === 0) return splitCommits;
|
|
255
254
|
if (splitCommits[0] === SCISSOR) splitCommits.shift();
|
|
256
255
|
if (splitCommits[splitCommits.length - 1] === "") splitCommits.pop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fork-version",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Fork-Version automates version control tasks such as determining, updating, and committing versions, files, and changelogs, simplifying the process when adhering to the conventional commit standard.",
|
|
6
6
|
"keywords": [
|