• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mizchi / next-editor / 1448

28 Feb 2024 12:17PM UTC coverage: 42.344% (+0.6%) from 41.712%
1448

Pull #349

circleci

web-flow
chore(deps): update babel monorepo
Pull Request #349: chore(deps): update babel monorepo

95 of 450 branches covered (21.11%)

Branch coverage included in aggregate %.

967 of 2058 relevant lines covered (46.99%)

1.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/domain/git/queries/getTrackingStatus.ts
1
import * as git from "isomorphic-git"
×
2
import difference from "lodash/difference"
×
3
import uniq from "lodash/uniq"
×
4
import { getFilesRecursively } from "../../filesystem/queries/getFileRecursively"
×
5
import { GitTrackingStatus } from "../../types"
6

7
export async function getTrackingStatus(
×
8
  projectRoot: string
9
): Promise<GitTrackingStatus> {
10
  const trackedByHead: string[] = await git.listFiles({
×
11
    dir: projectRoot,
12
    ref: "HEAD"
13
  })
14

15
  const trackedByIndex: string[] = await git.listFiles({
×
16
    dir: projectRoot
17
  })
18

19
  const tracked = uniq([...trackedByHead, ...trackedByIndex])
×
20

21
  const files = (await getFilesRecursively(projectRoot)).map(pathname =>
×
22
    pathname.replace(projectRoot + "/", "")
×
23
  )
24

25
  const untracked = difference(files, tracked)
×
26

27
  return {
×
28
    tracked,
29
    untracked
30
  }
31
}
32

33
export async function getUntrackingFiles(
×
34
  projectRoot: string
35
): Promise<string[]> {
36
  const tracked: string[] = await git.listFiles({
×
37
    dir: projectRoot,
38
    ref: "HEAD"
39
  })
40

41
  const files = (await getFilesRecursively(projectRoot)).map(pathname =>
×
42
    pathname.replace(projectRoot + "/", "")
×
43
  )
44

45
  return difference(files, tracked)
×
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc