bingo 0.8.1 → 0.8.2
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":"isInGitRepository.d.ts","sourceRoot":"","sources":["../../src/cli/isInGitRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"isInGitRepository.d.ts","sourceRoot":"","sources":["../../src/cli/isInGitRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,YAAY,oBAK3D"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export async function isInGitRepository(runner) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
2
|
+
const result = await runner("git rev-parse --git-dir");
|
|
3
|
+
return result.message
|
|
4
|
+
? !result.message.includes("fatal: not a git repository")
|
|
5
|
+
: false;
|
|
9
6
|
}
|
|
10
7
|
//# sourceMappingURL=isInGitRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInGitRepository.js","sourceRoot":"","sources":["../../src/cli/isInGitRepository.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAoB;IAC3D,
|
|
1
|
+
{"version":3,"file":"isInGitRepository.js","sourceRoot":"","sources":["../../src/cli/isInGitRepository.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAoB;IAC3D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IACvD,OAAO,MAAM,CAAC,OAAO;QACpB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QACzD,CAAC,CAAC,KAAK,CAAC;AACV,CAAC"}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { isInGitRepository } from "./isInGitRepository.js";
|
|
3
3
|
describe("isInGitRepository", () => {
|
|
4
|
-
it("returns
|
|
5
|
-
const runner = vi.fn().mockResolvedValueOnce({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
it("returns false when git rev-parse --git-dir has no message", async () => {
|
|
5
|
+
const runner = vi.fn().mockResolvedValueOnce({
|
|
6
|
+
message: undefined,
|
|
7
|
+
});
|
|
8
|
+
const actual = await isInGitRepository(runner);
|
|
9
|
+
expect(actual).toBe(false);
|
|
9
10
|
});
|
|
10
|
-
it("returns false when git rev-parse --git-dir has
|
|
11
|
-
const runner = vi
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
expect(
|
|
16
|
-
|
|
11
|
+
it("returns false when git rev-parse --git-dir has explicit non-Git stdout", async () => {
|
|
12
|
+
const runner = vi.fn().mockResolvedValueOnce({
|
|
13
|
+
message: "fatal: not a git repository ...",
|
|
14
|
+
});
|
|
15
|
+
const actual = await isInGitRepository(runner);
|
|
16
|
+
expect(actual).toBe(false);
|
|
17
|
+
});
|
|
18
|
+
it("returns true when git rev-parse --git-dir has Git-related stdout", async () => {
|
|
19
|
+
const runner = vi.fn().mockResolvedValueOnce({
|
|
20
|
+
message: "/.git",
|
|
21
|
+
});
|
|
22
|
+
const actual = await isInGitRepository(runner);
|
|
23
|
+
expect(actual).toBe(true);
|
|
17
24
|
});
|
|
18
25
|
});
|
|
19
26
|
//# sourceMappingURL=isInGitRepository.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInGitRepository.test.js","sourceRoot":"","sources":["../../src/cli/isInGitRepository.test.ts"],"names":[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