zarro 1.160.0 → 1.162.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.
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  (function () {
3
3
  const Git = require("simple-git");
4
- async function fetchGitSha(forRepo) {
4
+ async function fetchGitSha(forRepo, short) {
5
5
  const git = new Git(forRepo);
6
6
  const log = await git.log({ maxCount: 1 });
7
- return log.latest.hash;
7
+ return !!short
8
+ ? currentGitSha.substring(0, 7)
9
+ : log.latest.hash;
8
10
  }
9
11
  // this is a bit of an hax: we're hoping that we get some
10
12
  // time between when this is fired off and when it's required
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zarro",
3
- "version": "1.160.0",
3
+ "version": "1.162.0",
4
4
  "description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
5
5
  "bin": {
6
6
  "zarro": "./index.js"
package/types.d.ts CHANGED
@@ -705,7 +705,10 @@ declare global {
705
705
  type StatFunction = (path: string) => Promise<fs.Stats | null>
706
706
 
707
707
  interface GitSha {
708
- fetchGitSha(): Promise<string>;
708
+ fetchGitSha(
709
+ forRepo?: string,
710
+ short?: boolean
711
+ ): Promise<string>;
709
712
 
710
713
  init(): Promise<void>;
711
714