forked from smikula/good-fences
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calculate a partial fence difference based on git changes since a pro…
…vided oid (smikula#101) * Add a file provider that avoids ts program walk Adds a faster file provider that discovers source and fence files with a fast asyncronous file walk rather than by relying on typescript to perform a syncronous walk + parse of the program. We still use typescript to parse compilerOptions, but since we no longer rely on the typescript program walk to identify files, we stub out file discovery so only the initial config partse happens. Also adds config options to support switching between the two providers, since it will only work when all source files you intend to check fences against fall under your rootDirs. This is the case for OWA, but I don't know what other consumers look like. Depends on u/mahuangh/faster-source-providers-2 * progress -> progressBar * progress -> progressBar * support definition files, simplify resolveImportsFromFile, exclude asset files in fdir source file provider * getScriptFileExtensions * add partial evaluation based on git checkout * remove FdirSourceFileProvider's dependencies * remove looseRootFileDiscovery * remove extra diff (fenceJobs -> normalizedFiles * add json to the moduleFileExtensions in jest * Added tests for getPartialCheck / getFenceDiff * add launch.json & debug current test * Prefer preProcessFile in getTsImportSetFromSourceString * consider tag diffs during partial evaluation * remove commented code from getTsImportSetFromSourceString * update to new getScriptFIleExtensions from u/mahuangh/faster-source-providers-3 * get diffcount of index properly * update log messages to replace -- with new sentences * remove errant \n in fenceless warnings * Update runner.ts * add new options to README * remove warning when skipping tag existence checks * avoid unecessary branch in runner.ts * null -> undefined in config.ts * remove empty else branch * moving diff utils to utils/diffing * remove leftover cruft in diffing from previous refactors * check partialCheckLimit 'number' not 'boolean' * clarify comment on why we need to evaluate source files with changed imports * move diffing tests to test/utils/diffing, and force a full recheck on tag removal * clarifying comments around fenceDiff * Update warning message: removed tags section -> removed tags Co-authored-by: Maxwell Huang-Hobbs <[email protected]> Co-authored-by: Scott Mikula <[email protected]>
- Loading branch information
1 parent
668999c
commit 7acff60
Showing
23 changed files
with
2,016 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "SingleTest", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/jest-cli/bin/jest.js", | ||
"args": ["--testPathPattern", "${fileBasenameNoExtension}"], | ||
"cwd": "${workspaceRoot}", | ||
"preLaunchTask": null, | ||
"runtimeExecutable": null, | ||
"runtimeArgs": ["--nolazy"], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"sourceMaps": true, | ||
"outFiles": ["${workspaceRoot}/src/**"], | ||
"console": "integratedTerminal", | ||
"skipFiles": [ | ||
"<node_internals>/**/*.js", | ||
"${workspaceRoot}/node_modules/jest-*/**", | ||
"${workspaceRoot}/node_modules/jsdom/**" | ||
] | ||
} | ||
] | ||
} |
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
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,6 @@ | ||
import NormalizedPath from './NormalizedPath'; | ||
|
||
export type PartialCheck = { | ||
fences: NormalizedPath[]; | ||
sourceFiles: NormalizedPath[]; | ||
}; |
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
Oops, something went wrong.