Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate jest-changed-files to Typescript (#7827)
* Migrate jest-changed-files to Typescript * Add changelog entry * Update e2e/__tests__/jestChangedFiles.test.js Co-Authored-By: loryman <lorenzo.rapetti.94@gmail.com> * Stricter typings Merge remote-tracking branch 'origin/jest-changed-files-typescript' into jest-changed-files-typescript * Make prettier happy
- Loading branch information
1 parent
605e199
commit ba4e963
Showing
8 changed files
with
63 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
|
||
export type Path = string; | ||
|
||
export type Options = { | ||
lastCommit?: boolean; | ||
withAncestor?: boolean; | ||
changedSince?: string; | ||
includePaths?: Array<Path>; | ||
}; | ||
|
||
export type ChangedFiles = Set<Path>; | ||
export type Repos = {git: Set<Path>; hg: Set<Path>}; | ||
export type ChangedFilesPromise = Promise<{ | ||
repos: Repos; | ||
changedFiles: ChangedFiles; | ||
}>; | ||
|
||
export type SCMAdapter = { | ||
findChangedFiles: (cwd: Path, options: Options) => Promise<Array<Path>>; | ||
getRoot: (cwd: Path) => Promise<Path | null | undefined>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"outDir": "build" | ||
} | ||
} |