* Processes the provided file time info entries. * @param {TimeInfoEntries=} fileTimeInfoEntries info for files * @param {TimeInfoEntries=} contextTimeInfoEntries info for directories * @param {ReadonlySet<string>=} changedFiles changed files * @param {ReadonlySet<string>=} removedFiles remo
(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles)
| 124 | * @returns {void} |
| 125 | */ |
| 126 | _go(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) { |
| 127 | this._initial = false; |
| 128 | if (this.startTime === null) this.startTime = Date.now(); |
| 129 | this.running = true; |
| 130 | if (this.watcher) { |
| 131 | this.pausedWatcher = this.watcher; |
| 132 | this.lastWatcherStartTime = Date.now(); |
| 133 | this.watcher.pause(); |
| 134 | this.watcher = null; |
| 135 | } else if (!this.lastWatcherStartTime) { |
| 136 | this.lastWatcherStartTime = Date.now(); |
| 137 | } |
| 138 | this.compiler.fsStartTime = Date.now(); |
| 139 | if ( |
| 140 | changedFiles && |
| 141 | removedFiles && |
| 142 | fileTimeInfoEntries && |
| 143 | contextTimeInfoEntries |
| 144 | ) { |
| 145 | this._mergeWithCollected(changedFiles, removedFiles); |
| 146 | this.compiler.fileTimestamps = fileTimeInfoEntries; |
| 147 | this.compiler.contextTimestamps = contextTimeInfoEntries; |
| 148 | } else if (this.pausedWatcher) { |
| 149 | if (this.pausedWatcher.getInfo) { |
| 150 | const { |
| 151 | changes, |
| 152 | removals, |
| 153 | fileTimeInfoEntries, |
| 154 | contextTimeInfoEntries |
| 155 | } = this.pausedWatcher.getInfo(); |
| 156 | this._mergeWithCollected(changes, removals); |
| 157 | this.compiler.fileTimestamps = fileTimeInfoEntries; |
| 158 | this.compiler.contextTimestamps = contextTimeInfoEntries; |
| 159 | } else { |
| 160 | this._mergeWithCollected( |
| 161 | this.pausedWatcher.getAggregatedChanges && |
| 162 | this.pausedWatcher.getAggregatedChanges(), |
| 163 | this.pausedWatcher.getAggregatedRemovals && |
| 164 | this.pausedWatcher.getAggregatedRemovals() |
| 165 | ); |
| 166 | this.compiler.fileTimestamps = |
| 167 | this.pausedWatcher.getFileTimeInfoEntries(); |
| 168 | this.compiler.contextTimestamps = |
| 169 | this.pausedWatcher.getContextTimeInfoEntries(); |
| 170 | } |
| 171 | } |
| 172 | this.compiler.modifiedFiles = this._collectedChangedFiles; |
| 173 | this._collectedChangedFiles = undefined; |
| 174 | this.compiler.removedFiles = this._collectedRemovedFiles; |
| 175 | this._collectedRemovedFiles = undefined; |
| 176 | |
| 177 | const run = () => { |
| 178 | if (this.compiler.idle) { |
| 179 | return this.compiler.cache.endIdle((err) => { |
| 180 | if (err) return this._done(err); |
| 181 | this.compiler.idle = false; |
| 182 | run(); |
| 183 | }); |
no test coverage detected