@keymanapp/kmc 17.0.331 → 17.0.332

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 +1 @@
1
- {"version":3,"file":"getLastGitCommitDate.d.ts","sourceRoot":"","sources":["../../../src/util/getLastGitCommitDate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,QAAoD,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA+BzD"}
1
+ {"version":3,"file":"getLastGitCommitDate.d.ts","sourceRoot":"","sources":["../../../src/util/getLastGitCommitDate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,QAAoD,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuCzD"}
@@ -8,20 +8,47 @@ export const expectedGitDateFormat = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d\
8
8
  */
9
9
  export function getLastGitCommitDate(path) {
10
10
  // TZ=UTC0 git log -1 --no-merges --date=format:%Y-%m-%dT%H:%M:%SZ --format=%ad
11
- let result = null;
12
- try {
13
- result = execFileSync('git', [
11
+ let result = callGitLog([
12
+ 'log',
13
+ '-1',
14
+ '--no-merges',
15
+ '--format=%at',
16
+ '--',
17
+ path
18
+ ]);
19
+ if (typeof result != 'string') {
20
+ return null;
21
+ }
22
+ if (result == '') {
23
+ // #12626: no history was found, but not an error. We may have only a merge
24
+ // commit in history for that file, allow merges in the log
25
+ result = callGitLog([
14
26
  'log',
15
27
  '-1',
16
- '--no-merges',
17
28
  '--format=%at',
18
29
  '--',
19
30
  path
20
- ], {
31
+ ]);
32
+ if (typeof result != 'string') {
33
+ return null;
34
+ }
35
+ }
36
+ const sec = Number.parseInt(result);
37
+ if (Number.isNaN(sec)) {
38
+ // We received invalid data, perhaps a git error string so just ignore
39
+ return null;
40
+ }
41
+ // We receive a timestamp in seconds but we need milliseconds
42
+ return new Date(sec * 1000).toISOString();
43
+ }
44
+ function callGitLog(params) {
45
+ try {
46
+ const result = execFileSync('git', params, {
21
47
  encoding: 'utf-8',
22
48
  windowsHide: true,
23
49
  stdio: ['pipe', 'pipe', 'pipe'] // all output via pipe, so we don't get git errors on console
24
50
  });
51
+ return result.trim();
25
52
  }
26
53
  catch (e) {
27
54
  // If git is not available, or the file is not in-repo, then it is probably
@@ -32,8 +59,5 @@ export function getLastGitCommitDate(path) {
32
59
  // seems low.
33
60
  return null;
34
61
  }
35
- // We receive a timestamp in seconds but we need milliseconds
36
- const msec = Number.parseInt(result.trim()) * 1000;
37
- return new Date(msec).toISOString();
38
62
  }
39
63
  //# sourceMappingURL=getLastGitCommitDate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLastGitCommitDate.js","sourceRoot":"","sources":["../../../src/util/getLastGitCommitDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,uBAAuB;AACvB,MAAM,CAAC,MAAM,qBAAqB,GAAG,iDAAiD,CAAC;AAEvF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,+EAA+E;IAC/E,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI;QACF,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE;YAC3B,KAAK;YACL,IAAI;YACJ,aAAa;YACb,cAAc;YACd,IAAI;YACJ,IAAI;SACL,EAAE;YACD,QAAQ,EAAE,OAAO;YACjB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAO,6DAA6D;SACpG,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE;QACV,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,yEAAyE;QACzE,uEAAuE;QACvE,aAAa;QACb,OAAO,IAAI,CAAC;KACb;I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,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE;YACzC,QAAQ,EAAE,OAAO;YACjB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAO,6DAA6D;SACpG,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,yEAAyE;QACzE,uEAAuE;QACvE,aAAa;QACb,OAAO,IAAI,CAAC;KACb;AACH,CAAC"}
package/package.json CHANGED
@@ -34,17 +34,17 @@
34
34
  "kmlmp": "build/src/kmlmp.js"
35
35
  },
36
36
  "dependencies": {
37
- "@keymanapp/common-types": "17.0.331",
38
- "@keymanapp/developer-utils": "17.0.331",
39
- "@keymanapp/keyman-version": "17.0.331",
40
- "@keymanapp/kmc-analyze": "17.0.331",
41
- "@keymanapp/kmc-keyboard-info": "17.0.331",
42
- "@keymanapp/kmc-kmn": "17.0.331",
43
- "@keymanapp/kmc-ldml": "17.0.331",
44
- "@keymanapp/kmc-model": "17.0.331",
45
- "@keymanapp/kmc-model-info": "17.0.331",
46
- "@keymanapp/kmc-package": "17.0.331",
47
- "@keymanapp/models-types": "17.0.331",
37
+ "@keymanapp/common-types": "17.0.332",
38
+ "@keymanapp/developer-utils": "17.0.332",
39
+ "@keymanapp/keyman-version": "17.0.332",
40
+ "@keymanapp/kmc-analyze": "17.0.332",
41
+ "@keymanapp/kmc-keyboard-info": "17.0.332",
42
+ "@keymanapp/kmc-kmn": "17.0.332",
43
+ "@keymanapp/kmc-ldml": "17.0.332",
44
+ "@keymanapp/kmc-model": "17.0.332",
45
+ "@keymanapp/kmc-model-info": "17.0.332",
46
+ "@keymanapp/kmc-package": "17.0.332",
47
+ "@keymanapp/models-types": "17.0.332",
48
48
  "@sentry/node": "^7.57.0",
49
49
  "chalk": "^2.4.2",
50
50
  "commander": "^10.0.0",
@@ -86,5 +86,5 @@
86
86
  "type": "git",
87
87
  "url": "git+https://github.com/keymanapp/keyman.git"
88
88
  },
89
- "version": "17.0.331"
89
+ "version": "17.0.332"
90
90
  }