@exadev/build-identity 1.0.0 → 1.0.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/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10,7 +10,7 @@ function runGit(repoRoot, args) {
|
|
|
10
10
|
}).trim();
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Reads HEAD's full hash, short hash, and
|
|
13
|
+
* Reads HEAD's full hash, short hash, and author date from the given git working tree. Author date, not committer date: a rebase-merged commit keeps its original author date but gets a fresh committer date at rebase time, and every consumer of this identity treats the date as "when this commit was authored", not "when it was last rewritten onto its current position". Throws whatever `git` itself throws (e.g. `repoRoot` is not a git repository, or has no commits) -- there is no sensible default identity for a build that isn't sitting in real git history.
|
|
14
14
|
*/
|
|
15
15
|
function getHeadCommit(repoRoot) {
|
|
16
16
|
return {
|
|
@@ -23,7 +23,7 @@ function getHeadCommit(repoRoot) {
|
|
|
23
23
|
date: runGit(repoRoot, [
|
|
24
24
|
"log",
|
|
25
25
|
"-1",
|
|
26
|
-
"--format=%
|
|
26
|
+
"--format=%aI",
|
|
27
27
|
"HEAD"
|
|
28
28
|
])
|
|
29
29
|
};
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function runGit(repoRoot, args) {
|
|
|
9
9
|
}).trim();
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Reads HEAD's full hash, short hash, and
|
|
12
|
+
* Reads HEAD's full hash, short hash, and author date from the given git working tree. Author date, not committer date: a rebase-merged commit keeps its original author date but gets a fresh committer date at rebase time, and every consumer of this identity treats the date as "when this commit was authored", not "when it was last rewritten onto its current position". Throws whatever `git` itself throws (e.g. `repoRoot` is not a git repository, or has no commits) -- there is no sensible default identity for a build that isn't sitting in real git history.
|
|
13
13
|
*/
|
|
14
14
|
function getHeadCommit(repoRoot) {
|
|
15
15
|
return {
|
|
@@ -22,7 +22,7 @@ function getHeadCommit(repoRoot) {
|
|
|
22
22
|
date: runGit(repoRoot, [
|
|
23
23
|
"log",
|
|
24
24
|
"-1",
|
|
25
|
-
"--format=%
|
|
25
|
+
"--format=%aI",
|
|
26
26
|
"HEAD"
|
|
27
27
|
])
|
|
28
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exadev/build-identity",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Resolve a build's true identity (a real release tag, or the commit it was built from) from git state, with an optional predicted-version display layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|