MCPcopy Create free account
hub / github.com/microsoft/typescript-go / isRelevantChange

Method isRelevantChange

internal/execute/watcher.go:258–280  ·  view source on GitHub ↗
(changedPaths map[string]fswatch.EventKind)

Source from the content-addressed store, hash-verified

256}
257
258func (w *Watcher) isRelevantChange(changedPaths map[string]fswatch.EventKind) bool {
259 caseSensitive := w.sys.FS().UseCaseSensitiveFileNames()
260 cwd := w.sys.GetCurrentDirectory()
261 opts := w.comparePathsOptions()
262 for eventPath := range changedPaths {
263 p := tspath.ToPath(eventPath, cwd, caseSensitive)
264 if w.seenFiles.Has(p) {
265 return true
266 }
267 if w.config.ConfigFile != nil && w.config.PossiblyMatchesFileName(eventPath) {
268 return true
269 }
270 if w.config.ConfigFile != nil && w.config.PossiblyMatchesDirectoryName(p) {
271 return true
272 }
273 if w.sys.FS().DirectoryExists(eventPath) {
274 if w.wm.IsPathUnderWatch(eventPath, opts) {
275 return true
276 }
277 }
278 }
279 return false
280}
281
282func (w *Watcher) doBuild() error {
283 if w.configModified {

Callers 1

DoCycleMethod · 0.95

Calls 10

comparePathsOptionsMethod · 0.95
ToPathFunction · 0.92
IsPathUnderWatchMethod · 0.80
FSMethod · 0.65
GetCurrentDirectoryMethod · 0.65
DirectoryExistsMethod · 0.65
HasMethod · 0.45

Tested by

no test coverage detected